A staff laptop turns out to be infected with an infostealer. You reset that person's passwords, and the next day the same account is still changing settings or sending mail nobody wrote. The usual question at that point is whether you should have reset the password or revoked sessions first. Stealers like RedLine and Raccoon collect saved passwords and active session cookies together, so a reset by itself often doesn't end the attacker's access. This walkthrough starts from that symptom, traces it through the logs, and ends with how to confirm that the stolen tokens no longer work.
Access continues after the password changed
The pattern is easy to recognize once you've seen it. The account owner confirms they changed the password. You can see the password change event in the audit log. Yet actions keep appearing under that account: a new mail forwarding rule, a plugin installed in WordPress, a file changed through the control panel, a new API key created.
The first thing to check is whether those actions come with a fresh login. Look at the authentication log for the account and line it up against the activity log. If the suspicious activity follows a successful login that used the new password, the attacker has the new password, probably because the machine used for the reset is still infected. If the activity continues with no new login at all, the attacker is riding a session that existed before the reset.
These two cases need different fixes, and the logs usually tell you which one you're in within a few minutes.
Why a new password doesn't end an existing session
When you log in to a web app, the server checks your password once and then hands your browser a session cookie or token. From then on, the browser sends that cookie with each request, and the server trusts the cookie instead of asking for the password again. A session cookie works like a temporary pass that stands in for your password.
An infostealer is malware that copies data from the browser's credential stores. According to SentinelOne's overview of infostealers, these tools often harvest active session cookies, authentication tokens, and autofill data along with stored usernames and passwords. An attacker who loads a stolen cookie into their own browser looks like the logged-in user to the server.
Changing the password updates the stored credential. Whether existing sessions are also killed depends on the application. Some apps end every session on a password change, some end only sessions on other devices, and some don't touch sessions at all. Brandefense's guide on responding to stealer log exposure states it directly: changing a password leaves existing sessions valid when they are tied to stolen cookies. Druva's write-up on infostealers reaches the same conclusion: a password reset alone is not enough.
The same logic applies outside the browser. On a typical Linux server, changing a user's password does not disconnect SSH sessions that are already open, and it does nothing to keys the attacker may have added to ~/.ssh/authorized_keys.
Red herrings that slow the investigation
"MFA was enabled, so it can't be stolen credentials." Multi-factor authentication (MFA) is checked at login. A stolen session cookie was issued after MFA already passed, so the attacker never sees an MFA prompt. Both the Brandefense and Hylant pieces in the sources note that stolen session tokens can bypass MFA entirely. MFA still matters, because it stops the attacker from using the stolen password to start new sessions. It just doesn't help with sessions that already exist.
"There are no failed logins, so nobody is attacking." Session reuse produces no login events, failed or successful. If you only search authentication logs, you will miss it. Search activity logs instead: settings changes, file edits, mail rules, token creation.
"The IP address is local, so it's probably the user." Attackers often route traffic through residential proxies or VPS providers in the same country. Treat an unfamiliar IP or user agent as a lead. Don't rule activity out because the IP looks local.
"We reset it, so the incident is closed." A reset done from the infected laptop hands the new password straight to the stealer. Reset only from a device you trust, which the Brandefense guide also calls out.
The order that closes both doors
The question of resetting first or revoking first has a practical answer: do both in the same sitting, from a clean device, after the infected machine is off the network. The two steps fail in different ways if you split them:
- If you reset first and revoke later, the attacker keeps working through the old session in the gap.
- If you revoke first and reset later, the attacker logs back in with the stolen password, and passes MFA too if they captured a backup code or the factor is weak.
A workable sequence:
- Isolate the infected device. Disconnect it from the network so it stops sending fresh credentials to the attacker. Don't wipe it yet if you need it for forensics.
- Move to a clean machine. Use a device that has not been used by the affected person and is not on the same compromised profile.
- Reset the password for each account the stealer could have captured. That means every saved browser password, not only the main work login.
- Immediately revoke all sessions and tokens for those accounts: web sessions, refresh tokens, app passwords, API keys, and SSH keys.
- Review persistence the attacker may have added while they had access: mail forwarding rules, new admin users, OAuth app grants, cron jobs, and authorized_keys entries.
- Re-check MFA enrollment. Remove any factor the user doesn't recognize and re-enroll. The research context recommends phishing-resistant MFA for privileged accounts.
For privileged accounts such as domain admins and service accounts, the research context recommends a global reset with revocation of all active session tokens. That's more disruptive, but a stealer on one admin's laptop can expose credentials for systems that person only touched once.
In hosting environments, the sessions most often missed are the control panel, the WordPress admin, the webmail client, and the registrar or DNS account. Each one has its own session store, and resetting one doesn't touch the others. How cPanel and WHM handle existing sessions after a password change can vary by version, so check the documentation for yours. Don't assume.
For WordPress, WP-CLI can list and destroy a user's sessions directly:
# Show active sessions for a user (read-only)
wp user session list 'admin-username'
# End every session for that user
wp user session destroy 'admin-username' --all
If you can't tell which WordPress users were exposed, you can rotate the authentication keys and salts in wp-config.php. On core WordPress authentication, this invalidates every login cookie for every user. Warning: everyone gets logged out, including legitimate admins, so plan for that before you do it.
On a Linux server, check for open sessions belonging to the affected user before and after the reset:
# Who is logged in right now, with idle time and PID
who -u
# Recent logins with source IPs
last -i | head -n 20
# systemd login sessions, where available
loginctl list-sessions
If an attacker session appears, end it, then check that user's ~/.ssh/authorized_keys for keys nobody recognizes.
Confirming stolen tokens no longer work
You rarely have the attacker's copy of the cookie, so you need indirect checks.
Test revocation with a session you control. Before revoking, log in to the same account from a separate test browser and leave that session open. After revocation, reload a page in the test browser. If the app still shows you as logged in, revocation didn't cover that session type, and the attacker's stolen cookie probably still works too.
Watch the activity log after the revocation time. Note the exact time you revoked. Any action on the account after that, from an IP or user agent that isn't the legitimate user on a clean device, means something is still valid. That could be an app password, an API key, an OAuth grant, or a session type the revocation missed.
Check the session list in each system. Most identity providers and many apps show active sessions per user. After revocation, the only entries should be the ones you just created from the clean machine.
Account for token lifetime. Some systems issue short-lived access tokens alongside longer-lived refresh tokens. Revoking the refresh token stops new access tokens from being issued, but an access token that was already issued may keep working until it expires. How long that window lasts depends on your provider's settings, so check them and keep monitoring through at least one full token lifetime.
If activity stops after revocation and stays stopped, the stolen tokens are dead. The next question is whether the attacker used that window to move somewhere else, which this article on checking for lateral movement after a credential reset covers.
The practical rule for infostealer cases: treat passwords and sessions as two separate credentials that were stolen together. Isolate the infected machine, move to a clean device, then reset and revoke in the same sitting. Close the incident only after a session you control has been rejected and the activity log shows nothing new from the attacker.