
Securing Serverless Architectures from Event-Driven Attacks
October 20, 2026A single stolen session cookie bypassed multi-factor authentication at a Fortune 500 financial firm in 2025, granting attackers lateral access to 14 internal systems before any alert fired. No password was cracked. No zero-day was exploited. The attacker simply replayed a browser token harvested from a compromised endpoint — a technique that has become the preferred entry vector for nation-state actors and ransomware operators targeting hybrid cloud environments alike.
Pass-the-Cookie (PtC) and Pass-the-Hash (PtH) attacks share a common philosophical premise: why break a lock when you can steal the key? Both techniques exploit authentication artifacts — session tokens and NTLM credential hashes respectively — rather than attempting to compromise plaintext credentials. In hybrid environments where on-premises Active Directory federates with cloud identity providers like Azure AD or Okta, the attack surface expands dramatically. A hash stolen from a domain controller in your datacenter can unlock cloud resources. A cookie swiped from a developer’s browser can grant access to production SaaS applications that store your most sensitive customer data.
This post provides a technically precise, operationally actionable framework for defending against both attack families in the context of hybrid infrastructure — covering detection engineering, architectural controls, and identity governance strategies that security teams can deploy today.
Understanding the Mechanics: What Makes These Attacks So Effective
Before deploying countermeasures, security architects must understand exactly what defenders are up against. The effectiveness of PtC and PtH attacks stems from their exploitation of legitimate authentication protocols — meaning most perimeter security tools are architecturally blind to them.
Pass-the-Hash: Exploiting NTLM’s Structural Flaw
NTLM (NT LAN Manager) authentication, still widely deployed in enterprise Windows environments for legacy compatibility, does not require a plaintext password to authenticate. The protocol accepts the hash itself as proof of identity. When an attacker — through privilege escalation, a memory dump via tools like Mimikatz, or exploitation of a vulnerable service — extracts NTLM hashes from the Local Security Authority Subsystem Service (LSASS) process memory, they possess everything needed to authenticate as that user across any NTLM-reliant service.
The 2023 MOVEit Transfer breach demonstrated a variant of this pattern at scale. While the initial vector was a SQL injection vulnerability, post-exploitation lateral movement by the Cl0p ransomware group relied heavily on credential hash harvesting to traverse hybrid networks — moving from on-premises endpoints into cloud-adjacent systems with minimal friction. According to IBM’s 2025 Cost of a Data Breach Report, credential-based attacks now account for 31% of all breaches, with mean time to identify exceeding 197 days.
Pass-the-Cookie: The Cloud-Era Evolution
Pass-the-Cookie represents the modern adaptation of session hijacking for a cloud-native authentication model. When a user authenticates to an identity provider — Microsoft Entra ID, Okta, Google Workspace — the IdP issues a session token (often a JSON Web Token or an OAuth refresh token) stored as a browser cookie. This token encodes the authentication context, including any MFA verification that occurred.
Critically, stealing and replaying this cookie bypasses MFA entirely, because the MFA challenge was already satisfied during the original authentication. Adversary-in-the-Middle (AiTM) phishing frameworks like Evilginx3 and Modlishka act as reverse proxies, sitting between the victim and the legitimate IdP to harvest both credentials and session cookies in real time. Microsoft’s Digital Defense Report 2025 documented a 147% year-over-year increase in AiTM phishing campaigns, with 78% specifically targeting hybrid or multi-cloud environments.
The Hybrid Environment Attack Surface: Why Traditional Defenses Fail
The hybrid architecture — on-premises Active Directory synchronized with cloud identity providers via tools like Microsoft Entra Connect (formerly Azure AD Connect) — creates an identity bridge that attackers exploit with surgical precision. The problem isn’t just that two authentication systems coexist; it’s that trust relationships established for operational convenience become lateral movement highways in the hands of a competent adversary.
Identity Synchronization as an Attack Vector
The MSOL service account created by Entra Connect operates with significant privileges in both on-premises AD and Azure AD. In 2021, the Solorigate/SUNBURST attackers leveraged this exact account type to forge SAML tokens — demonstrating that identity synchronization infrastructure is a high-value target. When a PtH attack compromises the Entra Connect server, the blast radius extends instantly into cloud workloads.
Token theft in hybrid environments also benefits from the token longevity problem. Azure AD refresh tokens can have lifetimes of 90 days by default. An AiTM campaign that harvests a refresh token on October 20, 2026 may still provide valid cloud access well into January 2027 — unless token revocation is actively enforced and monitored.
Lateral Movement Across Trust Boundaries
A sophisticated attacker who executes a successful PtH attack against a domain-joined workstation doesn’t stop at lateral movement within the on-premises network. Modern attack chains enumerate Azure AD-joined devices, managed identities assigned to Azure VMs, and service principals with excessive permissions. Tools like ROADtools and AADInternals are purpose-built for this exact enumeration in post-compromise scenarios. The pivot from a stolen NTLM hash to unauthorized access to Azure Blob Storage, SharePoint Online, or GitHub Actions pipelines is documented in multiple 2025 threat intelligence reports from CrowdStrike and Mandiant.
Architectural Controls: Building Credential Theft Resistance
Defensive architecture against PtC and PtH attacks operates across three layers: reducing the attack surface, containing the blast radius, and accelerating detection. No single control is sufficient; defense-in-depth is not a platitude here but a technical necessity.
Eliminating NTLM Dependency and Hardening Credential Storage
The most impactful architectural change for PtH defense is eliminating NTLM where Kerberos can be used instead. Microsoft’s Active Directory security baseline recommends restricting NTLM authentication network-wide via Group Policy (Network Security: Restrict NTLM). For environments that cannot fully eliminate NTLM, enforce NTLM auditing first — log all NTLM authentication events in Event ID 4776 — to identify dependencies before blocking.
For LSASS memory protection, enforce the following controls in combination:
- Windows Credential Guard: Uses virtualization-based security (VBS) to isolate LSASS in a secure hypervisor-protected environment, preventing Mimikatz-style memory extraction even with local admin privileges.
- Protected Users Security Group: Prevents members from using NTLM, DES, or RC4 encryption, and disables credential caching on the endpoint — ensuring that even a compromised machine cannot yield reusable hashes.
- Local Administrator Password Solution (LAPS): Randomizes and rotates local admin passwords across all domain-joined endpoints, eliminating the PtH technique of using a harvested local admin hash laterally across machines with shared passwords.
- Attack Surface Reduction (ASR) Rules: Microsoft Defender’s ASR rule “Block credential stealing from the Windows local security authority subsystem” directly targets LSASS dumping behavior via EDR telemetry.
Session Token Binding and Lifetime Management for Cloud Access
Against Pass-the-Cookie attacks, the primary architectural defense is making stolen tokens non-replayable. Microsoft Entra ID supports Continuous Access Evaluation (CAE), which enables near-real-time token revocation based on signals like user location changes, device compliance status changes, or explicit admin revocation. When CAE is enforced, a stolen cookie that suddenly appears from a different IP geolocation triggers an immediate re-authentication challenge — eliminating the attacker’s session within seconds rather than days.
Complementary controls include:
- Token binding: Cryptographically binds access tokens to the TLS session in which they were issued, making them non-transferable to a different client. While browser support varies, this is approaching production readiness in Chromium-based browsers.
- Conditional Access policies with device compliance enforcement: Require that cloud resource access originate from Intune-compliant, Entra-joined devices. A stolen cookie replayed from an attacker’s unmanaged device fails device compliance checks.
- Sign-in frequency and persistent browser session policies: Configure Conditional Access to require re-authentication after defined periods for sensitive applications, reducing the effective window of a stolen session token.
Detection Engineering: Building Behavioral Tripwires
Architectural controls reduce risk but cannot eliminate it. Detection engineering — building SIEM queries, behavioral analytics, and alerting logic specifically tuned for PtC and PtH behavioral signatures — is the essential complement to preventive controls.
Detecting Pass-the-Hash Indicators in Windows Event Logs
PtH attacks leave distinctive forensic footprints when Windows auditing is properly configured. Security teams should build detection rules targeting the following event combinations:
| Event ID | Description | PtH Relevance |
|---|---|---|
| 4624 | Successful logon | Logon Type 3 (Network) with NTLM authentication from an unexpected source |
| 4776 | NTLM credential validation | Validate at domain controller; baseline and alert on anomalous source workstations |
| 4648 | Logon using explicit credentials | Indicates RunAs or over-pass-the-hash techniques for Kerberos ticket acquisition |
| 10 (Sysmon) | Process access | LSASS memory access from non-standard processes; critical for detecting dumping tools |
The correlation logic that matters: a single high-privilege account authenticating via NTLM from three or more distinct workstations within a 30-minute window is a near-definitive PtH indicator. Microsoft Sentinel’s UEBA engine and Splunk’s Security Essentials both ship with detection rules tuned to this pattern.
Detecting Session Cookie Theft and AiTM Phishing
For Pass-the-Cookie detection, the behavioral signal is session context discontinuity — authentication signals that don’t cohere with a legitimate user session. Key detection vectors include:
- Impossible travel alerts: Microsoft Entra ID Identity Protection surfaces sign-ins from geographically impossible locations relative to prior authentication events. Tune thresholds carefully to reduce false positives for VPN users.
- User agent and device fingerprint mismatches: A session token issued to Chrome on Windows that suddenly appears with a Linux user agent is a high-confidence cookie theft indicator. Log and alert on these transitions in your CASB or identity provider logs.
- Unfamiliar sign-in properties: Track IP reputation, ASN ownership (legitimate users rarely authenticate from datacenter IPs), and browser/OS combinations against historical baselines per user.
- Token issuance anomalies: Monitor Azure AD audit logs for unusual OAuth refresh token grants — specifically, refresh tokens issued to applications that the user has not previously consented to.
Privileged Identity Governance: Reducing the High-Value Target Profile
Even with detection controls in place, attackers who successfully execute PtH or PtC attacks on highly privileged accounts can cause catastrophic damage before detection. The principle of least privilege, applied with engineering precision rather than as a checkbox exercise, dramatically reduces the blast radius of any credential theft event.
Tiered Administration and Privileged Access Workstations
Microsoft’s Enterprise Access Model (successor to the legacy three-tier model) provides a practical framework for credential isolation in hybrid environments. The core principle: administrative credentials for Tier 0 assets (domain controllers, Entra ID tenant, identity infrastructure) should never touch Tier 1 or Tier 2 systems. A Domain Admin account that is also used to browse the web or read email is not a Tier 0 account; it is a ticking timer.
Privileged Access Workstations (PAWs) — hardened, dedicated devices used exclusively for administrative tasks — prevent credential exposure to commodity malware running on general-purpose endpoints. PAW deployment, combined with Microsoft Entra Privileged Identity Management (PIM) for just-in-time role activation, means that most privileged accounts have no persistent assignments to exploit. In the 2024 Verizon DBIR, organizations with mature PAM implementations experienced 68% fewer lateral movement events following initial compromise.
Securing Service Accounts and Managed Identities
Service accounts represent an often-overlooked attack surface for PtH. Legacy service accounts with non-expiring passwords and broad AD privileges are common in hybrid environments — and their hashes are high-value targets. Migrating service accounts to Group Managed Service Accounts (gMSA) eliminates this exposure: gMSA passwords are 240-bit randomly generated values rotated automatically by the KDC, never accessible to administrators, and incompatible with PtH techniques.
For cloud workloads, replace service principals with static credentials with Azure Managed Identities wherever possible. Managed Identities use certificate-based authentication with tokens issued directly by the Azure Instance Metadata Service — there is no secret to steal, hash, or replay.
Key Takeaways
- MFA does not protect against Pass-the-Cookie attacks. AiTM phishing frameworks harvest post-MFA session tokens, making Continuous Access Evaluation and device compliance enforcement the critical defensive layer — not just MFA enablement.
- NTLM is a structural vulnerability in hybrid environments. Audit, restrict, and eliminate NTLM dependencies progressively. Pair this with Credential Guard and Protected Users Group membership for privileged accounts to make hash extraction functionally useless.
- Detection requires behavioral correlation, not just individual event alerting. Single NTLM events are noise; the same account authenticating via NTLM from multiple workstations in a short window is signal. Build correlation logic in your SIEM specifically targeting lateral movement patterns.
- Token lifetime management is an active, ongoing control — not a one-time configuration. Enforce sign-in frequency policies, enable CAE, and monitor refresh token issuance anomalies in cloud identity audit logs as a continuous practice.
- Privileged credential isolation reduces blast radius more than any single detection control. Tiered administration, PAWs, gMSA adoption, and just-in-time privileged access activation ensure that a successfully stolen credential has a constrained scope of damage.
Conclusion: Making Credential Theft a Dead End, Not a Starting Point
Pass-the-Cookie and Pass-the-Hash attacks thrive in environments where authentication artifacts are long-lived, broadly reusable, and poorly monitored. The adversary doesn’t need to be sophisticated — they need the defender to be complacent. The organizations that successfully contain these attacks share a common posture: they treat stolen credentials as an inevitable event to be limited and detected rapidly, not a scenario to be theoretically prevented.
The practical path forward begins with a focused, 90-day initiative. Audit your NTLM dependency map this week. Enable Credential Guard on Tier 0 and Tier 1 systems within 30
💡 Enjoyed this article?
Subscribe for more expert insights delivered to your inbox.
Follow us or subscribe below xe2x80x94 free, no spam.





