Room: https://tryhackme.com/room/lofi

Overview

This room focuses on Local File Inclusion (LFI) and path traversal vulnerabilities. Below is a summary of my process and findings while exploiting the target.

None
None

Initial Setup

  • I started the machine and the AttackBox provided by TryHackMe.
  • After launching the AttackBox, I navigated to the target IP address in a web browser.
None

Reconnaissance

On visiting the site, I noticed a section titled "Discography" with multiple buttons.

This hinted that the application was including files dynamically via the page parameter — a strong indicator of a potential LFI vulnerability.

None

Exploitation: LFI and Path Traversal

Since the room hinted at file inclusion, I tested the following payload:

http://MACHINE_IP/?page=../../../../etc/passwd

Success! The contents of /etc/passwd were displayed, confirming the presence of a Local File Inclusion vulnerability.

None

Searching for the Flag

Now that I had confirmed LFI, the next step was to find and read the flag. I tried exploring directories that might contain flags, such as:

None

Then, I tried:

None

🎉 Flag found!

The flag was successfully displayed in the browser.

Conclusion

This was a great exercise in exploiting LFI and understanding the importance of secure file inclusion practices. The key steps included:

  • Identifying file inclusion via URL parameters
  • Performing path traversal
  • Locating sensitive files such as /etc/passwd and the flag

Thank you for reading my write-up. I hope you found it useful