Steal Web Session Cookie
An adversary may steal web application or service session cookies and use them to gain access to web applications or Internet services as an authenticated user without needing credentials. Web applications and services often use session cookies as an authentication token after a user has authenticated to a website. Cookies are often valid for an extended period of time, even if the web application is not actively used. Session cookies can be found on disk in browser profile directories (SQLite databases), in the process memory of the browser, and in network traffic to remote systems. Tools such as Evilginx2 and Muraena act as adversary-in-the-middle proxies to capture session cookies from victims directed to phishing domains without the victim's endpoint ever being directly compromised. Malware families including Raccoon Stealer, QakBot, Spica, CookieMiner, Grandoreiro, and EVILNUM specifically target browser cookie stores for theft. Stolen session cookies can bypass multi-factor authentication by reusing authenticated sessions, enabling account takeover without requiring credentials.
let LegitBrowserProcesses = dynamic([
"chrome.exe", "msedge.exe", "firefox.exe", "brave.exe",
"opera.exe", "vivaldi.exe", "chromium.exe", "msedgewebview2.exe",
"whale.exe", "iexplore.exe"
]);
let SystemAllowList = dynamic([
"SearchIndexer.exe", "MsMpEng.exe", "SgrmBroker.exe",
"backgroundTaskHost.exe", "WerFault.exe", "svchost.exe",
"TiWorker.exe", "TrustedInstaller.exe"
]);
// Primary: Non-browser process accessing browser cookie stores on disk
DeviceFileEvents
| where Timestamp > ago(24h)
| where (
FolderPath contains "Chrome\User Data"
or FolderPath contains "Edge\User Data"
or FolderPath contains "Firefox\Profiles"
or FolderPath contains "BraveSoftware\Brave-Browser"
or FolderPath contains "Opera Software\Opera Stable"
or FolderPath contains "Vivaldi\User Data"
)
| where FileName =~ "Cookies"
or FileName =~ "cookies.sqlite"
or FileName =~ "cookies.sqlite-wal"
or (FileName =~ "Local State" and FolderPath contains "User Data")
or FileName =~ "Login Data"
| where not (InitiatingProcessFileName in~ (LegitBrowserProcesses))
| where not (InitiatingProcessFileName in~ (SystemAllowList))
| extend AccountName = coalesce(RequestAccountName, InitiatingProcessAccountName)
| extend SuspicionReason = case(
FileName =~ "Local State",
"Chrome/Edge master encryption key (DPAPI-wrapped AES) accessed by non-browser process",
FileName =~ "Login Data",
"Browser saved credentials database accessed alongside cookie store — bulk stealer pattern",
FileName =~ "cookies.sqlite" or FileName =~ "cookies.sqlite-wal",
"Firefox cookie SQLite database accessed by non-browser process",
"Browser Cookies file accessed by non-browser process"
)
| extend IsScriptHost = InitiatingProcessFileName in~ ("powershell.exe", "pwsh.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe")
| extend IsCommonStealer = InitiatingProcessFileName in~ ("python.exe", "python3.exe", "node.exe", "ruby.exe", "perl.exe", "sqlite3.exe")
| project Timestamp, DeviceName, AccountName,
FileName, FolderPath, ActionType,
InitiatingProcessFileName, InitiatingProcessCommandLine,
InitiatingProcessParentFileName, SuspicionReason,
IsScriptHost, IsCommonStealer
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- Enterprise backup agents (Acronis, Commvault, Veeam) reading browser profile directories as part of user data backup — typically run under service accounts from known backup process names
- IT asset management or software inventory agents (SCCM, Tanium) enumerating browser profile directories to report installed browser versions
- Endpoint DLP solutions that monitor file access patterns for sensitive data leaving the browser profile directory
- Browser profile migration or sync utilities (e.g., migration tools used during workstation refresh) that legitimately copy cookie stores between profiles
- Anti-malware scanners performing scheduled or on-demand scans of browser profile directories for known malware signatures
- Developer tooling performing automated browser testing (Selenium WebDriver, Playwright) that may read or write browser profile data
References (10)
- https://attack.mitre.org/techniques/T1539/
- https://wunderwuzzi23.github.io/blog/passthecookie.html
- https://github.com/kgretzky/evilginx2
- https://github.com/muraenateam/muraena
- https://unit42.paloaltonetworks.com/mac-malware-steals-cryptocurrency-exchanges-cookies/
- https://securelist.com/project-tajmahal/90240/
- https://krebsonsecurity.com/2023/05/discord-admins-hacked-by-malicious-bookmarks/
- https://blog.talosintelligence.com/roblox-scam-overview/
- https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/advanced-hunting-devicefileevents-table
- https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/signinlogs
Unlock Pro Content
Get the full detection package for T1539 including response playbook, investigation guide, and atomic red team tests.