How I Solved The Sticker Shop CTF: Exploiting Blind XSS to Capture the Flag. This writeup walks you through the steps of exploiting a Blind XSS vulnerability in a real-world CTF challenge and extracting sensitive data.
Your local sticker shop has finally developed its own webpage. However, the developers lack web development experience. As a result, they decided to develop and host the webpage on the same computer they use for browsing the internet and checking customer feedback. Smart move!
The goal of this challenge is to exploit the website and read the flag located at: http://10.10.69.107:8080/flag.txt
Since the feedback is processed and evaluated by staff, any malicious JavaScript submitted through the form will execute when the feedback is reviewed.
This confirmed the presence of a Blind XSS vulnerability.
To exploit the vulnerability, I crafted a JavaScript payload that:
Fetches the flag from the server’s localhost (127.0.0.1:8080/flag.txt).
I used the localhost address because they said that they host everything on the same computer that they use for browsing the internet and looking at customer feedback.
Sends the retrieved content to my HTTP server.
Payload:
I submitted the payload in the feedback form.
Shortly after, my HTTP server captured the exfiltrated flag in the query string of an incoming GET request.
Example captured request:
The Sticker Shop challenge was an engaging task that tested my ability to identify and exploit a Blind XSS vulnerability effectively. By understanding the context in which the staff processed the feedback, I was able to craft and execute a payload to capture the flag successfully.
That’s all for the TryHackMe’s The Sticker Shop room write-up.
I published it previously on my Medium Blog: View the post