WordPress Exploitation — Vulnerable Plugin CTF
Overview
A capture-the-flag exercise against a deliberately vulnerable WordPress instance running on a lab virtual machine provided for the course. The task was to identify the application’s vulnerabilities and chain them together to reach flags hidden across the system — the full arc from enumeration to remote code execution.
What I did
Vulnerable plugin enumeration. Using WPScan with an API token, I catalogued every outdated plugin and its associated CVEs — Easy Digital Downloads, Email Before Download, Email Subscribers, Mail Masta, and others — summarising each vulnerability and keeping the scan’s own references.
User enumeration and brute-force. I enumerated the registered users, then ran a
WPScan dictionary attack against them with a provided wordlist to recover one user’s
password. For the second user, I built a custom wordlist with crunch from a known
character set and cracked the password that a generic list would have missed.
SQL injection with SQLmap. I exploited both unauthenticated and authenticated SQL
injection in the Mail Masta plugin, using SQLmap to dump the full table list,
extract the user table, and finally read a flag out of a dedicated FLAG table.
Local File Inclusion. I exploited an unauthenticated LFI in the same plugin to read
/etc/passwd off the server.
Remote code execution. Using a Metasploit module against the Plainview Activity
Monitor plugin, I obtained a Meterpreter shell, then pivoted from there — reading
wp-config.php to recover the database credentials, exploring the filesystem for
user-created flags, and running post-exploitation commands (arp -a, interface
enumeration) on the compromised host.
What I learned
The lesson wasn’t any single exploit — it was the chain. One outdated plugin gives a foothold; that foothold gives credentials; those credentials give deeper access. This is why “it’s just one out-of-date plugin” is never really true: attackers combine small weaknesses into full compromise, and defending means closing the chain, not just the first link. It also made clear how much a single exposed, unpatched plugin can hand to an attacker.