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

Traverse

Bob is a security engineer at a firm and works closely with the software/DevOps team to develop a tourism web application. Once the website was moved from QA to Production, the team noticed that the website was getting hacked daily and wanted to know the exact reason. Bob consulted the blue team as well but has yet to be successful. Therefore, he finally enrolled in the Software Security pathway at THM to learn if he was doing something wrong.

Deploy the machine by clicking the Start Machine button on the top right. You can access the website by visiting the URL http://MACHINE_IP via your VPN connection or the AttackBox.

Can you help Bob find the vulnerabilities and restore the website?

1. What type of encoding is used by the hackers to obfuscate the JavaScript file?

Looking at the source code reveals a custom JavaScript file on line 14.

At first glance this looks like HEX. Let's confirm it and decrypt it using CyberChef.

Decrypted

2. What is the flag value after deobfuscating the file?

Decrypting further with JavaScript Minify reveals the flag.

3. Logging is an important aspect. What is the name of the file containing email dumps?

Going back to the source code on line 25 and 26 reveals a directory. Let's check it out.

Sure enough, there's our email_dump.txt file. Let's see what it contains.

4. The logs folder contains email logs and has a message for the software team lead. What is the name of the directory that Bob has created?

Hmmm... So the directory is named after the first phase of the SDLC, planning.

5. What is the key file for opening the directory that Bob has created for Mark?

Going back to the content found in the email_dump.txt file reveals the key for opening the directory.

6. What is the email address for ID 5 using the leaked API endpoint?

Putting in the key we obtained from the email_dump.txt file into this form brings us to our API content.

7. What is the email address for ID 5 using the leaked API endpoint?

Taking API endpoint syntax and plugging it into our base URL displays raw data in JSON format.

8. What is the ID for the user with admin privileges?

Playing around with the id #'s reveals our admin user.

9. What is the endpoint for logging in as the admin? Mention the last endpoint instead of the URL. For example, if the answer is URL is tryhackme.com/admin - Just write /admin.

10. The attacker uploaded a web shell and renamed a file used for managing the server. Can you find the name of the web shell that the attacker has uploaded?

First we need to login to track down this web shell. We can use the credentials obtained through the API endpoint.

Logging in brings us to this Admin Page.

Intercepting the POST request through Burp Suite allows us to manipulate the command beyond what was intended.

We Can Accomplish This in 4 Simple Steps

1. Launch Burp Suite.

2. Route traffic from our browser via Foxy Proxy (my preferred way).

3. Right Click Intercepted request and send to Repeater.

4. Change commands paramater to ls to view content in the current working directory and gain more information.

11. What is the name of the file renamed by the attacker for managing the web server?

This can be retrieved from the response from our tailored Burp Suite request.

12. Can you use the file manager to restore the original website by removing the "FINALLY HACKED" message? What is the flag value after restoring the main website?

We can do this by going to /realadmin/renamed_file_manager.php and typing in our discovered password.

File Manager

Clicking into index.php and selecting the Advanced Editor gives us the ability to remove the "Finally Hacked" message as well as retrieving our final flag.