Infostealer malware and the session cookies it steals
A familiar story in account takeover reports goes like this. Someone loses their email, their social accounts and a work login in the same afternoon. They insist they had two-factor turned on everywhere, and they’re telling the truth. Nobody guessed their password and nobody intercepted a code. A program on their laptop copied a folder out of their browser a few days earlier, and that folder was enough.
That program is an infostealer. It’s one of the most common kinds of malware on personal computers right now, and it works around the defence most people rely on. Understanding why means understanding what your browser keeps after you log in, and why that thing is worth more to an attacker than your password.
What an infostealer is
An infostealer is malware built to do one job quickly: collect whatever credentials and account data it can find on a machine, package it up, and send it somewhere. It doesn’t usually encrypt your files or lock your screen. Many of them don’t try to stay on the machine for long. They run, grab, upload, and sometimes delete themselves.
The haul is broad. Saved browser passwords are the obvious target. Autofill data comes along too: names, addresses, phone numbers, sometimes card details. Crypto wallet files and browser wallet extensions are high on the list. So are session files for desktop chat apps, gaming launchers and remote access tools. Many stealers also grab a screenshot, a list of installed software and basic system details like the country and the public IP address.
Then there are the cookies. For many attackers, those are the most valuable part of the bundle.
Infostealers are sold as a service. The people who write them rent access to others, who handle getting them onto machines. The output of each infected computer is called a log, and logs are traded in bulk on criminal markets and in chat channels. A buyer might search a pile of logs for a particular company’s login page, a crypto exchange or a social platform, and pick out the machines that have a live session there.
What a session cookie actually does
When you log into a website, you prove who you are once. You type a password, maybe approve a prompt or enter a code. After that, the site doesn’t want to ask you again on every click, so it hands your browser a token that says “this browser has already logged in”. Usually that token is stored as a cookie. Every request your browser sends to that site afterwards includes the cookie, and the site treats you as signed in.
That’s the whole trick. The password and the second factor are checks at the door. The cookie is the wristband you get after passing them. Most sites don’t check your password again while the wristband is valid, and many sessions last for weeks or months, especially when you’ve ticked “remember me” or “keep me signed in”.
A stolen session cookie lets someone else wear your wristband. If an attacker loads your cookie into their own browser and visits the site, the site sees a valid session token and lets them in. There’s no password prompt, because the session already exists. There’s no two-factor prompt, because two-factor only runs at login, and as far as the site can tell, this isn’t a login.
This technique is often called session hijacking or pass-the-cookie. It’s the reason “I have 2FA” isn’t a complete answer to infostealers.
Why this beats two-factor and even passkeys
It’s worth being precise here, because two-factor authentication is still one of the best things you can turn on. It stops a huge amount of account takeover. What it protects is the moment of logging in. A stolen password from a data breach is useless without the second factor. A phishing page that captures your password still has to deal with the code.
Session theft happens after that moment. The login already succeeded, on your own computer, with your own second factor. The attacker takes the result.
The same applies to passkeys and hardware security keys. Those are excellent at stopping phishing, because they won’t sign a login for the wrong website. But once you’ve logged in with a passkey, the site still gives your browser an ordinary session cookie. A stealer that copies that cookie gets an ordinary session. The strength of the login method doesn’t travel with the cookie.
So the honest framing is that two-factor and passkeys close the front door very well, and infostealers climb in through a window that only exists because you’re already inside. Defending against them is mostly about keeping the malware off the machine, and about what happens to sessions once you know something went wrong.
How infostealers get onto a computer
Almost every infostealer infection starts with the owner running something. The delivery methods change constantly, but a handful of patterns account for most of them.
Cracked software and game cheats are the classic route. Someone searches for a free copy of paid software, a key generator or a cheat tool, downloads a zip file from a forum or video description, and runs it. The file might even do what it promised. It also runs the stealer.
Fake download pages are close behind. Attackers buy search ads or create lookalike sites for popular free tools, so the first result for a well-known program leads to a convincing copy with a poisoned installer.
A more recent trick is the fake verification page. A website shows what looks like a CAPTCHA and tells you to press a few keys to prove you’re human, which pastes a command into the Windows Run box or a terminal and executes it. The user runs the malware with their own hands, thinking they’re ticking a box.
Other routes include email attachments dressed as invoices or shipping documents, messages in gaming and creator communities offering a “beta” to test, and compromised browser extensions or software updates.
The shared feature is that none of these need an exploit. They rely on someone choosing to run a file or paste a command. That’s why they work on fully updated machines.
What happens in the first few minutes
The speed matters, because it shapes the cleanup.
Once running, a typical stealer goes straight to the places browsers keep their data. On Windows, Chrome, Edge, Brave and Firefox all store profiles in predictable folders. The stealer copies the password database, the cookie database, autofill data and the list of installed extensions. It looks for wallet files and for the local storage of wallet extensions. It checks for chat and gaming app session files.
Browsers do encrypt saved passwords and cookies on disk. On Windows, that encryption has historically been tied to the logged-in user account, which meant any program running as you could ask the system to decrypt it. That’s the gap stealers lived in for years. Chrome added an extra layer in 2024 that ties cookie decryption more tightly to the browser itself, which made the job harder. Stealer authors responded with workarounds within months. It’s a moving arms race rather than a solved problem.
After collecting, the stealer uploads everything, often to a server or a chat bot controlled by the operator. The log appears in the operator’s panel with a summary of what was found: how many passwords, how many cookies, which notable domains.
From the victim’s side, there may be nothing to notice. No pop-up, no slowdown, no warning. The “free tool” might have shown an error and closed. By the time anything goes wrong in an account, the log may have been sold on to someone else.
What an attacker does with a session
The value of a stolen session depends on what’s behind it. A buyer who has your cookies for an email account can read your mail, and more importantly, can use it to reset passwords elsewhere. A buyer with a session for a social account can post, message your contacts, or run ads if the account has billing attached. A session for a work tool can give access to documents, chat history, source code or cloud dashboards.
To use the cookie convincingly, attackers often try to look like the original browser. The log includes the victim’s country, IP address and browser details, and the attacker may connect through a nearby network and set their browser to report similar details. The aim is to avoid tripping a site’s “new device” checks.
Once inside, the common moves are about staying in. They add their own recovery email or phone number. They create a mail forwarding rule so copies keep flowing even if the session dies. They add an app password, an API token or an authorised app that keeps working after a password change. On work accounts, they may register their own device for two-factor.
Those persistence steps are why the cleanup has to go beyond a password reset. The cookie was the way in. What the attacker did while they had it is what keeps them there.
A worked example: one download, three accounts
It helps to follow a single infection through, because the timeline explains the cleanup.
Picture someone who runs a small online shop and a video channel from the same laptop. They want a paid video editing plugin without paying for it, find a “free” version linked in a video description, and download a password-protected zip. The password is there so antivirus can’t scan the contents before it’s opened. They extract it, run the installer, and get an error saying the plugin isn’t compatible. They shrug and delete it.
In those few seconds, the stealer copied the browser’s cookie database, saved passwords and autofill data, plus the session files for a desktop chat app. The log was uploaded before the error message appeared.
Three days later, a buyer searching logs for video platform sessions finds this one. They load the cookies, open the channel dashboard, and they’re in, with no password and no code. They change the channel name, start a livestream promoting a crypto scam, and add their own email as a manager.
That same day, the shop owner gets an alert that their email was accessed from a new location. They change the email password on the same laptop. The stealer ran once and is gone, so this happens to be safe, but they had no way of knowing that. The email change doesn’t touch the video platform session, which lives in a separate cookie. It doesn’t touch the chat app either, whose session file was copied as well, so the attacker starts messaging customers from it.
Every piece of that damage came from sessions, not passwords. And every account needed its own “sign out everywhere”, not just the one that sent an alert.
Why a password change falls short
The instinct after a compromise is to change passwords. It’s the right instinct and the wrong first step, for two reasons.
The first reason is order. If the stealer is still on your computer, or can come back, then changing passwords on that computer hands it the new ones. Some stealers only run once, but you can’t tell which kind you had. Cleaning the machine comes before anything you type into it.
The second reason is that a password change doesn’t always end existing sessions. Some services sign out every other device when you change the password. Some ask whether you want to. Some don’t touch existing sessions at all, so the attacker’s copy of your cookie stays valid. The only way to be sure is to explicitly end sessions, using the “sign out everywhere” or “active sessions” controls that most major services have.
A password change also does nothing about the persistence the attacker added. A forwarding rule, an app password or an authorised third-party app all survive it. So the cleanup is a sequence, and the order is the part people get wrong.
The cleanup order that actually works
Here’s the order, starting from the moment you suspect an infection.
First, stop using the infected computer for anything that involves logging in. Disconnect it from the network if you can. Don’t try to fix accounts from it.
Second, get to a clean device. A phone you trust is usually fine for the urgent steps. This is where you’ll do the account work.
Third, deal with money first. If there are crypto wallets on the infected machine, assume their keys are known and move funds to a new wallet created on a clean device. Check banking and payment apps for anything unfamiliar, and call the bank if there’s any sign of activity.
Fourth, secure your main email account. It’s the key to resetting everything else. From the clean device, sign out of all sessions, change the password, review recovery options, check forwarding rules and filters, and remove any connected apps or app passwords you don’t recognise.
Fifth, work through other important accounts in order of damage: work accounts, cloud storage, the password manager, social accounts with contacts or ad billing, then everything else. For each one, end sessions first, then change the password, then look for added recovery details and connected apps.
Sixth, clean or rebuild the computer. For a known stealer infection, a full reinstall of the operating system is the cautious choice. After it’s clean, sign back in fresh.
Revoking sessions, service by service
Most big services put session controls somewhere under security settings, and the wording varies. It’s worth finding them before you need them.
For a Google account, the security page lists your devices, and you can sign out of each one. A password change on a Google account signs out most other sessions, but the device list lets you confirm. Microsoft accounts have a sign out everywhere option in the security settings. Apple accounts list devices signed in with your Apple ID, and you can remove them.
Social platforms usually have an active sessions or where you’re logged in page. Messaging apps with desktop or web versions list linked devices. Many business tools let an administrator force a sign-out for a user and revoke their tokens, which is the first call to make if a work machine was involved.
For services that don’t offer session controls, a password change is usually the only lever, and you’re relying on the service to end old sessions. If it’s an important account and you’re unsure, contact support and ask directly whether existing sessions were invalidated.
Password managers deserve special attention. If your password manager’s browser extension was unlocked on the infected machine, assume the stealer may have captured data from it, not just from the browser’s built-in store. Change the master password from a clean device, end other sessions, and then rotate the passwords stored inside, most important first.
What the attacker left behind
Sessions and passwords are the obvious targets. The persistence settings are what bring people back into trouble a week later.
On email accounts, look at forwarding rules and filters. A rule that forwards every message, or every message containing “password” or “invoice”, to an outside address is a common leftover. So is a filter that deletes security alerts before you see them.
Look at recovery details. An added backup email or phone number lets the attacker reset the password again after you change it.
Look at connected apps and app passwords. OAuth apps that were granted access to your mail, drive or calendar keep working after a password change until you remove them. App passwords, which some services still offer for older mail clients, are the same.
On work accounts, look for registered two-factor devices and authenticator apps you don’t recognise, and for new API keys or access tokens in developer and cloud dashboards.
On social accounts, check for added admins on pages, new ad accounts, changes to payment methods, and messages sent from your account asking friends for money or codes.
Doing this once, carefully, is worth more than changing a hundred passwords in a panic. The point of the whole exercise is to leave the attacker with nothing that still works.
Work machines, personal browsing and the overlap
A lot of stealer damage to companies starts on a personal device, or on a work device used for personal things.
The common case is a laptop used for both. Someone signs into work tools in the same browser they use to download a game mod at the weekend. The stealer doesn’t distinguish between the two. It takes the work sessions along with everything else, and a buyer searching logs for a particular company’s single sign-on page finds an employee with a live session.
The reverse happens too. A work laptop with a synced browser profile pulls in personal saved passwords from home. When the work laptop gets infected, the personal accounts go with it.
If you have any say in how your devices are set up, keep work and personal browsing in separate browser profiles at the very least, and ideally on separate machines. It won’t stop an infection on either one, but it stops one infection from reaching both halves of your life.
If a work account might be involved, tell the IT or security team straight away, even if it’s embarrassing. They can revoke tokens and force sign-outs across every company system in one step, which is much faster than you working through them one by one. They can also check logs for what the session was used for, which you can’t. Waiting to see if anything happens is the one choice that reliably makes it worse.
Why the log keeps circulating
A stolen log doesn’t get used once and thrown away. That changes how long you need to stay alert after an infection.
Logs are resold. The first buyer might take the crypto wallet and the email session. The same log, or a copy of it, can then be sold again to someone who only cares about gaming accounts, or about company logins. Bulk packs of older logs get sold cheaply or given away as samples.
Cookies expire, and sessions you’ve explicitly ended are dead. But the saved passwords in the log stay useful for as long as you keep using them, anywhere. Autofill data, like your address and phone number, stays useful for phishing and impersonation more or less forever. That’s why the cleanup includes changing stored passwords even for accounts that showed no sign of misuse, and why a stealer infection is a good moment to move to unique passwords if you weren’t using them already.
It also means an alert can arrive months later, from an account you’d forgotten, when somebody finally gets round to that part of the log. If that happens, it’s usually the same old infection rather than a new one, and the same steps apply.
Reducing how much a stealer can take
You can’t make a stolen log worthless, but you can make it smaller and shorter-lived.
Keep fewer sessions alive. Signing out of accounts you rarely use, and not ticking “remember me” on sensitive services, means fewer live cookies sitting in the browser. Shorter session lifetimes on work accounts, set by an administrator, shrink the window further.
Use a separate browser profile for high-value accounts. If your banking and main email live in one profile and your everyday browsing, extensions and random sites live in another, a lot of risk stays apart. A stealer can still read both, so this is limited, but it cuts down on the extensions and the downloads that live alongside your valuable sessions.
Store passwords in a dedicated password manager rather than the browser’s built-in store, and lock it when you’re not using it. A locked vault is harder to scrape than a browser database, though an unlocked one on an infected machine is exposed.
Keep crypto keys off everyday machines. A hardware wallet means the key never sits on the computer for a stealer to copy.
None of these stop an infection. They reduce what one infection costs you.
What browsers and services are changing
The industry knows about this problem, and there are real efforts to close it, though none is complete.
The most promising idea is binding a session to the device. Instead of a cookie that works in any browser that presents it, the browser holds a private key that never leaves the machine, often protected by the security chip. The site periodically asks the browser to prove it has that key. A copied cookie without the key stops working quickly. Google has been developing this for Chrome under the name Device Bound Session Credentials, and it depends on websites adopting it too. Until your important services support something like it, cookies remain portable.
Services also watch for signs that a session has moved. If the same session suddenly appears from a different country or a very different browser, some sites end it or ask you to log in again. Attackers work to avoid those signals, so this is helpful rather than reliable.
On the operating system side, Windows and macOS have added protections for sensitive app data, and browsers have tightened how their own data is encrypted. Each step has made stealers work harder. None has ended the category.
Where antivirus fits
On a Windows computer, a current antivirus product, including the Microsoft Defender that ships with Windows, catches a lot of known stealer builds. That’s worth having, and there’s no reason to switch it off.
The limitation is timing. Stealer operators rebuild and repack their malware often so that fresh copies aren’t recognised. The fake verification trick, where you paste a command yourself, is designed to look like a legitimate action. And a stealer only needs to run once, for a few seconds, to do its damage. A detection an hour later still leaves you with the cleanup.
So antivirus is one layer. The more reliable layer is behaviour. Don’t run cracked software, key generators or cheat tools. Download programs from the developer’s own site, reached by typing the address or from a bookmark, rather than from a search ad. Never paste a command into Run, PowerShell or a terminal because a website told you to. Treat any “free beta” or “test my game” offer from a stranger as a likely stealer.
Macs aren’t exempt, whatever the old reputation says. Stealers built for macOS exist and are sold the same way, usually delivered as a fake installer for a popular app or a cracked copy of paid software. They commonly show a fake system dialog asking for your Mac password, then use it to unlock the keychain and browser data. macOS will warn you when you open an unsigned app from the internet, and it asks before an app reads certain protected folders. Those prompts are real protection, and stealers are designed to talk you past them. If a freshly downloaded app asks for your login password to “finish installing” and it isn’t coming from the system installer you expected, stop there.
If you’re setting up a computer for someone else, a standard non-administrator account won’t stop a stealer, since stealers run as the user. It does limit some of what malware can install.
How to tell if you’ve been caught
Stealer infections are often discovered through their effects rather than on the machine itself.
Signs include security alerts about logins or new devices you don’t recognise, especially several at once across different services. Friends getting strange messages from your accounts. Password reset emails you didn’t request. Crypto balances that moved. A work IT team contacting you about unusual activity from your account.
Some breach notification services now include data from stealer logs, and some companies monitor stealer markets for their own employees’ or customers’ credentials. If you get a notice saying your credentials appeared in a stealer log, take it more seriously than an ordinary breach notice. A breach at one company exposes what that company held. A stealer log means your own computer was the source, so everything on it may be affected.
If you remember running something odd in the days before, like a crack, a cheat, a pasted command or an unexpected attachment, that’s the likely starting point. Assume that machine is compromised until it’s been rebuilt.
I don’t have a reliable way to tell you how common infection is for any given person, and figures published about stealer volumes vary widely depending on who’s counting. What’s clear from how these tools are sold is that they’re cheap, widely used and aimed at ordinary machines, not just high-value targets.
The short version to keep
Your password and your two-factor protect the login. Your session cookie is what the login produces, and on a compromised computer, that cookie can be copied and used somewhere else without either check running again.
That shifts where to put your effort. Keep stealers off the machine by not running cracks, cheats, pasted commands and files from strangers. Keep fewer sessions alive, and keep valuable ones apart from everyday browsing. And if you’re ever caught, clean the machine and work from a clean device, end sessions before you change passwords, and remove whatever the attacker added before you call it done.
If you want more explainers that stay specific about what a defence covers and where it stops, the rest are on The Privacy Wire.