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. Cookies can be found on disk, in the process memory of the browser, and in network traffic to remote systems. Additionally, other applications on the targets machine might store sensitive authentication cookies in memory (e.g. apps which authenticate to cloud services). Session cookies can be used to bypasses some multi-factor authentication protocols.[1]
There are several examples of malware targeting cookies from web browsers on the local system.[2][3] Adversaries may also steal cookies by injecting malicious JavaScript content into websites or relying on User Execution by tricking victims into running malicious JavaScript in their browser.[4][5]
There are also open source frameworks such as Evilginx2
and Muraena
that can gather session cookies through a malicious proxy (e.g., Adversary-in-the-Middle) that can be set up by an adversary and used in phishing campaigns.[6][7]
After an adversary acquires a valid cookie, they can then perform a Web Session Cookie technique to login to the corresponding web application.
ID | Name | Description |
---|---|---|
S0657 | BLUELIGHT |
BLUELIGHT can harvest cookies from Internet Explorer, Edge, Chrome, and Naver Whale browsers.[8] |
S0631 | Chaes |
Chaes has used a script that extracts the web session cookie and sends it to the C2 server.[9] |
S0492 | CookieMiner |
CookieMiner can steal Google Chrome and Apple Safari browser cookies from the victim’s machine. [10] |
S0568 | EVILNUM |
EVILNUM can harvest cookies and upload them to the C2 server.[11] |
G0120 | Evilnum |
Evilnum can steal cookies and session information from browsers.[12] |
S0531 | Grandoreiro |
Grandoreiro can steal the victim's cookies to use for duplicating the active session from another device.[13] |
G1014 | LuminousMoth |
LuminousMoth has used an unnamed post-exploitation tool to steal cookies from the Chrome browser.[14] |
S1146 | MgBot |
MgBot includes modules that can steal cookies from Firefox, Chrome, and Edge web browsers.[15] |
S0650 | QakBot |
QakBot has the ability to capture web session cookies.[16][17] |
S1148 | Raccoon Stealer |
Raccoon Stealer attempts to steal cookies and related information in browser history.[18] |
G0034 | Sandworm Team |
Sandworm Team used information stealer malware to collect browser session cookies.[19] |
G1015 | Scattered Spider |
Scattered Spider retrieves browser cookies via Raccoon Stealer.[20] |
C0024 | SolarWinds Compromise |
During the SolarWinds Compromise, APT29 stole Chrome browser cookies by copying the Chrome profile directories of targeted users.[21] |
S1140 | Spica |
Spica has the ability to steal cookies from Chrome, Firefox, Opera, and Edge browsers.[22] |
G1033 | Star Blizzard |
Star Blizzard has used EvilGinx to steal the session cookies of victims directed to phishing domains.[23] |
S0467 | TajMahal |
TajMahal has the ability to steal web session cookies from Internet Explorer, Netscape Navigator, FireFox and RealNetworks applications.[2] |
S0658 | XCSSET |
XCSSET uses |
ID | Mitigation | Description |
---|---|---|
M1047 | Audit |
Implement auditing for authentication activities and user logins to detect the use of stolen session cookies. Monitor for impossible travel scenarios and anomalous behavior that could indicate the use of compromised session tokens or cookies. |
M1032 | Multi-factor Authentication |
A physical second factor key that uses the target login domain as part of the negotiation protocol will prevent session cookie theft through proxy methods.[25] Implement Conditional Access policies with Token Protection to bind session tokens to their originating device and user. This reduces the risk of session cookie theft by ensuring that stolen tokens cannot be reused from unauthorized locations or devices. |
M1021 | Restrict Web-Based Content |
Restrict or block web-based content that could be used to extract session cookies or credentials stored in browsers. Use browser security settings, such as disabling third-party cookies and restricting browser extensions, to limit the attack surface. |
M1054 | Software Configuration |
Configure browsers or tasks to regularly delete persistent cookies. Additionally, minimize the length of time a web cookie is viable to potentially reduce the impact of stolen cookies while also increasing the needed frequency of cookie theft attempts – providing defenders with additional chances at detection.[26] For example, use non-persistent cookies to limit the duration a session ID will remain on the web client cache where an attacker could obtain it.[27] |
M1051 | Update Software |
Regularly update web browsers, password managers, and all related software to the latest versions. Keeping software up-to-date reduces the risk of vulnerabilities being exploited by attackers to extract stored credentials or session cookies. |
M1017 | User Training |
Train users to identify aspects of phishing attempts where they're asked to enter credentials into a site that has the incorrect domain for the application they are logging into. Additionally, train users not to run untrusted JavaScript in their browser, such as by copying and pasting code or dragging and dropping bookmarklets. |
ID | Data Source | Data Component | Detects |
---|---|---|---|
DS0022 | File | File Access |
Monitor for an attempt by a user to gain access to a network or computing resource, often by providing credentials to cloud service management consoles. Some cloud providers, such as AWS, provide distinct log events for login attempts to the management console. Analytic 1 - Unexpected access to web session cookies files.
|
DS0009 | Process | Process Access |
Monitor for attempts by programs to inject into or dump browser process memory. Analytic 1 - Unauthorized access or injection into browser processes.
|