Web Cache Poisoning via an Unkeyed Header
Vulnerability: When the store's homepage is cached, it constructs the absolute URL for its "catalog beacon" script based on a header provided by the client. This allows an attacker to poison the shared cache (which has a 60-second TTL) so that all visitors—including the administrative bot, which remains logged in at all times—load a JavaScript file hosted by the attacker. This script steals the `vn_session` cookie, which lacks the `HttpOnly` attribute. Objective: Host a malicious `catalog-beacon.js` file on your own HTTP server, poison the store's cache using a manipulated header to force the file to load in the administrator's browser, capture the exfiltrated `vn_session` cookie, use it to access `/dashboard`, and retrieve the "flag."
# 1. Extract the archive you just downloaded — on your own box, not a server.
you@host:~$ unzip web-cache-poisoning-via-an-unkeyed-header.zip && cd web-cache-poisoning-via-an-unkeyed-header
# 2. Boot the vulnerable machine. It prints the IP it was assigned.
you@host:~$ sudo bash deploy.sh web-cache-poisoning-via-an-unkeyed-header.tar
# 3. Point your tools at that IP. Ctrl+C here tears it back down when you're done.
Learn more
Read the theory behind this lab before diving in.
Submit flags
Log in to submit flags and track your progress.