Writeups PicoCTFWebHTTP Headers

Who Are You Writeup - PicoGym

Writeup for the Who Are You challenge from PicoCTF PicoGym.

Contents

Category: Web Exploitation

Difficulty: Medium

Points: 100

Description

The server refuses to serve the flag unless the request looks exactly like it came from a very specific, trusted client. Each time a condition fails, the server reveals the next requirement.

Overview

Solution

Step 1: Set the User-Agent

headers = {"User-Agent": "PicoBrowser"}

Step 2: Add a Referer

headers["Referer"] = "http://mercury.picoctf.net:38322"

Step 3: Spoof the Date

headers["Date"] = datetime(2018, 1, 1).strftime("%a, %d %b %Y %H:%M:%S GMT")

Step 4: Set Do Not Track

headers["DNT"] = "1"

Step 5: Spoof the IP Address

headers["X-Forwarded-For"] = "192.44.242.19"

Step 6: Set the Language

headers["Accept-Language"] = "sv"

Step 7: Send the Final Request

r = requests.get(url, headers=headers)

Flag

picoCTF{http_h34d3rs_v3ry_c0Ol_much_w0w_b22d773c}

← Back to Blog