Cheese CTF TryhackMe: From SQL Injection to Root Access

MatSec
2 min readSep 25, 2024

--

TryhackMe Cheese CTF Walkthrough

In this blog, I’ll guide you through the Cheese CTF challenge from TryHackMe. This room is packed with learning opportunities, including how to exploit SQL injection and use PHP filters to convert an LFI (Local File Inclusion) vulnerability into RCE (Remote Code Execution). Plus, we’ll dive into privilege escalation techniques using writable authorized_keys files and a vulnerable SUID binary. Ready to level up your hacking skills?

Watch my full walkthrough here, and don’t forget to subscribe to support my content!

Why This Challenge?

Cheese CTF is ideal for beginners and intermediate pentesters, covering key areas of exploitation. From bypassing login systems to achieving root access, this room offers hands-on experience with real-world vulnerabilities. If you’re preparing for the OSCP or just want to sharpen your skills, this is the place to start.

Step-by-Step Breakdown:

  1. SQL Injection:
    We bypass the login page using SQL injection techniques. This is a common web application vulnerability, and mastering it is essential for any cybersecurity professional.
  2. LFI to RCE:
    The room presents an LFI vulnerability, allowing us to access internal files. We then exploit PHP filters to escalate this into RCE, gaining initial access to the system.
  3. Privilege Escalation:
    With RCE, we exploit a writable authorized_keys file to pivot between users. Later, we correct a syntax error in a timer to escalate our privileges, utilizing a SUID binary for full root access.

Key Takeaways

  • Understand the chain of vulnerabilities from SQL injection to privilege escalation.
  • Learn how small errors in system configurations lead to major security issues.
  • This room serves as an excellent preparation for certification exams like OSCP.

Dive into the walkthrough now and subscribe to my channel to keep up with more exciting content! The video will guide you through each technique step-by-step, ensuring that you gain practical, hands-on experience.

Tags:
#CheeseCTF #TryHackMe #CTF #SQLInjection #LFItoRCE #PrivilegeEscalation #Cybersecurity #EthicalHacking #OSCPPrep #PentestingTutorials #CTFWalkthrough

--

--

MatSec
MatSec

Written by MatSec

Security Researcher | Senior Engineer - Information Security | Bug Hunter

Responses (1)