Session replay is now a mainstream path from a single compromised endpoint to full cloud identity compromise. "Infostealer" infections increasingly act as the initial credential and session token theft layer, feeding an ecosystem of access brokers and follow-on operators.
In parallel, adversary-in-the-middle (AiTM) phishing has matured into a Phishing-as-a-Service market. A recent Microsoft case study shows why this matters operationally: AiTM compromises require remediation far beyond standard identity compromise responses. Password resets alone do not evict stolen sessions. Defenders must actively revoke session cookies and remove attacker persistence, such as malicious inbox rules.
The Current Threat Landscape
Infostealer-driven credential theft is an access supply chain. Microsoft's Digital Defense Report notes that commodity stealers like Lumma are deployed explicitly to harvest credentials and hijack sessions. Industry disruption data illustrates the massive scale of this problem, with hundreds of thousands of infected machines observed in just a two-month window.
The operational tempo is what makes this so dangerous. CrowdStrike reports that the average breakout time for eCrime in 2024 was 48 minutes, with the fastest recorded breakout at just 51 seconds. Even with excellent instrumentation, the loop to detect and revoke sessions must run in minutes if you want to stop a cloud identity compromise before the attacker converts their access into permanent control.
Mapping the Attack Chain
A key modeling mistake is treating "endpoint malware" and "cloud takeover" as separate incidents. In practice, they are a single chain held together by replayable authentication artifacts like browser cookies, OAuth refresh tokens, and Cloud SSO artifacts.
A typical cloud takeover execution flow looks like this:
- Initial Access: The user triggers an infection via malvertising, a malicious attachment, or a fake update.
- Harvesting: The infostealer reads browser profile stores (cookies, saved logins) and bypasses OS secret storage (like Windows DPAPI or macOS Keychain) to decrypt them.
- Exfiltration: The stolen "log" bundle is sent to the attacker.
- Session Replay: The attacker imports the stolen cookie or refresh token into their own browser and replays it from a new IP, ASN, or device.
- Privilege Conversion: The attacker uses the hijacked session to add new MFA methods, grant app consent, modify IAM roles, or create mailbox rules to maintain access even if the original session is eventually revoked.
Telemetry and Detection Correlation
Breaking session replay chains requires correlating data across three distinct planes: the endpoint, the identity provider, and the cloud control plane. You do not need to collect everything, but you must collect enough linkable identifiers to prove a token was stolen and reused.
1. Endpoint Telemetry (Token Theft Precursors)
You generally cannot see the stolen token value, but you can see the behaviors required to steal it. High-fidelity endpoint alerts should trigger when non-browser background processes attempt to access browser cookie databases or login stores. Stealers will also commonly combine this with OS keychain and wallet access to decrypt the payloads, creating a highly suspicious sequence of local events.
2. Identity Provider Telemetry (Session Replay)
Identity logs, such as Microsoft Entra's SigninLogs, are crucial. You are looking for identical session identifiers behaving impossibly. Strong detection logic should flag:
- The exact same
UniqueTokenIdentifierredeemed from completely different Autonomous System Numbers (ASNs) within a 10-minute window. - The exact same
SessionIdobserved authenticating from multiple countries within a 15-minute window. - Token replay events where token protection (device binding) was expected by your policy but absent in the request.
3. Cloud Audit Telemetry (Conversion and Persistence)
The actual replay login might look subtle, but what the attacker does next is usually very loud. Use AWS CloudTrail or GCP Cloud Audit Logs to correlate suspicious logins with immediate administrative actions. Look for a console login from a new ASN followed within 30 minutes by role assignments, key creation, OAuth app grants, or bulk mailbox rule creation.
How to Break the Chain
Hardening your environment requires reducing how easily sessions can be replayed and shrinking their lifespan, all while maintaining a usable experience for employees.
- Make Sessions Un-Replayable: Implement device-bound tokens. Mechanisms like Microsoft Entra token protection or Google Chrome's Device Bound Session Credentials (DBSC) ensure that refresh tokens are cryptographically bound to a specific physical device. If an attacker steals a device-bound token and tries to use it on their own machine, the request will fail.
- Reduce Session Half-Life: Do not rely on default 90-day refresh token lifetimes. Use conditional access to tighten sign-in frequencies for privileged roles and high-risk applications.
- Automate Revocation: Manual response does not meet attacker timelines. Connect your identity replay detections directly to your SOAR system. When a high-confidence replay alert fires, the system should automatically execute scripts (like
revokeSignInSessionsin Entra orusers.signOutin Workspace) to instantly invalidate all active sessions and cookies for that user.
Contact us today to harden your identity infrastructure, build robust detection playbooks, and stop infostealer infections from becoming full cloud takeovers.
