π§ WordPress - Enumeration
What is it?
- Concept: Harvesting users, version, plugins/themes, and readable content from a WordPress site β most of it pre-auth, via predictable endpoints.
- Impact: Usernames for password attacks, a version/plugin list for known-CVE matching, and leaked files from the uploads directory.
How it works
- WordPress exposes many predictable paths; the REST API and author scans leak usernames;
/wp-content/uploadsserves media world-readable. - Once you have a login, the capability map tells you what the account can do β but verify behaviourally (a 403 on an admin screen is the truth).
Exploitation
Prerequisites
- HTTP(S) access to the site
Attack Vectors
All-in-one (WPScan)
wpscan --url https://target --disable-tls-checks --enumerate u,vp,vt,apUser enumeration (REST + author scan)
curl -sk 'https://target/?rest_route=/wp/v2/users' | jq '.[].slug'
for i in $(seq 1 10); do curl -sko /dev/null -w "%{http_code} %{redirect_url}\n" "https://target/?author=$i"; doneVersion & plugin/theme fingerprinting
curl -sk https://target/readme.html | grep -i version
curl -sk https://target/wp-content/plugins/<plugin>/readme.txt | head
# the page HTML also lists active-theme asset paths (/wp-content/themes/<theme>/...)Anonymous content (uploads)
Media is world-readable and often leaks docs/audio/backups.
curl -sk https://target/wp-content/uploads/2026/01/ # directory listing if enabledAuthenticated capability check
See WordPress for the dual-auth + X-WP-Nonce dance, then:
# with the logged-in cookie + the X-WP-Nonce header:
curl -sk 'https://target/?rest_route=/wp/v2/users/me&context=edit' -H "X-WP-Nonce: <nonce>"Notes
- Verify capabilities behaviourally β hit
/wp-admin/upload.php,theme-editor.php,users.php, etc.; a 403 means you really canβt, regardless of the capability list. - A low-privilege contributor still matters if their content renders in an admin screen β stored XSS pivot, see WordPress - XSS to Admin Account Takeover.
- Donβt crack
wp_usershashes ($wp$/$2y$bcrypt) β pull reusable creds fromwp-config.phpinstead.
Mitigation
- Fix: Block REST/author user enumeration, disable directory listing on uploads, keep plugins/themes patched and minimal.
Related Usage
| File | Created |
|---|---|
| HTB Machine - MakeSense | September 14, 2026 |
References: