linuxAstronaut

Summary

  • Apache server hosting GravCMS was found on port 80.

  • Exploited a known GravCMS RCE vulnerability to get a foothold.

  • Used a one-liner Python reverse shell for stable access (as Meterpreter was unstable).

  • Privilege escalation achieved via SUID misconfiguration in PHP binary.

🧡 Let's Unpack


Enumeration

sudo nmap -sV -sC -p- -Pn 192.168.229.12

Open Ports:

  • 22/tcp β†’ OpenSSH 8.2p1

  • 80/tcp β†’ Apache httpd 2.4.41, directory listing reveals: /grav-admin


Initial Foothold

πŸ” Target: GravCMS (on /grav-admin)

βš™οΈ Execution

  1. Meterpreter payload was unstable.

  2. Used a Python one-liner reverse shell for stability:

βœ… Got a stable shell as www-data.


Privilege Escalation

  1. SUID Binaries Enumeration:

    • Found: php with SUID bit set

  2. Exploit: Abuse SUID PHP to execute shell with elevated privileges

βœ… Got root shell!

Last updated