PUBlished on
January 9, 2024
updated on
November 5, 2025

Behind the Breach: Pass-The-Cookie Beyond IdPs

RYAN WISNIEWSKI AND SHUYANG WANG

Pass-The-Cookie (PTC), also known as token compromise, is a common attack technique employed by threat actors in SaaS environments.

In the past, Obsidian’s Threat Research team noted a pattern where most PTC attacks focused on stealing the identity provider (IdP) primary authentication cookie. However, there has since been a shift in attacks–now targeting authentication cookies for SaaS applications that extend beyond the IdP.

In this blog post, we explore the phases of a PTC attack, leveraging a recent instance detected on the Obsidian platform. We then offer guidance for how to address these attacks through session monitoring and remediation.

PTC attacks unpacked:

Despite additional security provided by Okta Multi-Factor Authentication (MFA), the threat actor managed to defeat this, leading to the compromise of both Okta and O365 environments.

Let’s explore what happened:

Obsidian detected a Pass-the-Cookie: New Malicious Microsoft Sessionevent and raised an alert.

Looking into the sequence of events from the alert, we can see:

Upon further investigation, the 67.2XX.XXX.XXX IP address was identified to be part of the TOR Guard VPN service provider to anonymize traffic originations and obfuscate payload details.

In this instance, the compromise appears to be targeted as it did not authenticate into any other application other than O365.

Why it matters:

What can I do to protect my organization?

#1: Establish logging and detection across SaaS applications, beyond the IdP.

  1. Build a logging and detection system: To detect suspicious activity, create a logging and detection system that can correlate all login and activity events.
  2. Understand user activity: Gain a comprehensive understanding of user activity by correlating events. This involves looking at activities not just within the IdP but across all SaaS applications.
  3. Identify anomalies: Focus on detecting anomalous activity within user application sessions. This step involves understanding where user sessions are authenticated and where application access originates.
  4. Alert team for investigation: When anomalous activity is detected, generate alerts to notify the security team for further investigation. It’s crucial to provide sufficient context for successful triage.
  5. Tune system to minimize false positives: Fine-tune the detection system to reduce false positives. This involves distinguishing normal activities such as user VPNs and mobile networks from potentially malicious behavior.

You can leverage the Obsidian platform to help you complete these actions. Here, you can observe the platform in action, offering practical insights into the PTC attack we examined earlier. It provides analysts with detailed information on a single page, significantly reducing triage and remediation time–reducing the overall risk profile for organizations.

#2: Update incident response playbooks to remove all persistence vectors.

  1. Terminate all sessions: Addressing a compromised SaaS identity requires more than just remediation in the IdP. In the given scenario, it’s essential to terminate both the Okta and O365 sessions to eliminate the threat actor from the environment. Following best practices, revoke all user sessions and reset any compromised passwords.
  1. Check for Additional Persistence: Look for signs of persistence. Identify and remove any new MFA devices associated with the compromised account. You should also verify and eliminate any unfamiliar email addresses or phone numbers linked to the compromised account.

#3: Reduce Session Timeout across your SaaS applications

A shorter session timeout in your SaaS applications helps reduce the window of a successful session hijack attack. Adjust the threshold in your applications, balancing the security benefits and usability.

Obsisidian SSPM helps your track long session timeout across SaaS apps and monitor its drift, ensuring enhanced security and efficient management of user access.

How can a SaaS application developer help?

If you are a SaaS application developer, you can help by implementing mechanisms to terminate sessions and revoke active tokens in your application/s. Ensure your application provides the following capabilities:

Final thoughts:

Addressing Pass-The-Cookie attacks demands a proactive approach. Discover how Obsidian can help you address these evolving instances by downloading The Forrester Wave™: SaaS Security Posture Management, Q4 2023, or schedule a demo today.

Frequently Asked Questions (FAQs)

What is a Pass-The-Cookie (PTC) attack in SaaS environments?

A Pass-The-Cookie (PTC) attack, also called token compromise, is a technique where threat actors steal authentication cookies or session tokens to gain unauthorized access to SaaS applications. Unlike traditional attacks focused on identity provider (IdP) cookies, recent methods target application-specific session cookies, allowing attackers to bypass MFA and access sensitive data directly within applications like Office 365.

How do attackers bypass Multi-Factor Authentication (MFA) using PTC techniques?

Attackers circumvent MFA by stealing active session cookies after a user has authenticated, rather than intercepting credentials during login. Once a cookie is stolen, typically via phishing or malware, the attacker can reuse it to access the user’s SaaS account without needing to pass through the original MFA challenge.

Why are SaaS application sessions particularly vulnerable to PTC attacks?

SaaS application sessions are vulnerable because their tokens often have longer timeout periods and may not be immediately invalidated when a user's password is changed or their IdP session is revoked. This provides attackers with a longer window of opportunity for unauthorized access, especially if session monitoring is insufficient.

What security measures help defend against Pass-The-Cookie attacks?

Organizations should implement logging and detection across all SaaS applications, not just the IdP, to correlate activities and identify anomalies in session behavior. Additionally, updating incident response playbooks to ensure all active sessions are revoked and reducing session timeouts can minimize the risk and impact of PTC attacks.

You May Also Like

Get Started

Start in minutes and secure your critical SaaS applications with continuous monitoring and data-driven insights.

get a demo