WPScan: The WordPress Security Scanner
WordPress powers over 40% of the web, making it a prime target for attackers. WPScan is a specialized, open-source, black-box vulnerability scanner designed specifically for WordPress security assessments. It helps ethical hackers and security professionals identify misconfigurations, known vulnerabilities in the core software, plugins, and themes, enumerate users, and even attempt password cracking.
- Massive install base makes it a high-value target for attackers
- Extensibility via plugins and themes introduces a large potential attack surface
- Misconfigurations and outdated components are common in real-world deployments
- Compromised sites can be used for phishing, malware distribution, or pivoting into networks
WARNING: WPScan performs active scanning and vulnerability testing. You MUST have explicit, written permission from the website owner before scanning any WordPress site. Unauthorized scanning is illegal and unethical. Confine all usage to authorized tests or personal lab environments.
Vulnerability Detection
Identifies security issues in WordPress core, plugins, and themes using WPVulnDB
User Enumeration
Discovers WordPress users through various techniques including author ID enumeration
Password Attacks
Performs brute-force attacks against WordPress login mechanisms
Configuration Testing
Identifies backup files, database exports, and other security misconfigurations
Installation & Setup
Installation on Kali Linux
WPScan is typically pre-installed on Kali Linux. Always ensure you have the latest version and its database is updated.
wpscan --versionsudo apt update && sudo apt install wpscan -ywpscan --updateWPVulnDB API Key Setup
To get vulnerability information for WordPress core, plugins, and themes, WPScan relies on the WPVulnDB API. You must register for a free or paid API key at wpscan.com/api.
wpscan --url http://target.com/ --api-token YOUR_API_TOKEN# Edit ~/.wpscan/scan.yml or /etc/wpscan/scan.yml and add:
# cli:
# api_token: YOUR_API_TOKENWithout a valid API key, WPScan cannot report specific vulnerabilities found in enumerated components. The API key is essential for comprehensive vulnerability assessment.
Enumeration Techniques
Basic Scan
A basic scan provides initial information about the target WordPress installation.
wpscan --url http://target-domain.com/This performs basic checks including:
- HTTP Headers analysis
- Server Information detection
- Robots.txt presence and content
- WordPress README file detection
- WordPress version identification (if possible)
- Main theme detection
Advanced Enumeration
Enumeration is key to identifying potentially vulnerable components or usernames for further attacks.
wpscan --url http://target.com/ --enumerate option(s)Common Enumeration Options
| Option | Description | Intrusiveness |
|---|---|---|
p |
Popular plugins | Low |
ap |
All plugins (more intensive) | High |
vp |
Vulnerable plugins (requires API key) | Medium |
t |
Popular themes | Low |
vt |
Vulnerable themes (requires API key) | Medium |
u |
Usernames (range 1-10 by default) | Medium |
tt |
Timthumbs (legacy file often vulnerable) | Low |
cb, dbe |
Config backups and database exports | Low |
wpscan --url http://target.com/ --enumerate vp,vt,u1-30,cb,dbe --api-token YOUR_API_TOKENDetection Modes
You can influence how plugins and themes are detected to balance between speed and comprehensiveness.
wpscan --url http://target.com/ --enumerate ap --plugins-detection aggressive--plugins-detection mixed(Default): Combines passive and aggressive methods--plugins-detection passive: Only checks page sources (faster, less comprehensive)--plugins-detection aggressive: Uses brute-force guessing (slower, more comprehensive)
Vulnerability Detection
WPVulnDB Integration
WPScan's most powerful feature is its integration with the WPVulnDB database, which contains detailed information about WordPress core, plugin, and theme vulnerabilities.
wpscan --url http://target.com/ -e vp,vt --api-token YOUR_API_TOKENWPScan's vulnerability detection directly supports the Vulnerability Analysis and Web Application Hacking domains of the CEH curriculum. Its ability to identify specific CVE-listed vulnerabilities in WordPress components aligns perfectly with the practical skills expected of a Certified Ethical Hacker.
Common WordPress Vulnerabilities
WPScan can detect a wide range of WordPress-specific vulnerabilities:
| Vulnerability Type | Examples | Impact Level |
|---|---|---|
| SQL Injection | Plugin SQLi allowing database access | Critical |
| Cross-Site Scripting (XSS) | Theme XSS in search functionality | High |
| File Inclusion | LFI/RFI in plugin file parameters | High |
| Privilege Escalation | Plugin flaws allowing admin access | Critical |
| Authentication Bypass | Weak authentication in custom code | Critical |
| Information Disclosure | Backup files, version disclosure | Medium |
Password Brute-Forcing
WordPress Authentication Attacks
WPScan can attempt to brute-force user passwords via the WordPress login mechanism (XML-RPC or wp-login.php).
wpscan --url http://target.com/ --passwords wordlist_file --usernames user_or_userlist_filewpscan --url http://target.com/ -P /usr/share/wordlists/rockyou.txt -U adminwpscan --url http://target.com/ -P /path/to/passwords.txt -U users.txtAttack Configuration
Fine-tune your brute-force attacks for better efficiency and stealth.
wpscan --url http://target.com/ --passwords passwords.txt --usernames admin --password-attack xmlrpcwpscan --url http://target.com/ --passwords passwords.txt --usernames users.txt --throttle 1000- Can be very noisy and easily detected by security plugins or WAFs
- May trigger account lockouts and alert site administrators
- Can be slow depending on server response and list sizes
- Requires knowledge of valid usernames (use
--enumerate ufirst)
Advanced Options & Techniques
Stealth & Performance Options
wpscan --url http://target.com/ --throttle 500wpscan --url http://target.com/ --random-user-agentwpscan --url http://target.com/ --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"wpscan --url http://target.com/ --request-timeout 30 --connect-timeout 15Output & Reporting
wpscan --url http://target.com/ -e vp,vt,u -f json -o scan_results.json --api-token YOUR_API_TOKENwpscan --url http://target.com/ -vHands-On Activities
- Set up a test environment with a vulnerable WordPress installation (DVWP, WPScan Vulnerable WordPress, etc.)
- Run a basic WPScan to discover the WordPress version and main theme
- Enumerate users, plugins, and themes with vulnerability checking
- Analyze findings and identify high-priority vulnerabilities
- Attempt password brute-forcing on discovered users
- Generate comprehensive reports in multiple formats
- Document findings with evidence and severity ratings
wpscan --url http://test-wp.local/ -e vp,vt,u,cb,dbe -f html,json -o comprehensive_scan --api-token YOUR_API_TOKEN- Configure WPScan for stealth operation with throttling and custom User-Agent
- Use passive detection methods initially to avoid triggering security controls
- Gradually increase scan intensity based on initial findings
- Focus on high-value targets identified during reconnaissance
- Document techniques used to avoid detection
wpscan --url http://target.com/ --enumerate p,t,u --plugins-detection passive --throttle 2000 --random-user-agent -o stealth_scan- Enumerate all plugins on the target WordPress site
- Research identified plugins for known vulnerabilities
- Use WPScan to verify specific plugin vulnerabilities
- Manually verify critical findings where possible
- Document exploitability and potential impact
wpscan --url http://target.com/ --enumerate vp --plugins-detection aggressive --api-token YOUR_API_TOKEN -f json -o plugin_scan.json- Prioritize by Severity: Focus on high-impact findings like SQL Injection, privilege escalation, and authentication bypass first
- Verify Findings: Always manually verify reported vulnerabilities to eliminate false positives
- Understand Context: Analyze where vulnerabilities were found to determine exploitability
- Leverage Detailed Info: Use version information and CVE details in reports for verification
- Combine with Manual Testing: Use WPScan as a starting point for deeper manual security testing
Conclusion: WPScan in Your Security Toolkit
WPScan is an indispensable tool for any security professional working with WordPress environments. Its specialized focus on WordPress security, comprehensive vulnerability database integration, and flexible scanning options make it superior to generic web application scanners for WordPress assessments. By mastering its command-line interface and understanding how to tailor scans effectively, you can significantly improve your efficiency in identifying WordPress-specific security weaknesses.
- WPScan provides specialized black-box WordPress security testing
- WPVulnDB API integration is essential for comprehensive vulnerability detection
- Flexible enumeration options allow targeted security assessments
- Multiple output formats support integration with other tools and reporting
- Stealth options help reduce detection during authorized testing
- Always verify findings manually and operate within authorized scopes
WordPress vulnerability scanners like WPScan are powerful tools that must be used responsibly. Always ensure you have explicit, written permission before scanning any WordPress installations. Unauthorized scanning is not only unethical but also illegal in many jurisdictions. Use these skills to improve security posture, not to compromise systems. Document your findings responsibly and follow proper disclosure procedures when vulnerabilities are identified.