TryHackMe: Local File Inclusion Writeup
This room aims to understand and exploit a web server that is vulnerable to the Local File Inclusion (LFI) vulnerability. This room can be accessed using this link: https://tryhackme.com/room/lfi
Task 1: Deploy
- Deploy the VM and access its web server: http://MACHINE_IP. Answer: No answer needed
Task 2: Getting user access via LFI
- Look around the website. What is the name of the parameter you found on the website? Answer: page
- You can read the interesting files to check out while testing for LFI. Answer: No answer needed
- This file can give information about the system like the name of all the existing users on the system. Answer: No answer needed
- What is the name of the user on the system? Answer: falcon
- Once you find the name of the user it’s important to see if you can include anything common and important in that user’s directory, could be anything like theirs .bashrc etc. Answer: No answer needed
- Name of the file which can give you access to falcon’s account on the system? Answer: id_rsa
- What is the user flag? Answer: B8LEGIF049JT4RTVWUG4
Task 3: Escalating your privileges to root
- What can falcon run as root? Answer: /bin/journalctl
- Search gtfobins via the website or by using gtfo tool, to see if you find any way to use that binary for privilege escalation. Answer: No answer needed
- What is the root flag? Answer: H1EQRK5XEX140H2KMO08
- Why not complete the LFI beginner level challenge next? Answer: No answer needed
Follow me on LinkedIn: https://www.linkedin.com/in/-prashantkumar07/