WPScan – A Black Box WordPress Vulnerability Scanner

WordPress is all over the web; it’s the most popular and most used content management system (CMS) out there. Is your website or blog is powered by WordPress? Did you know that malicious hackers are always attacking WordPress sites every minute? If you didn’t, now you know.

The first step towards securing your website or blog is to perform a vulnerability assessment. This is simply an operation to identify common security loopholes (known to the public), within your site or its underlying architecture.

Read Also: WPSeku – A Vulnerability Scanner to Find Security Issues in WordPress

In this article, we will show you how to install and use the WPScan, a free scanner created for security professionals and website maintainers to test the security of their websites.

How to Install WPScan in Linux Systems

The recommended way of installing and running WPScan is to use the official Docker image, this will help you do away with installation problems (typically dependency issues).

You should have Docker installed and running on your system, otherwise start by installing it using the following, which will use the cURL program to download and run a shell script that will add the Docker repository to your system and install the needed packages.

$ sudo curl -fsSL https://get.docker.com | sh

Once the Docker is successfully installed, start the service, enable it to auto-start at system boot time and check if it’s up and running as follows.

# sudo systemctl start docker
# sudo systemctl enable docker
# sudo systemctl status docker

Next, pull the WPScan Docker image using the following command.

$ docker pull wpscanteam/wpscan
Download WPScan Docker Image

Download WPScan Docker Image

Once WPScan Docker image downloaded, you can list the Docker images on your system using following command.

$ docker images
List Docker Images

List Docker Images

Looking at the output from the following screesnhot, the WPScan repository image is wpscanteam/wpscan which you will use in the next section.

How to Perform WordPress Vulnerability Scan Using WPScan

The simplest way of performing a vulnerability scan using WPScan is to provide your WordPress website’s URL as shown (replace www.example.com with your site’s URL).

$ docker run wpscanteam/wpscan --url www.example.com

WPScan will try to find interesting HTTP headers such as SERVER (web server type and version) and X-POWERED-BY (PHP version); it will also look for any exposed APIs, RSS feed link and users.

Then it will go on to enumerate the WordPress version and checks if it is up to date or if there are any vulnerabilities associated with the detected version number. In addition, it will try to detect the theme as well as installed plugins to find it they are up to date.

Scan WordPress for Vulnerabilities

Scan WordPress for Vulnerabilities

You can perform a wordlist password brute force on enumerated users using 30 threads using the followin command. The --wordlist and --threads flags to specify the wordlist and set the number of threads receptively.

$ docker run wpscanteam/wpscan --url www.example.com --wordlist wordlist_file.txt --threads 30

To carry out a wordlist password brute force on the “admin” username only, run the following command.

$ docker run wpscanteam/wpscan --url www.example.com --wordlist wordlist_file.txt --username admin

Alternatively, you can mount a local wordlist on your system to the docker container and start a bruteforce attack for user admin.

$ docker run -it --rm -v ~/wordlists:/wordlists wpscanteam/wpscan --url www.example.com --wordlist /wordlists/wordlist_file.txt --username admin

To enumerate installed plugins, run the following command.

$ docker run wpscanteam/wpscan --url www.example.com --enumerate p

If enumerating installed plugins is not be enough, you can run all enumeration tools as shown.

$ docker run wpscanteam/wpscan --url www.example.com --enumerate

To enable output debugging, use the --debug-ouput flag, and redirect the output into a file for later analysis.

$ docker run wpscanteam/wpscan --url www.example.com --debug-output 2>debug.log

Last but not least, you can update WPScan’s database to the latest version by executing the following command.

$ docker run wpscanteam/wpscan --update

You can view the Docker and WPScan help messages with these commands.

$ docker -h  
$ docker run wpscanteam/wpscan -h

WPScan Github repository: https://github.com/wpscanteam/wpscan

That’s all for now! WPScan is a powerful black box WordPress vulnerability scanner that you should have in your arsenal of web security tools. In this guide, we showed how to install and use WPScan with some basic examples. Ask any questions or share your thoughts with us in the comments.

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

1 Response

  1. Darkpollo says:


    How do you output the file when running it from docker?

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.