WPscan
The WPScan Masterclass: Professional WordPress Vulnerability Scanner Guide
WPScan is a specialized command-line WordPress security scanner used by penetration testers, bug bounty hunters, and WordPress administrators to discover vulnerabilities in WordPress core, plugins, themes, and user enumeration. It leverages a comprehensive, regularly updated vulnerability database.
I. Environment Setup: Dynamic Variables
Define your environment variables for structured and repeatable scans:
export TARGET_URL="<https://targetwordpresssite.com>"
export API_TOKEN="YOUR_WPSCAN_API_TOKEN"
export OUTPUT_DIR="wpscan-results"
export LOG_FILE="$OUTPUT_DIR/scan.log"
export WORDLIST="/usr/share/wordlists/rockyou.txt"
export USERNAME="admin"
export PASSWORD_WORDLIST="/usr/share/wordlists/wordpress_passwords.txt"II. Core Capabilities & Workflow
WordPress Core Detection: Identifies WordPress version and checks for known vulnerabilities.
Plugin & Theme Enumeration: Enumerates installed plugins/themes; checks their versions against the vulnerability database.
Vulnerability Detection: Matches vulnerabilities from WPScan’s reliable, community-updated database.
User Enumeration & Brute-Force: Enumeration of usernames and weak password detection.
File & Directory Discovery: Detects sensitive files like wp-config.php backups, database exports, logs, and XML-RPC access.
Authentication & Rate Limit Handling: Supports API token for vulnerability data and rate-limiting options for stealth.
Output Reporting: Detailed terminal output with findings and recommendations; JSON export for automation.
III. Professional Usage Examples
1. Basic Scan for WordPress Version and Config
wpscan --url $TARGET_URL2. Enumerate Plugins and Detect Vulnerabilities
wpscan --url $TARGET_URL --enumerate p --api-token $API_TOKEN3. Enumerate Themes Vulnerable Versions
wpscan --url $TARGET_URL --enumerate t --api-token $API_TOKEN4. User Enumeration and Password Brute Forcing
wpscan --url $TARGET_URL --enumerate u --passwords $PASSWORD_WORDLIST5. Detect Exposed Sensitive Files and Directories
wpscan --url $TARGET_URL --enumerate ap6. Use Random User Agent to Bypass Simple Firewalls
wpscan --url $TARGET_URL --random-user-agent7. Throttle Requests to Prevent Rate Limiting or Detection
wpscan --url $TARGET_URL --throttle 15008. Save Output to JSON File
wpscan --url $TARGET_URL -o $OUTPUT_DIR/scan_results.json --format jsonIV. Advanced Techniques & Scenarios
Use API Token: Register at WPScan website to get vulnerability database API token, unlocking up-to-date plugin/theme vulnerabilities.
Stealth Scanning: Enable passive detection mode and throttling to evade detection by web application firewalls.
Password Lists: Use targeted password lists for brute forcing users, customized to the client environment.
Integration with CI/CD: Automate scans during deployment pipelines to discover vulnerabilities in development.
Combine with Manual Testing: Use WPScan results to augment manual research with Burp Suite or other scanners.
Enumerate All Possible Assets: Use full enumeration modes (
-enumerate ap,at,ua) for comprehensive scans.Detect Common Misconfigurations: Reports on exposed debug logs, XML-RPC, file permissions, and public backups.
V. Real-World Workflow Example
Set Environment Variables
export TARGET_URL="<https://example.com>"
export API_TOKEN="abcdef1234567890"
export OUTPUT_DIR="wpscan_results"Basic Scan and Plugin Enumeration
wpscan --url $TARGET_URL -e p --api-token $API_TOKEN -o $OUTPUT_DIR/plugins.json --format jsonUser Enumeration and Password Brute Force
wpscan --url $TARGET_URL -e u --passwords /usr/share/wordlists/wordpress_passwords.txt -o $OUTPUT_DIR/user_bruteforce.txtSave Detailed Scan Report
wpscan --url $TARGET_URL -o $OUTPUT_DIR/full_scan.txtAnalyze and Report
Review vulnerable plugins/themes flagged.
Check weak credentials detected.
Plan manual verification and remediation.
VI. Pro Tips & Best Practices
Keep WPScan’s vulnerability database up to date via API token usage.
Run scans with throttling and random user agents to avoid detection.
Utilize extensive enumeration options to broaden visibility during recon.
Use fresh and specific password lists for targeted brute forcing.
Combine automated output with manual testing for confirmation and further discovery.
Respect legal boundaries and scope—only scan authorized targets.
Review non-vulnerability findings like exposed files or misconfigurations for additional vectors.
This professional WPScan guide prepares penetration testers and bug bounty hunters to efficiently identify WordPress vulnerabilities, exposed sensitive data, and weak credentials, greatly improving security assessment accuracy and scope.
Last updated
Was this helpful?