{"id":1541,"date":"2018-11-28T23:21:39","date_gmt":"2018-11-28T20:21:39","guid":{"rendered":"http:\/\/kifarunix.com\/?p=1541"},"modified":"2024-03-11T21:29:08","modified_gmt":"2024-03-11T18:29:08","slug":"install-use-wpscan-wordpress-vulnerability-scanner-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-use-wpscan-wordpress-vulnerability-scanner-ubuntu-18-04\/","title":{"rendered":"How to Install and Use WPScan WordPress Vulnerability Scanner Ubuntu 18.04"},"content":{"rendered":"\n<p>This guide discusses how to Install and Use WPScan WordPress Vulnerability Scanner Ubuntu 18.04.&nbsp;<a href=\"https:\/\/wpscan.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">WPScan<\/a>, which is an acronym for WordPress Security Scanner, is a free black box vulnerability scanner written on <span class=\"ILfuVd\"><b>Ruby<\/b> programming language<\/span> to help security professionals and blog maintainers to test the vulnerabilities on their WordPress sites. It helps unearth any vulnerability associated with WordPress themes, plugins, or any other security threat harbored on a WordPress site.<\/p>\n\n\n\n<p>Are you using WordPress and looking for a professional WordPress website builder platform? Look no further since&nbsp;<a href=\"https:\/\/trk.elementor.com\/8uczdzzsxgza-webcreatorsred\" target=\"_blank\" rel=\"noreferrer noopener\">Elementor can help you create beautiful pages<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing WPScan Ubuntu 18.04<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites<\/h3>\n\n\n\n<p>Before you can install WordPress Security Scanner (WPScan), ensure that the following dependencies are installed.Also ensure that your system is up-to-date. This can be done by running the commands below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt update\nsudo apt upgrade<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt install curl git libcurl4-openssl-dev make zlib1g-dev gawk g++ gcc libreadline6-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config ruby ruby-bundler ruby-dev -y<\/pre>\n\n\n\n<p>WPScan can either be installed fron RubyGem repositories or from sources. The former is simpler as it involves a one line command.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install from RubyGem<\/h3>\n\n\n\n<p>To install WPScan from RubyGem repositories, run the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gem install wpscan<\/pre>\n\n\n\n<p>You can at the same time uninstall WPScan by running the command;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gem uninstall wpscan<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Install WPScan Sources<\/h4>\n\n\n\n<p>To install WPScan from sources, you first need to its Github repository.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">git clone https:\/\/github.com\/wpscanteam\/wpscan<\/pre>\n\n\n\n<p>Once the cloning is done, navigate to WPScan directory and run the commands below to do the installation.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd wpscan\/\nbundle install\nsudo rake install<\/pre>\n\n\n\n<p>Do you have patience? If you don&#8217;t, this is where might have to learn to have a little since it may take some few mins to complete the installation. If the installation is successful, you should see such an output.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>...<\/strong>\n  48) WPScan::Vulnerability behaves like WPScan::References references when references provided as array \n     # Temporarily skipped with xit\n     # .\/spec\/shared_examples\/references.rb:45\n\n\nFinished in 8 minutes 54 seconds (files took 15.12 seconds to load)\n17914 examples, 0 failures, 48 pending\n\nCoverage report generated for RSpec to $HOME\/wpscan\/coverage. 1709 \/ 2006 LOC (85.19%) covered.\nwpscan 3.4.0 built to pkg\/wpscan-3.4.0.gem.\n<strong>wpscan (3.4.0) installed<\/strong>.<\/pre>\n\n\n\n<p>Well, WPScan is successfully installed on Ubuntu 18.04. To obtain a description of various command line options used with WPScan, run <code><strong>wpscan<\/strong><\/code> command with <code><strong>-h\/--help<\/strong><\/code> option;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>wpscan -h<\/strong>\n_______________________________________________________________\n        __          _______   _____\n        \\ \\        \/ \/  __ \\ \/ ____|\n         \\ \\  \/\\  \/ \/| |__) | (___   ___  __ _ _ __ \u00ae\n          \\ \\\/  \\\/ \/ |  ___\/ \\___ \\ \/ __|\/ _` | '_ \\\n           \\  \/\\  \/  | |     ____) | (__| (_| | | | |\n            \\\/  \\\/   |_|    |_____\/ \\___|\\__,_|_| |_|\n\n        WordPress Security Scanner by the WPScan Team\n                       <strong>Version 3.4.0<\/strong>\n          Sponsored by Sucuri - https:\/\/sucuri.net\n      @_WPScan_, @ethicalhack3r, @erwan_lr, @_FireFart_\n_______________________________________________________________\n\nUsage: wpscan [options]\n        --url URL                                 The URL of the blog to scan\n                                                  Allowed Protocols: http, https\n                                                  Default Protocol if none provided: http\n                                                  This option is mandatory unless update or help or hh or version is\/are supplied\n    -h, --help                                    Display the simple help and exit\n        --hh                                      Display the full help and exit\n        --version                                 Display the version and exit\n    -v, --verbose                                 Verbose mode\n        --[no-]banner                             Whether or not to display the banner\n                                                  Default: true\n    -o, --output FILE                             Output to FILE\n    -f, --format FORMAT                           Output results in the format supplied\n                                                  Available choices: cli-no-color, json, cli, cli-no-colour\n        --detection-mode MODE                     Default: mixed\n                                                  Available choices: mixed, passive, aggressive\n        --user-agent, --ua VALUE\n        --random-user-agent, --rua                Use a random user-agent for each scan\n        --http-auth login:password\n<strong>&lt;output cut&gt;<\/strong><\/pre>\n\n\n\n<p>Go through the whole output to see various options that can be used with <strong>wpscan<\/strong> command.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Scanning for Vulnerabilities<\/h3>\n\n\n\n<p>In this guide, we are going to show you a few examples on how to perform WordPress blog vulnerability scanning. Ensure that you run the examples below against your <strong>OWN<\/strong> blog. It is illegal to scan other people&#8217;s sites.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Scan the whole WordPress blog<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">wpscan --url wordpress.example.com<\/pre>\n\n\n\n<p>WPScan can scan both <strong>http<\/strong> and <strong>https<\/strong> protocols. If not specified, it will scan <strong>http<\/strong> by default.<\/p>\n\n\n\n<p>If you want to save the scanner output results in a file, use the <code><strong>-o\/--output<\/strong><\/code> option.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wpscan --url http:\/\/wordpress.example.com -o scan-test<\/pre>\n\n\n\n<p>There are three detection modes in which wpscan can run against a WordPress site; <code><strong>passive<\/strong><\/code>, <code><strong>aggressive<\/strong><\/code>, <code><strong>mixed(default)<\/strong><\/code>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <code><strong>passive<\/strong><\/code> mode runs a non-intrusive detection i.e it sents a few requests to the server. It commonly scans the home page for any vulnerability. The passive mode is less likely to be detected by IDS\/IPS solutions.<\/li>\n\n\n\n<li>The <code><strong>aggressive<\/strong><\/code> mode on the other hand performs a more intrusive scan as it sents a thousand request to the server. It tries all the possible plugins even if the plugin has no known vulnerabilities linked to it. This may result in an increased load on the target server.<\/li>\n\n\n\n<li>The <code><strong>mixed(default)<\/strong><\/code> mode uses a mixture of both aggressive and passive.<\/li>\n<\/ul>\n\n\n\n<p>To specify detection mode;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wpscan --url wordpress.example.com -o test --detection-mode aggressive<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Check for Vulnerable Plugins<\/h4>\n\n\n\n<p>To scan for vulnerable plugins on your WordPress blog, pass the <code><strong>-e\/--enumerate [OPTS]<\/strong><\/code> option to the wpscan command where <code><strong>[OPTS]<\/strong><\/code> can be; <code><strong>vp<\/strong> (vulnerable plugins)<\/code>, <code><strong>ap<\/strong> (all plugins)<\/code>, <code><strong>p <\/strong>(plugins)<\/code>. For example to scan for every plugin which has vulnerabilities linked to it,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wpscan --url wordpress.example.com -e vp<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Check for Vulnerable Themes<\/h4>\n\n\n\n<p>Just like we used the <code><strong>-e\/--enumerate [OPTS]<\/strong><\/code> option to check for vulnerable plugins, the same can be done when checking for vulnerable themes with the <code><strong>[OPTS]<\/strong><\/code> being any of the following; <code><strong>vt <\/strong>(Vulnerable themes)<\/code>, <code><strong>at <\/strong>(All themes)<\/code>, <code><strong>t <\/strong>(Themes)<\/code>. For example to scan for themes with known vulnerabilities;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wpscan --url wordpress.example.com -e vt<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Enumerate WordPress Users<\/h4>\n\n\n\n<p>To find out the users that can login to WordPress site, you would pass the <code><strong>-e\/--enumerate u<\/strong><\/code> option to wpscan where <code><strong>u<\/strong><\/code> basically means the user IDs.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wpscan --url wordpress.example.com -e u<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Test for Password Strength\/Bruteforce Attack against a WordPress User<\/h4>\n\n\n\n<p>Once you have enumerated the usernames, you can try to perform a brute-force attack again them as shown below. This process may be a bit slower depending on the number of passwords specified in the password file <code><strong>(-P, --passwords FILE-PATH)<\/strong><\/code> and number of threads <code><strong>(-t, --max-threads VALUE)<\/strong><\/code> you are using. For example to brute-force an admin,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wpscan --url wordpress.example.com <strong>-P<\/strong> password-file.txt <strong>-U<\/strong> admin -<strong>t<\/strong> 50<\/pre>\n\n\n\n<p>To test for password strength for multiple users, you would use the same command above this time round without the specific username specified.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wpscan --url wordpress.example.com <strong>-P<\/strong> password-file.txt <strong>-t<\/strong> 50<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Run WordPress scan in undetectable mode<\/h4>\n\n\n\n<p>To run wpscan in a stealthy mode which basically means <code><strong>(--random-user-agent --detection-mode passive --plugins-version-detection passive)<\/strong><\/code>, specify the <code><strong>--stealthy<\/strong><\/code> option.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wpscan --url wordpress.example.com <strong>--stealthy<\/strong><\/pre>\n\n\n\n<p>That is all about WPScan. Feel free to explore this useful tool.&nbsp; We hope this article was helpful.<\/p>\n\n\n\n<p>You can also check our previous articles on;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a title=\"How to Install and Use Nikto Web Scanner on Ubuntu 18.04\" href=\"https:\/\/kifarunix.com\/how-to-install-and-use-nikto-web-scanner-on-ubuntu-18-04\/\" rel=\"bookmark\">How to Install and Use Nikto Web Scanner on Ubuntu 18.04<\/a><\/li>\n\n\n\n<li><a title=\"How to Install and Configure Nessus Scanner on Ubuntu 18.04\/CentOS 7\" href=\"https:\/\/kifarunix.com\/how-to-install-configure-and-use-nessus-vulnerability-scanner-on-ubuntu-18-04\/\" rel=\"bookmark\">How to Install and Configure Nessus Scanner on Ubuntu 18.04\/CentOS 7<\/a><\/li>\n\n\n\n<li><a title=\"How to Install and Setup OpenVAS 9 Vulnerability Scanner on Ubuntu 18.04\" href=\"https:\/\/kifarunix.com\/how-to-install-and-setup-openvas-9-vulnerability-scanner-on-ubuntu-18-04\/\" rel=\"bookmark\">How to Install and Setup OpenVAS 9 Vulnerability Scanner on Ubuntu 18.04<\/a><\/li>\n<\/ul>\n\n\n\n<p>Happy vulnerability hunting.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide discusses how to Install and Use WPScan WordPress Vulnerability Scanner Ubuntu 18.04.&nbsp;WPScan, which is an acronym for WordPress Security Scanner, is a free<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[34,150,263],"tags":[1522,1523,67,264,1524],"class_list":["post-1541","post","type-post","status-publish","format-standard","hentry","category-security","category-vulnerability-scanners","category-wpscan","tag-install-wpscan-ubuntu-18-04","tag-scan-wordpress-site-with-wpscan","tag-ubuntu-18-04","tag-wpscan","tag-wpscan-ubuntu-18-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/1541"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=1541"}],"version-history":[{"count":10,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/1541\/revisions"}],"predecessor-version":[{"id":21051,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/1541\/revisions\/21051"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=1541"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=1541"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=1541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}