T1550.004 Google Chronicle · YARA-L

Detect Web Session Cookie in Google Chronicle

Adversaries steal and reuse valid web session cookies to authenticate to web applications and cloud services, effectively bypassing multi-factor authentication. Because session cookies represent a completed authentication event, they allow adversaries to impersonate users without knowing credentials or possessing their MFA device. Cookies are commonly obtained via adversary-in-the-middle (AiTM) phishing frameworks such as Evilginx2, Modlishka, or Muraena, which proxy the legitimate login flow and capture the post-MFA session token in real time. Once imported into an attacker-controlled browser or HTTP client, the stolen cookie grants full access to the victim's SaaS applications, cloud consoles, and email for the lifetime of the session. Star Blizzard (APT29 affiliate) has used this technique via EvilGinx to compromise email accounts protected by MFA.

MITRE ATT&CK

Tactic
Defense Evasion Lateral Movement
Technique
T1550 Use Alternate Authentication Material
Sub-technique
T1550.004 Web Session Cookie
Canonical reference
https://attack.mitre.org/techniques/T1550/004/

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule T1550_004_web_session_cookie_theft {
  meta:
    author = "Argus Detection Engineering"
    description = "Detects web session cookie theft and reuse — impossible travel or MFA bypass via stolen session cookie on Microsoft 365/Azure services (T1550.004). Covers AiTM phishing kits including Evilginx2, Modlishka, Muraena used by Star Blizzard/APT29."
    severity = "HIGH"
    priority = "HIGH"
    mitre_attack_tactic = "Lateral Movement"
    mitre_attack_technique = "T1550.004"
    reference = "https://attack.mitre.org/techniques/T1550/004/"
    version = "1.0"

  events:
    $signin1.metadata.event_type = "USER_LOGIN"
    $signin1.metadata.product_name = "Azure Active Directory"
    $signin1.security_result.action = "ALLOW"
    $signin1.principal.user.userid = $user
    $signin1.principal.location.country_or_region = $country1
    $signin1.network.ip_protocol = "TCP"

    $signin2.metadata.event_type = "USER_LOGIN"
    $signin2.metadata.product_name = "Azure Active Directory"
    $signin2.security_result.action = "ALLOW"
    $signin2.principal.user.userid = $user
    $signin2.principal.location.country_or_region = $country2

    // Impossible travel: different countries, same user, within 60 minutes
    $country1 != $country2
    $signin1.metadata.event_timestamp.seconds < $signin2.metadata.event_timestamp.seconds
    ($signin2.metadata.event_timestamp.seconds - $signin1.metadata.event_timestamp.seconds) < 3600

  match:
    $user over 1h

  condition:
    $signin1 and $signin2
}

rule T1550_004_mfa_bypass_cookie_reuse {
  meta:
    author = "Argus Detection Engineering"
    description = "Detects MFA bypass via session cookie reuse — single factor authentication completion on Microsoft 365/Azure workloads where authentication was satisfied by an existing token or cookie, indicating stolen session cookie replay (T1550.004)."
    severity = "HIGH"
    priority = "HIGH"
    mitre_attack_tactic = "Lateral Movement"
    mitre_attack_technique = "T1550.004"
    reference = "https://attack.mitre.org/techniques/T1550/004/"
    version = "1.0"

  events:
    $e.metadata.event_type = "USER_LOGIN"
    $e.metadata.product_name = "Azure Active Directory"
    $e.security_result.action = "ALLOW"
    $e.principal.user.userid = $user
    // Single factor authentication requirement
    $e.extensions.auth.auth_details = "singleFactorAuthentication"
    // Cookie or token broker satisfaction
    (
      re.regex($e.security_result.description, `(?i)(previously satisfied|token broker|existing token)`) or
      re.regex($e.target.application, `(?i)(microsoft 365|office 365|azure portal|microsoft teams|sharepoint|onedrive|exchange|outlook)`)
    )

  match:
    $user over 1h

  condition:
    #e >= 1
}
high severity medium confidence

Two Chronicle YARA-L 2.0 rules detecting T1550.004 web session cookie theft. The first rule (T1550_004_web_session_cookie_theft) uses sequence correlation to detect impossible travel — the same Azure AD user successfully authenticating from two different countries within a 60-minute window, a hallmark of AiTM cookie replay. The second rule (T1550_004_mfa_bypass_cookie_reuse) detects single-factor authentication completions on Microsoft 365 workloads where the auth step was satisfied by an existing token, indicating imported stolen cookie use. Both rules target UDM USER_LOGIN events from Azure Active Directory.

Data Sources

Azure Active Directory via Google Chronicle IngestionMicrosoft Azure Identity Logs (UDM normalized)

Required Tables

USER_LOGIN UDM eventsAzure Active Directory log feed

False Positives & Tuning

  • Primary refresh token (PRT) usage by Hybrid Azure AD joined devices where sign-in completes via the PRT mechanism, which Chronicle may normalize as token broker or existing token satisfaction
  • Global users with Microsoft 365 licenses accessing services while traveling internationally, where the IP geolocation differs from their registered country, particularly for employees on back-to-back international flights using airline Wi-Fi
  • Federated identity providers or SAML-based SSO integrations where the authentication token is issued by a third-party IdP and passed to Azure AD, appearing as an existing token satisfaction rather than interactive MFA
Download portable Sigma rule (.yml)

Other platforms for T1550.004


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Extract Chrome Session Cookies Using SQLite (Windows)

    Expected signal: Sysmon Event ID 11 (File Create): Target image %TEMP%\stolen_cookies.db created by cmd.exe or powershell.exe. Sysmon Event ID 1 (Process Create): powershell.exe with CommandLine referencing 'SQLiteConnection' and 'Cookies'. Sysmon Event ID 10 (Process Access): If Chrome is running, file access conflict may be logged. Security Event ID 4663 if file auditing is enabled on Chrome profile directories.

  2. Test 2Replay Stolen Session Cookie via Python Requests

    Expected signal: Network connection from python3 to httpbin.org on port 443. Linux audit log (auditd): SYSCALL record for socket/connect from python3 process. Syslog/EDR network telemetry showing python3 making outbound HTTPS connections with cookie headers in the User-Agent matching Windows browser patterns (OS mismatch indicator).

  3. Test 3Import Cookie to Browser via EditThisCookie and Access Authenticated Session

    Expected signal: Sysmon Event ID 1: python3.exe or playwright process spawned with CDP flags. Sysmon Event ID 3: Network connection from chromium subprocess to httpbin.org on port 443. Sysmon Event ID 23 (File Delete) or 11 (File Create) for Playwright browser cache. Security Event ID 4688 if process creation auditing enabled.

  4. Test 4Simulate AiTM Cookie Theft Detection via Impossible Travel Pattern

    Expected signal: Azure AD Sign-in Logs (SigninLogs): Two non-interactive token use events for the authenticated user against Microsoft Graph within seconds. OfficeActivity or CloudAppEvents: MailItemsAccessed or ListMessages operation from the Graph API call. Azure AD audit logs: Token issued and used for mail access.

Unlock Pro Content

Get the full detection package for T1550.004 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections