This lab involves a front-end and back-end server, and the front-end server doesn't support chunked encoding. The front-end server is configured to cache certain responses.
To solve the lab, perform a request smuggling attack that causes the cache to be poisoned, such that a subsequent request for a JavaScript file receives a redirection to the exploit server. The poisoned cache should alert document.cookie.
Notes
Although the lab supports HTTP/2, the intended solution requires techniques that are only possible in HTTP/1. You can manually switch protocols in Burp Repeater from the Request attributes section of the Inspector panel.
The lab simulates the activity of a victim user. Every few POST requests that you make to the lab, the victim user will make their own request. You might need to repeat your attack a few times to ensure that the victim user's request occurs as required.
Tip
Manually fixing the length fields in request smuggling attacks can be tricky. Our HTTP Request Smuggler Burp extension was designed to help. You can install it via the BApp Store.
Then fetch /resources/js/tracking.js by sending the following request:
GET /resources/js/tracking.js HTTP/1.1
Host: YOUR-LAB-ID.web-security-academy.net
Connection: close
If the attack has succeeded, the response to the tracking.js request should be a redirect to your exploit server.
Confirm that the cache has been poisoned by repeating the request to tracking.js several times and confirming that you receive the redirect every time.
Note
You may need to repeat the POST/GET process several times before the attack succeeds.
Community solutions
Michael Sommer
Want to track your progress and have a more personalized learning experience? (It's free!)