Wordpress Scanner - Metasploit


This page contains detailed information about how to use the auxiliary/scanner/http/wordpress_scanner metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: Wordpress Scanner
Module: auxiliary/scanner/http/wordpress_scanner
Source code: modules/auxiliary/scanner/http/wordpress_scanner.rb
Disclosure date: -
Last modification time: 2021-09-06 11:56:32 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: http, https
Target network port(s): 80, 443, 3000, 8000, 8008, 8080, 8443, 8880, 8888
List of CVEs: -

Detects Wordpress Versions, Themes, and Plugins

Module Ranking and Traits


Module Ranking:

  • normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.

Basic Usage


This module is a scanner module, and is capable of testing against multiple hosts.

msf > use auxiliary/scanner/http/wordpress_scanner
msf auxiliary(wordpress_scanner) > show options
    ... show and set options ...
msf auxiliary(wordpress_scanner) > set RHOSTS ip-range
msf auxiliary(wordpress_scanner) > exploit

Other examples of setting the RHOSTS option:

Example 1:

msf auxiliary(wordpress_scanner) > set RHOSTS 192.168.1.3-192.168.1.200 

Example 2:

msf auxiliary(wordpress_scanner) > set RHOSTS 192.168.1.1/24

Example 3:

msf auxiliary(wordpress_scanner) > set RHOSTS file:/tmp/ip_list.txt

Required Options


  • RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'

Knowledge Base


Vulnerable Application


Detects Wordpress installations and their version number. Also, optionally, detects themes and plugins.

Setup using Docksal

Install Docksal

Create a new WordPress installation using fin project create

fin project create
1. Name your project (lowercase alphanumeric, underscore, and hyphen): msf-wp

2. What would you like to install?
  PHP based
    1.  Drupal 8
    2.  Drupal 8 (Composer Version)
    3.  Drupal 7
    4.  Wordpress
    5.  Magento
    6.  Laravel
    7.  Symfony Skeleton
    8.  Symfony WebApp
    9.  Grav CMS
    10. Backdrop CMS

  Go based
    11. Hugo

  JS based
    12. Gatsby JS
    13. Angular

  HTML
    14. Static HTML site

Enter your choice (1-14): 4

Project folder:   /home/weh/dev/msf-wp
Project software: Wordpress
Project URL:      http://msf-wp.docksal

Do you wish to proceed? [y/n]: y
Cloning repository...
Cloning into 'msf-wp'...
...
3. Installing site
 Step 1  Initializing stack...
Removing containers...
...
Starting services...
Creating network "msf-wp_default" with the default driver
Creating volume "msf-wp_cli_home" with default driver
Creating volume "msf-wp_project_root" with local driver
Creating volume "msf-wp_db_data" with default driver
Creating msf-wp_db_1  ... done
Creating msf-wp_cli_1 ... done
Creating msf-wp_web_1 ... done
Connected vhost-proxy to "msf-wp_default" network.
Waiting for project stack to become ready...
 Step 2  Initializing site...
 Step 2  Generating wp-config.php...
Success: Generated 'wp-config.php' file.
 Step 3  Installing site...
msmtp: envelope-from address is missing
Success: WordPress installed successfully.

Open http://msf-wp.docksal in your browser to verify the setup.
Admin panel: http://msf-wp.docksal/wp-admin. User/password: admin/admin  
 DONE!  Completed all initialization steps.

Verification Steps


  1. Do: use auxiliary/scanner/http/wordpress_sanner
  2. Do: set RHOSTS [IP]
  3. Do: set VHOST [HOSTNAME]
  4. Do: run

Options


PLUGINS

If plugins should be scanned. Defaults to true

PLUGINS_FILE

Which plugins list to use. Default is data/wordlists/wp-plugins.txt

THEMES

If themes should be scanned. Defaults to true

THEMES_FILE

Which themes list to use. Default is data/wordlists/wp-themes.txt

Progress

How often to print a prorgress bar while scanning for themes/plugins. Defaults to 1000

Scenarios


Wordpress 5.2 running in Docksal

Follow the Instructions above to setup the Docksal Containers.

msf5 > use auxiliary/scanner/http/wordpress_scanner
msf5 auxiliary(scanner/http/wordpress_scanner) > set RHOST msf-wp.docksal
RHOST => msf-wp.docksal
msf5 auxiliary(scanner/http/wordpress_scanner) > set VHOST msf-wp.docksal
VHOST => msf-wp.docksal
msf5 auxiliary(scanner/http/wordpress_scanner) > run

[*] Trying 192.168.64.100
[+] 192.168.64.100 running Wordpress 5.2
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf5 auxiliary(scanner/http/wordpress_scanner) > 

Wordpress 5.4.2 with Plugin and Theme Enumeration

msf6 > use auxiliary/scanner/http/wordpress_scanner
[*] Using auxiliary/scanner/http/wordpress_scanner
msf6 auxiliary(scanner/http/wordpress_scanner) > set rhosts 1.1.1.1
rhosts => 1.1.1.1
msf6 auxiliary(scanner/http/wordpress_scanner) > run

[*] Trying 1.1.1.1
[+] 1.1.1.1 - Detected Wordpress 5.4.2
[*] 1.1.1.1 - Enumerating Themes
[*] 1.1.1.1 - Progress      0/19226 (0.0%)
[*] 1.1.1.1 - Progress   1000/19226 (5.2%)
[*] 1.1.1.1 - Progress   2000/19226 (10.4%)
[*] 1.1.1.1 - Progress   3000/19226 (15.6%)
[*] 1.1.1.1 - Progress   4000/19226 (20.8%)
[*] 1.1.1.1 - Progress   5000/19226 (26.0%)
[*] 1.1.1.1 - Progress   6000/19226 (31.2%)
[*] 1.1.1.1 - Progress   7000/19226 (36.4%)
[*] 1.1.1.1 - Progress   8000/19226 (41.61%)
[*] 1.1.1.1 - Progress   9000/19226 (46.81%)
[*] 1.1.1.1 - Progress  10000/19226 (52.01%)
[*] 1.1.1.1 - Progress  11000/19226 (57.21%)
[*] 1.1.1.1 - Progress  12000/19226 (62.41%)
[*] 1.1.1.1 - Progress  13000/19226 (67.61%)
[*] 1.1.1.1 - Progress  14000/19226 (72.81%)
[*] 1.1.1.1 - Progress  15000/19226 (78.01%)
[*] 1.1.1.1 - Progress  16000/19226 (83.22%)
[*] 1.1.1.1 - Progress  17000/19226 (88.42%)
[+] 1.1.1.1 - Detected theme: twentynineteen version 1.5
[+] 1.1.1.1 - Detected theme: twentyseventeen version 2.3
[*] 1.1.1.1 - Progress  18000/19226 (93.62%)
[*] 1.1.1.1 - Progress  19000/19226 (98.82%)
[*] 1.1.1.1 - Finished scanning themes
[*] 1.1.1.1 - Enumerating plugins
[*] 1.1.1.1 - Progress      0/80624 (0.0%)
[*] 1.1.1.1 - Progress   1000/80624 (1.24%)
[*] 1.1.1.1 - Progress   2000/80624 (2.48%)
[+] 1.1.1.1 - Detected plugin: akismet version 4.1.5
[*] 1.1.1.1 - Progress   3000/80624 (3.72%)
[*] 1.1.1.1 - Progress   4000/80624 (4.96%)
[*] 1.1.1.1 - Progress   5000/80624 (6.2%)
[*] 1.1.1.1 - Progress   6000/80624 (7.44%)
[*] 1.1.1.1 - Progress   7000/80624 (8.68%)
[*] 1.1.1.1 - Progress   8000/80624 (9.92%)
[*] 1.1.1.1 - Progress   9000/80624 (11.16%)
[*] 1.1.1.1 - Progress  10000/80624 (12.4%)
[*] 1.1.1.1 - Progress  11000/80624 (13.64%)
[*] 1.1.1.1 - Progress  12000/80624 (14.88%)
[*] 1.1.1.1 - Progress  13000/80624 (16.12%)
[+] 1.1.1.1 - Detected plugin: contact-form-7 version 5.1.9
[*] 1.1.1.1 - Progress  14000/80624 (17.36%)
[*] 1.1.1.1 - Progress  15000/80624 (18.6%)
[*] 1.1.1.1 - Progress  16000/80624 (19.84%)
[*] 1.1.1.1 - Progress  17000/80624 (21.08%)
[*] 1.1.1.1 - Progress  18000/80624 (22.32%)
[+] 1.1.1.1 - Detected plugin: drag-and-drop-multiple-file-upload-contact-form-7 version 1.3.3.2
[*] 1.1.1.1 - Progress  19000/80624 (23.56%)
[*] 1.1.1.1 - Progress  20000/80624 (24.8%)
[+] 1.1.1.1 - Detected plugin: email-subscribers version 4.2.2
[*] 1.1.1.1 - Progress  21000/80624 (26.04%)
[*] 1.1.1.1 - Progress  22000/80624 (27.28%)
[*] 1.1.1.1 - Progress  23000/80624 (28.52%)
[*] 1.1.1.1 - Progress  24000/80624 (29.76%)
[*] 1.1.1.1 - Progress  25000/80624 (31.0%)
[*] 1.1.1.1 - Progress  26000/80624 (32.24%)
[*] 1.1.1.1 - Progress  27000/80624 (33.48%)
[*] 1.1.1.1 - Progress  28000/80624 (34.72%)
[*] 1.1.1.1 - Progress  29000/80624 (35.96%)
[*] 1.1.1.1 - Progress  30000/80624 (37.2%)
[*] 1.1.1.1 - Progress  31000/80624 (38.45%)
[*] 1.1.1.1 - Progress  32000/80624 (39.69%)
[*] 1.1.1.1 - Progress  33000/80624 (40.93%)
[*] 1.1.1.1 - Progress  34000/80624 (42.17%)
[*] 1.1.1.1 - Progress  35000/80624 (43.41%)
[+] 1.1.1.1 - Detected plugin: loginizer version 1.6.3
[*] 1.1.1.1 - Progress  36000/80624 (44.65%)
[*] 1.1.1.1 - Progress  37000/80624 (45.89%)
[*] 1.1.1.1 - Progress  38000/80624 (47.13%)
[*] 1.1.1.1 - Progress  39000/80624 (48.37%)
[*] 1.1.1.1 - Progress  40000/80624 (49.61%)
[*] 1.1.1.1 - Progress  41000/80624 (50.85%)
[*] 1.1.1.1 - Progress  42000/80624 (52.09%)
[*] 1.1.1.1 - Progress  43000/80624 (53.33%)
[*] 1.1.1.1 - Progress  44000/80624 (54.57%)
[*] 1.1.1.1 - Progress  45000/80624 (55.81%)
[*] 1.1.1.1 - Progress  46000/80624 (57.05%)
[*] 1.1.1.1 - Progress  47000/80624 (58.29%)
[*] 1.1.1.1 - Progress  48000/80624 (59.53%)
[*] 1.1.1.1 - Progress  49000/80624 (60.77%)
[*] 1.1.1.1 - Progress  50000/80624 (62.01%)
[*] 1.1.1.1 - Progress  51000/80624 (63.25%)
[*] 1.1.1.1 - Progress  52000/80624 (64.49%)
[*] 1.1.1.1 - Progress  53000/80624 (65.73%)
[*] 1.1.1.1 - Progress  54000/80624 (66.97%)
[*] 1.1.1.1 - Progress  55000/80624 (68.21%)
[+] 1.1.1.1 - Detected plugin: simple-file-list version 4.2.2
[*] 1.1.1.1 - Progress  56000/80624 (69.45%)
[*] 1.1.1.1 - Progress  57000/80624 (70.69%)
[*] 1.1.1.1 - Progress  58000/80624 (71.93%)
[*] 1.1.1.1 - Progress  59000/80624 (73.17%)
[*] 1.1.1.1 - Progress  60000/80624 (74.41%)
[*] 1.1.1.1 - Progress  61000/80624 (75.65%)
[*] 1.1.1.1 - Progress  62000/80624 (76.9%)
[*] 1.1.1.1 - Progress  63000/80624 (78.14%)
[*] 1.1.1.1 - Progress  64000/80624 (79.38%)
[*] 1.1.1.1 - Progress  65000/80624 (80.62%)
[*] 1.1.1.1 - Progress  66000/80624 (81.86%)
[*] 1.1.1.1 - Progress  67000/80624 (83.1%)
[*] 1.1.1.1 - Progress  68000/80624 (84.34%)
[*] 1.1.1.1 - Progress  69000/80624 (85.58%)
[*] 1.1.1.1 - Progress  70000/80624 (86.82%)
[*] 1.1.1.1 - Progress  71000/80624 (88.06%)
[*] 1.1.1.1 - Progress  72000/80624 (89.3%)
[*] 1.1.1.1 - Progress  73000/80624 (90.54%)
[*] 1.1.1.1 - Progress  74000/80624 (91.78%)
[*] 1.1.1.1 - Progress  75000/80624 (93.02%)
[*] 1.1.1.1 - Progress  76000/80624 (94.26%)
[*] 1.1.1.1 - Progress  77000/80624 (95.5%)
[*] 1.1.1.1 - Progress  78000/80624 (96.74%)
[*] 1.1.1.1 - Progress  79000/80624 (97.98%)
[*] 1.1.1.1 - Progress  80000/80624 (99.22%)
[*] 1.1.1.1 - Finished scanning plugins
[*] 1.1.1.1 - Finished all scans
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf6 auxiliary(scanner/http/wordpress_scanner) > notes

Notes
=====

 Time                     Host     Service  Port  Protocol  Type                                                                                 Data
 ----                     ----     -------  ----  --------  ----                                                                                 ----
 2020-12-04 19:01:18 UTC  1.1.1.1  http     80    tcp       Wordpress 5.4.2                                                                      "/"
 2020-12-05 02:16:03 UTC  1.1.1.1  http     80    tcp       Wordpress Theme: twentynineteen version 1.5                                          {}
 2020-12-05 02:16:03 UTC  1.1.1.1  http     80    tcp       Wordpress Theme: twentyseventeen version 2.3                                         {}
 2020-12-05 02:16:58 UTC  1.1.1.1  http     80    tcp       Wordpress Plugin: akismet version 4.1.5                                              {}
 2020-12-05 02:18:44 UTC  1.1.1.1  http     80    tcp       Wordpress Plugin: contact-form-7 version 5.1.9                                       {}
 2020-12-05 02:19:35 UTC  1.1.1.1  http     80    tcp       Wordpress Plugin: drag-and-drop-multiple-file-upload-contact-form-7 version 1.3.3.2  {}
 2020-12-05 02:19:58 UTC  1.1.1.1  http     80    tcp       Wordpress Plugin: email-subscribers version 4.2.2                                    {}
 2020-12-05 02:22:41 UTC  1.1.1.1  http     80    tcp       Wordpress Plugin: loginizer version 1.6.3                                            {}
 2020-12-05 02:26:05 UTC  1.1.1.1  http     80    tcp       Wordpress Plugin: simple-file-list version 4.2.2                                     {}

Go back to menu.

Msfconsole Usage


Here is how the scanner/http/wordpress_scanner auxiliary module looks in the msfconsole:

msf6 > use auxiliary/scanner/http/wordpress_scanner

msf6 auxiliary(scanner/http/wordpress_scanner) > show info

       Name: Wordpress Scanner
     Module: auxiliary/scanner/http/wordpress_scanner
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  Christian Mehlmauer <[email protected]>
  h00die

Check supported:
  No

Basic options:
  Name          Current Setting                                                             Required  Description
  ----          ---------------                                                             --------  -----------
  PLUGINS       true                                                                        no        Detect plugins
  PLUGINS_FILE  /opt/metasploit-framework/embedded/framework/data/wordlists/wp-plugins.txt  yes       File containing plugins to enumerate
  PROGRESS      1000                                                                        yes       how often to print progress
  Proxies                                                                                   no        A proxy chain of format type:host:port[,type:host:port][...]
  RHOSTS                                                                                    yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPORT         80                                                                          yes       The target port (TCP)
  SSL           false                                                                       no        Negotiate SSL/TLS for outgoing connections
  TARGETURI     /                                                                           yes       The base path to the wordpress application
  THEMES        true                                                                        no        Detect themes
  THEMES_FILE   /opt/metasploit-framework/embedded/framework/data/wordlists/wp-themes.txt   yes       File containing themes to enumerate
  THREADS       1                                                                           yes       The number of concurrent threads (max one per host)
  VHOST                                                                                     no        HTTP server virtual host

Description:
  Detects Wordpress Versions, Themes, and Plugins

Module Options


This is a complete list of options available in the scanner/http/wordpress_scanner auxiliary module:

msf6 auxiliary(scanner/http/wordpress_scanner) > show options

Module options (auxiliary/scanner/http/wordpress_scanner):

   Name          Current Setting                                                             Required  Description
   ----          ---------------                                                             --------  -----------
   PLUGINS       true                                                                        no        Detect plugins
   PLUGINS_FILE  /opt/metasploit-framework/embedded/framework/data/wordlists/wp-plugins.txt  yes       File containing plugins to enumerate
   PROGRESS      1000                                                                        yes       how often to print progress
   Proxies                                                                                   no        A proxy chain of format type:host:port[,type:host:port][...]
   RHOSTS                                                                                    yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT         80                                                                          yes       The target port (TCP)
   SSL           false                                                                       no        Negotiate SSL/TLS for outgoing connections
   TARGETURI     /                                                                           yes       The base path to the wordpress application
   THEMES        true                                                                        no        Detect themes
   THEMES_FILE   /opt/metasploit-framework/embedded/framework/data/wordlists/wp-themes.txt   yes       File containing themes to enumerate
   THREADS       1                                                                           yes       The number of concurrent threads (max one per host)
   VHOST                                                                                     no        HTTP server virtual host

Advanced Options


Here is a complete list of advanced options supported by the scanner/http/wordpress_scanner auxiliary module:

msf6 auxiliary(scanner/http/wordpress_scanner) > show advanced

Module advanced options (auxiliary/scanner/http/wordpress_scanner):

   Name                  Current Setting                                     Required  Description
   ----                  ---------------                                     --------  -----------
   DOMAIN                WORKSTATION                                         yes       The domain to use for Windows authentication
   DigestAuthIIS         true                                                no        Conform to IIS, should work for most servers. Only set to false for non-IIS servers
   FingerprintCheck      true                                                no        Conduct a pre-exploit fingerprint verification
   HttpClientTimeout                                                         no        HTTP connection and receive timeout
   HttpPassword                                                              no        The HTTP password to specify for authentication
   HttpRawHeaders                                                            no        Path to ERB-templatized raw headers to append to existing headers
   HttpTrace             false                                               no        Show the raw HTTP requests and responses
   HttpTraceColors       red/blu                                             no        HTTP request and response colors for HttpTrace (unset to disable)
   HttpTraceHeadersOnly  false                                               no        Show HTTP headers only in HttpTrace
   HttpUsername                                                              no        The HTTP username to specify for authentication
   SSLVersion            Auto                                                yes       Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
   ShowProgress          true                                                yes       Display progress messages during a scan
   ShowProgressPercent   10                                                  yes       The interval in percent that progress should be shown
   UserAgent             Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)  no        The User-Agent header to use for all requests
   VERBOSE               false                                               no        Enable detailed status messages
   WORKSPACE                                                                 no        Specify the workspace for this module
   WPCHECK               true                                                yes       Check if the website is a valid WordPress install
   WPCONTENTDIR          wp-content                                          yes       The name of the wp-content directory

Auxiliary Actions


This is a list of all auxiliary actions that the scanner/http/wordpress_scanner module can do:

msf6 auxiliary(scanner/http/wordpress_scanner) > show actions

Auxiliary actions:

   Name  Description
   ----  -----------

Evasion Options


Here is the full list of possible evasion options supported by the scanner/http/wordpress_scanner auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 auxiliary(scanner/http/wordpress_scanner) > show evasion

Module evasion options:

   Name                          Current Setting  Required  Description
   ----                          ---------------  --------  -----------
   HTTP::header_folding          false            no        Enable folding of HTTP headers
   HTTP::method_random_case      false            no        Use random casing for the HTTP method
   HTTP::method_random_invalid   false            no        Use a random invalid, HTTP method for request
   HTTP::method_random_valid     false            no        Use a random, but valid, HTTP method for request
   HTTP::pad_fake_headers        false            no        Insert random, fake headers into the HTTP request
   HTTP::pad_fake_headers_count  0                no        How many fake headers to insert into the HTTP request
   HTTP::pad_get_params          false            no        Insert random, fake query string variables into the request
   HTTP::pad_get_params_count    16               no        How many fake query string variables to insert into the request
   HTTP::pad_method_uri_count    1                no        How many whitespace characters to use between the method and uri
   HTTP::pad_method_uri_type     space            no        What type of whitespace to use between the method and uri (Accepted: space, tab, apache)
   HTTP::pad_post_params         false            no        Insert random, fake post variables into the request
   HTTP::pad_post_params_count   16               no        How many fake post variables to insert into the request
   HTTP::pad_uri_version_count   1                no        How many whitespace characters to use between the uri and version
   HTTP::pad_uri_version_type    space            no        What type of whitespace to use between the uri and version (Accepted: space, tab, apache)
   HTTP::uri_dir_fake_relative   false            no        Insert fake relative directories into the uri
   HTTP::uri_dir_self_reference  false            no        Insert self-referential directories into the uri
   HTTP::uri_encode_mode         hex-normal       no        Enable URI encoding (Accepted: none, hex-normal, hex-noslashes, hex-random, hex-all, u-normal, u-all, u-random)
   HTTP::uri_fake_end            false            no        Add a fake end of URI (eg: /%20HTTP/1.0/../../)
   HTTP::uri_fake_params_start   false            no        Add a fake start of params to the URI (eg: /%3fa=b/../)
   HTTP::uri_full_url            false            no        Use the full URL for all HTTP requests
   HTTP::uri_use_backslashes     false            no        Use back slashes instead of forward slashes in the uri
   HTTP::version_random_invalid  false            no        Use a random invalid, HTTP version for request
   HTTP::version_random_valid    false            no        Use a random, but valid, HTTP version for request

Go back to menu.


Go back to menu.

See Also


Check also the following modules related to this module:

Authors


  • Christian Mehlmauer
  • h00die

Version


This page has been produced using Metasploit Framework version 6.1.24-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.