Multi-Stage Web Exploitation Leading to Full System Compromise and Privilege Dominance
A WordPress site had weak credentials and a vulnerable User Role Editor plugin, allowing an attacker to gain admin access and plant a PHP reverse shell. After obtaining a shell as the web user, the attacker found a private SSH key to move to a named user, then exploited a group-writable Python os module imported by a root cron job to escalate to root.
This project documents and demonstrates a common attack chain against a web application that includes external reconnaissance, application layer enumeration, credential discovery, privilege escalation through a vulnerable plugin, web shell deployment, host enumeration, lateral movement to a user account, and local…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely multiple weaknesses: weak credentials, a vulnerable plugin allowing privilege escalation, writable plugin files, exposed private keys, and a group-writable Python module imported by a root cron job.
Impact
The attacker achieved full system compromise, moving from a low-privilege WordPress account to root on the host, which could lead to complete control of the server and any data on it.
What the attacker needed
Network access to the target; WordPress site with vulnerable plugin; Weak user password
The fix
The report recommends hardening public services, managing third-party components, restricting code editing, storing keys securely, enforcing least privilege, and monitoring for anomalies.
How it was found
- Scan the target with Nmap to find SSH and HTTP services.
- Enumerate WordPress users with WPScan.
- Use WPScan aggressive plugin detection to find the outdated User Role Editor plugin.
- Guess the password for user wendy using WPScan.
- Intercept a profile update request with Burp Suite and add a parameter to assign the administrator role.
- Edit the akismet plugin file to insert a PHP reverse shell and activate the plugin to trigger it.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The attacker first guessed a weak password to log into a WordPress site. Then they used a bug in a plugin to give themselves admin rights, which let them edit plugin files and run commands on the server. Finally, they found a private key to log in as another user and abused a writable system file that a scheduled root task used, giving them full control of the machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.