What is WPScan?
WPScan is an open-source WordPress security scanner. Beyond vulnerability detection, it supports credential brute-forcing through several attack modes — includingxmlrpc, which sends authentication attempts directly to WordPress’s xmlrpc.php endpoint rather than the login page.
The XML-RPC attack mode is well-suited for lab exercises because it bypasses many login-page protections and mirrors real-world attack techniques used against poorly secured WordPress installations.
Prerequisites
WPScan installed
Install via
gem install wpscan or use the official Docker image. Confirm with wpscan --version.Lab WordPress target
A WordPress instance running at
http://TARGET/lab/ that you control or have authorization to test.XML-RPC enabled
The target must have
xmlrpc.php accessible. Verify with curl http://TARGET/lab/xmlrpc.php.Wordlists downloaded
Both
users.txt and passwords.txt from this repository must be present on your machine.Running the attack
Verify XML-RPC is accessible
Before running WPScan, confirm that You should see a response like:If you get a 404 or the file is not found, XML-RPC is disabled or the path is incorrect.
xmlrpc.php is reachable and returns the expected response:Run WPScan with XML-RPC brute-force
Execute the following command, replacing WPScan will iterate through every combination of username and password using the XML-RPC interface.
TARGET with your lab host:Flag reference
--url
--url
The base URL of the WordPress installation. WPScan automatically appends
xmlrpc.php when using the xmlrpc attack mode. Include the full path if WordPress is installed in a subdirectory, as in http://TARGET/lab/.--passwords
--passwords
Path to the password wordlist file. WPScan reads this file line by line and tests each entry. Use
passwords.txt from this repository, which contains approximately 1,500 common passwords and pattern variations.--usernames
--usernames
Path to the username wordlist file, or a comma-separated list of usernames. Use
users.txt from this repository, which contains 1,200 common usernames for servers, web applications, and corporate environments.--password-attack xmlrpc
--password-attack xmlrpc
Selects the XML-RPC attack mode. Instead of submitting credentials through
wp-login.php, WPScan sends POST requests to xmlrpc.php using the wp.getUsersBlogs method. This is faster and avoids some login-page rate limits.--max-threads
--max-threads
Number of concurrent threads WPScan uses for requests. The default is low;
50 provides a good balance between speed and avoiding target overload in a lab. Reduce this value if the server becomes unresponsive.Interpreting the output
WPScan produces real-time output as it tests credentials. Key lines to watch for:[+] Valid Combinations Found:— Indicates a successful match. WPScan prints the username and password pair below this line.Trying username / password ...— Progress indicator showing the current attempt.[i] No Valid Passwords Found.— The run completed without finding credentials.
Adjusting thread count
The--max-threads value directly affects how aggressively WPScan hammers the target server.
| Threads | Use case |
|---|---|
5–10 | Slow and stealthy; minimizes server load |
20–30 | Balanced for most lab environments |
50 | Fast; suitable for local or dedicated lab VMs |
100+ | Risk of overwhelming the server or triggering timeouts |
Troubleshooting
XML-RPC is not enabled
XML-RPC is not enabled
WPScan will report that the XML-RPC interface is disabled. To enable it in your lab WordPress instance, add the following filter to your theme’s After saving, verify with
functions.php:curl http://TARGET/lab/xmlrpc.php — a response of “XML-RPC server accepts POST requests only.” confirms the endpoint is live.Rate limiting or timeouts
Rate limiting or timeouts
If requests are timing out or returning HTTP 429, reduce
--max-threads. You can also add --request-timeout 10 to give slower servers more time to respond.Connection refused or no route to host
Connection refused or no route to host
Verify that the target URL is correct and the WordPress lab is running. Check that you are on the correct network (VPN, local network, etc.) and that the port is reachable with
curl.WPScan API token warning
WPScan API token warning
WPScan may display a warning about a missing API token for vulnerability data. This warning does not affect the brute-force functionality. You can obtain a free token at wpscan.com if needed.
No valid passwords found despite correct credentials
No valid passwords found despite correct credentials
Confirm that the target credentials are actually in the wordlists. Also verify that
--url ends with a trailing slash and points to the correct WordPress installation path.