Wpscan
Jump to navigation
Jump to search
Description
WordPress Security Scanner able to identify vulnerabilities, list users and crack passwords.
Installation
Install
$ gem install wpscan
API key
It is recommended to get a free API key (https://wpvulndb.com/api). A free subscription allows 50 requests/day.
Update
To make sure the database is updated:
$ wpscan --update
Usage
Usage: wpscan [options] --url URL The URL of the blog to scan Allowed Protocols: http, https Default Protocol if none provided: http This option is mandatory unless update or help or hh or version is/are supplied -h, --help Display the simple help and exit --hh Display the full help and exit --version Display the version and exit -v, --verbose Verbose mode --[no-]banner Whether or not to display the banner Default: true -o, --output FILE Output to FILE -f, --format FORMAT Output results in the format supplied Available choices: cli-no-colour, cli-no-color, json, cli --detection-mode MODE Default: mixed Available choices: mixed, passive, aggressive --user-agent, --ua VALUE --random-user-agent, --rua Use a random user-agent for each scan --http-auth login:password -t, --max-threads VALUE The max threads to use Default: 5 --throttle MilliSeconds Milliseconds to wait before doing another web request. If used, the max threads will be set to 1. --request-timeout SECONDS The request timeout in seconds Default: 60 --connect-timeout SECONDS The connection timeout in seconds Default: 30 --disable-tls-checks Disables SSL/TLS certificate verification, and downgrade to TLS1.0+ (requires cURL 7.66 for the latter) --proxy protocol://IP:port Supported protocols depend on the cURL installed --proxy-auth login:password --cookie-string COOKIE Cookie string to use in requests, format: cookie1=value1[; cookie2=value2] --cookie-jar FILE-PATH File to read and write cookies Default: /tmp/wpscan/cookie_jar.txt --force Do not check if the target is running WordPress --[no-]update Whether or not to update the Database --api-token TOKEN The WPVulnDB API Token to display vulnerability data --wp-content-dir DIR The wp-content directory if custom or not detected, such as "wp-content" --wp-plugins-dir DIR The plugins directory if custom or not detected, such as "wp-content/plugins" -e, --enumerate [OPTS] Enumeration Process Available Choices: vp Vulnerable plugins ap All plugins p Popular plugins vt Vulnerable themes at All themes t Popular themes tt Timthumbs cb Config backups dbe Db exports u User IDs range. e.g: u1-5 Range separator to use: '-' Value if no argument supplied: 1-10 m Media IDs range. e.g m1-15 Note: Permalink setting must be set to "Plain" for those to be detected Range separator to use: '-' Value if no argument supplied: 1-100 Separator to use between the values: ',' Default: All Plugins, Config Backups Value if no argument supplied: vp,vt,tt,cb,dbe,u,m Incompatible choices (only one of each group/s can be used): - vp, ap, p - vt, at, t --exclude-content-based REGEXP_OR_STRING Exclude all responses matching the Regexp (case insensitive) during parts of the enumeration. Both the headers and body are checked. Regexp delimiters are not required. --plugins-detection MODE Use the supplied mode to enumerate Plugins. Default: passive Available choices: mixed, passive, aggressive --plugins-version-detection MODE Use the supplied mode to check plugins' versions. Default: mixed Available choices: mixed, passive, aggressive -P, --passwords FILE-PATH List of passwords to use during the password attack. If no --username/s option supplied, user enumeration will be run. -U, --usernames LIST List of usernames to use during the password attack. Examples: 'a1', 'a1,a2,a3', '/tmp/a.txt' --multicall-max-passwords MAX_PWD Maximum number of passwords to send by request with XMLRPC multicall Default: 500 --password-attack ATTACK Force the supplied attack to be used rather than automatically determining one. Available choices: wp-login, xmlrpc, xmlrpc-multicall --stealthy Alias for --random-user-agent --detection-mode passive --plugins-version-detection passive [!] To see full list of options use --hh.
Example
Enumerate
$ wpscan --url http://jack.thm --api-token avduy456Dhdidsdfy377 _______________________________________________________________ __ _______ _____ \ \ / / __ \ / ____| \ \ /\ / /| |__) | (___ ___ __ _ _ __ ® \ \/ \/ / | ___/ \___ \ / __|/ _` | '_ \ \ /\ / | | ____) | (__| (_| | | | | \/ \/ |_| |_____/ \___|\__,_|_| |_| WordPress Security Scanner by the WPScan Team Version 3.8.2 Sponsored by Automattic - https://automattic.com/ @_WPScan_, @ethicalhack3r, @erwan_lr, @firefart _______________________________________________________________ [+] URL: http://jack.thm/ [10.10.124.41] [+] Started: Thu Jun 18 13:49:19 2020 Interesting Finding(s): [+] Headers | Interesting Entry: Server: Apache/2.4.18 (Ubuntu) | Found By: Headers (Passive Detection) | Confidence: 100% [+] http://jack.thm/robots.txt | Interesting Entries: | - /wp-admin/ | - /wp-admin/admin-ajax.php | Found By: Robots Txt (Aggressive Detection) | Confidence: 100% [+] XML-RPC seems to be enabled: http://jack.thm/xmlrpc.php | Found By: Direct Access (Aggressive Detection) | Confidence: 100% | References: | - http://codex.wordpress.org/XML-RPC_Pingback_API | - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_ghost_scanner | - https://www.rapid7.com/db/modules/auxiliary/dos/http/wordpress_xmlrpc_dos | - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_xmlrpc_login | - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_pingback_access [+] http://jack.thm/readme.html | Found By: Direct Access (Aggressive Detection) | Confidence: 100% [+] Upload directory has listing enabled: http://jack.thm/wp-content/uploads/ | Found By: Direct Access (Aggressive Detection) | Confidence: 100% [+] The external WP-Cron seems to be enabled: http://jack.thm/wp-cron.php | Found By: Direct Access (Aggressive Detection) | Confidence: 60% | References: | - https://www.iplocation.net/defend-wordpress-from-ddos | - https://github.com/wpscanteam/wpscan/issues/1299 [+] WordPress version 5.3.2 identified (Insecure, released on 2019-12-18). | Found By: Rss Generator (Passive Detection) | - http://jack.thm/index.php/feed/, <generator>https://wordpress.org/?v=5.3.2</generator> | - http://jack.thm/index.php/comments/feed/, <generator>https://wordpress.org/?v=5.3.2</generator> | | [!] 12 vulnerabilities identified: | | [!] Title: WordPress < 5.4.1 - Password Reset Tokens Failed to Be Properly Invalidated | Fixed in: 5.3.3 | References: | - https://wpvulndb.com/vulnerabilities/10201 | - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11027 | - https://wordpress.org/news/2020/04/wordpress-5-4-1/ | - https://core.trac.wordpress.org/changeset/47634/ | - https://www.wordfence.com/blog/2020/04/unpacking-the-7-vulnerabilities-fixed-in-todays-wordpress-5-4-1-security-update/ | - https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-ww7v-jg8c-q6jw | | [!] Title: WordPress < 5.4.1 - Unauthenticated Users View Private Posts | Fixed in: 5.3.3 | References: | - https://wpvulndb.com/vulnerabilities/10202 | - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11028 | - https://wordpress.org/news/2020/04/wordpress-5-4-1/ | - https://core.trac.wordpress.org/changeset/47635/ | - https://www.wordfence.com/blog/2020/04/unpacking-the-7-vulnerabilities-fixed-in-todays-wordpress-5-4-1-security-update/ | - https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-xhx9-759f-6p2w | | [!] Title: WordPress < 5.4.1 - Authenticated Cross-Site Scripting (XSS) in Customizer | Fixed in: 5.3.3 | References: | - https://wpvulndb.com/vulnerabilities/10203 | - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11025 | - https://wordpress.org/news/2020/04/wordpress-5-4-1/ | - https://core.trac.wordpress.org/changeset/47633/ | - https://www.wordfence.com/blog/2020/04/unpacking-the-7-vulnerabilities-fixed-in-todays-wordpress-5-4-1-security-update/ | - https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-4mhg-j6fx-5g3c | | [!] Title: WordPress < 5.4.1 - Authenticated Cross-Site Scripting (XSS) in Search Block | Fixed in: 5.3.3 | References: | - https://wpvulndb.com/vulnerabilities/10204 | - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11030 | - https://wordpress.org/news/2020/04/wordpress-5-4-1/ | - https://core.trac.wordpress.org/changeset/47636/ | - https://www.wordfence.com/blog/2020/04/unpacking-the-7-vulnerabilities-fixed-in-todays-wordpress-5-4-1-security-update/ | - https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-vccm-6gmc-qhjh | | [!] Title: WordPress < 5.4.1 - Cross-Site Scripting (XSS) in wp-object-cache | Fixed in: 5.3.3 | References: | - https://wpvulndb.com/vulnerabilities/10205 | - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11029 | - https://wordpress.org/news/2020/04/wordpress-5-4-1/ | - https://core.trac.wordpress.org/changeset/47637/ | - https://www.wordfence.com/blog/2020/04/unpacking-the-7-vulnerabilities-fixed-in-todays-wordpress-5-4-1-security-update/ | - https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-568w-8m88-8g2c | | [!] Title: WordPress < 5.4.1 - Authenticated Cross-Site Scripting (XSS) in File Uploads | Fixed in: 5.3.3 | References: | - https://wpvulndb.com/vulnerabilities/10206 | - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11026 | - https://wordpress.org/news/2020/04/wordpress-5-4-1/ | - https://core.trac.wordpress.org/changeset/47638/ | - https://www.wordfence.com/blog/2020/04/unpacking-the-7-vulnerabilities-fixed-in-todays-wordpress-5-4-1-security-update/ | - https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-3gw2-4656-pfr2 | | [!] Title: WordPress < 5.4.2 - Authenticated XSS in Block Editor | Fixed in: 5.3.4 | References: | - https://wpvulndb.com/vulnerabilities/10263 | - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-4046 | - https://wordpress.org/news/2020/06/wordpress-5-4-2-security-and-maintenance-release/ | - https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-rpwf-hrh2-39jf | - https://pentest.co.uk/labs/research/subtle-stored-xss-wordpress-core/ | - https://www.youtube.com/watch?v=tCh7Y8z8fb4 | | [!] Title: WordPress < 5.4.2 - Authenticated XSS via Media Files | Fixed in: 5.3.4 | References: | - https://wpvulndb.com/vulnerabilities/10264 | - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-4047 | - https://wordpress.org/news/2020/06/wordpress-5-4-2-security-and-maintenance-release/ | - https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-8q2w-5m27-wm27 | | [!] Title: WordPress < 5.4.2 - Open Redirection | Fixed in: 5.3.4 | References: | - https://wpvulndb.com/vulnerabilities/10265 | - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-4048 | - https://wordpress.org/news/2020/06/wordpress-5-4-2-security-and-maintenance-release/ | - https://github.com/WordPress/WordPress/commit/10e2a50c523cf0b9785555a688d7d36a40fbeccf | - https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-q6pw-gvf4-5fj5 | | [!] Title: WordPress < 5.4.2 - Authenticated XSS via Theme Upload | Fixed in: 5.3.4 | References: | - https://wpvulndb.com/vulnerabilities/10266 | - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-4049 | - https://wordpress.org/news/2020/06/wordpress-5-4-2-security-and-maintenance-release/ | - https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-87h4-phjv-rm6p | | [!] Title: WordPress < 5.4.2 - Misuse of set-screen-option Leading to Privilege Escalation | Fixed in: 5.3.4 | References: | - https://wpvulndb.com/vulnerabilities/10267 | - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-4050 | - https://wordpress.org/news/2020/06/wordpress-5-4-2-security-and-maintenance-release/ | - https://github.com/WordPress/WordPress/commit/dda0ccdd18f6532481406cabede19ae2ed1f575d | - https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-4vpv-fgg2-gcqc | | [!] Title: WordPress < 5.4.2 - Disclosure of Password-Protected Page/Post Comments | Fixed in: 5.3.4 | References: | - https://wpvulndb.com/vulnerabilities/10268 | - https://wordpress.org/news/2020/06/wordpress-5-4-2-security-and-maintenance-release/ | - https://github.com/WordPress/WordPress/commit/c075eec24f2f3214ab0d0fb0120a23082e6b1122 [+] WordPress theme in use: online-portfolio | Location: http://jack.thm/wp-content/themes/online-portfolio/ | Last Updated: 2020-01-17T00:00:00.000Z | Readme: http://jack.thm/wp-content/themes/online-portfolio/readme.txt | [!] The version is out of date, the latest version is 0.0.8 | Style URL: http://jack.thm/wp-content/themes/online-portfolio/style.css?ver=5.3.2 | Style Name: Online Portfolio | Style URI: https://www.amplethemes.com/downloads/online-protfolio/ | Description: Online Portfolio WordPress portfolio theme for building personal website. You can take full advantag... | Author: Ample Themes | Author URI: https://amplethemes.com/ | | Found By: Css Style In Homepage (Passive Detection) | Confirmed By: Css Style In 404 Page (Passive Detection) | | Version: 0.0.7 (80% confidence) | Found By: Style (Passive Detection) | - http://jack.thm/wp-content/themes/online-portfolio/style.css?ver=5.3.2, Match: 'Version: 0.0.7' [+] Enumerating Users (via Passive and Aggressive Methods) Brute Forcing Author IDs - Time: 00:00:00 <========================================> (10 / 10) 100.00% Time: 00:00:00 [i] User(s) Identified: [+] jack | Found By: Rss Generator (Passive Detection) | Confirmed By: | Wp Json Api (Aggressive Detection) | - http://jack.thm/index.php/wp-json/wp/v2/users/?per_page=100&page=1 | Author Id Brute Forcing - Author Pattern (Aggressive Detection) | Login Error Messages (Aggressive Detection) [+] wendy | Found By: Author Id Brute Forcing - Author Pattern (Aggressive Detection) | Confirmed By: Login Error Messages (Aggressive Detection) [+] danny | Found By: Author Id Brute Forcing - Author Pattern (Aggressive Detection) | Confirmed By: Login Error Messages (Aggressive Detection) [+] WPVulnDB API OK | Plan: free | Requests Done (during the scan): 2 | Requests Remaining: 46 [+] Finished: Thu Jun 18 13:49:25 2020 [+] Requests Done: 60 [+] Cached Requests: 9 [+] Data Sent: 13.445 KB [+] Data Received: 365.746 KB [+] Memory used: 109.262 MB [+] Elapsed time: 00:00:05
Crack passwords
$ wpscan -U users.txt -P /data/src/wordlists/fasttrack.txt --url http://jack.thm [REDACTED] [+] Performing password attack on Xmlrpc against 3 user/s [SUCCESS] - wendy / changelater Trying danny / Time: 00:00:24 <==================================================> (648 / 648) 100.00% Time: 00:00:24 [!] Valid Combinations Found: | Username: wendy, Password: changelater [REDACTED]