In this simulation, you will analyze a session hijacking incident resulting from an XSS attack. You will learn how application-level cookie encryption can fail to prevent session replay if not properly bound to client network attributes.
The SOC has detected anomalous data access patterns in the Customer Relationship Management (CRM) portal. An alert was triggered indicating that a single user session is simultaneously active from two geographically impossible IP addresses.
As the Network Security Analyst, you pull the Web Application Firewall (WAF) and server access logs. You discover that the victim's browser was subjected to a Cross-Site Scripting (XSS) payload that extracted their session cookie. Even though the cookie payload itself is heavily encrypted, the attacker successfully used it to hijack the active session from an entirely different network.
WAF & Server Access Logs:
Note: The application backend logs confirm that the server successfully decrypted the cookie and authorized the attacker's request as the legitimate user.
An attacker injected an XSS payload that successfully read the user's `document.cookie` and sent it to an external server. The attacker then took that stolen cookie and "replayed" it (injected it into their own browser). The application server received it, decrypted it successfully, and granted the attacker access to the CRM data.
This is a Session Hijacking via Cross-Site Scripting (XSS) attack, specifically exploiting a vulnerability where encrypted tokens are susceptible to Replay Attacks due to a lack of environmental binding.
B is correct: If encryption is performed at the application level using a single, global encryption key, the server only cares about one thing: "Can I decrypt this string?" Because the stolen cookie is a valid encrypted string, the server decrypts it successfully regardless of who sends it. It does not tie the session to the client's IP address, User-Agent, or TLS session.
As a Network Defender, you must mitigate this at multiple layers (Defense-in-Depth):
HttpOnly flag on all session cookies. This prevents JavaScript (and therefore XSS payloads) from accessing `document.cookie`.Master real-world network traffic analysis, IDS/IPS tuning, and defensive operations.
Explore more CND simulations