Periodic security checking, particularly on cloud server is important. Here is how to perform WordPress security test with Nmap NSE scripts. Previously we have some important guides like for brute force vulnerability checking(it is important to read before this guide in case you are completely new). In this guide we are showing quite basic things including installation, reading help of the scripts, running the scripts. NSE script is a big topic and actually it is beyond our capability to go in depth. But knowing and doing these basic operations will help to slowly learn the terminologies and tricks yourself. We are using a Ubuntu server running WordPress for this guide’s examples. Reconnaissance is crucial to a successful penetration test. Without proper reconnaissance, closing an exploit is going to be a guess work.
WordPress Security Test with Nmap NSE Scripts
Installing Nmap is easy :
1 | sudo apt-get install nmap |
You need to locate the nse scripts with locate utility and change directory to the script directory :
---
1 | locate *.nse |
You’ll get output like :
1 2 3 4 5 6 7 8 9 10 11 | /usr/share/nmap/scripts/acarsd-info.nse /usr/share/nmap/scripts/address-info.nse /usr/share/nmap/scripts/afp-brute.nse /usr/share/nmap/scripts/afp-ls.nse /usr/share/nmap/scripts/afp-path-vuln.nse /usr/share/nmap/scripts/afp-serverinfo.nse /usr/share/nmap/scripts/afp-showmount.nse /usr/share/nmap/scripts/ajp-auth.nse /usr/share/nmap/scripts/ajp-brute.nse /usr/share/nmap/scripts/ajp-headers.nse ... |
Change directory to /usr/share/nmap/scripts/
and do a ls
:
1 2 | cd /usr/share/nmap/scripts ls |
In case you want to find WordPress specific nse scrips you can pipe with grep :
1 | ls | grep wordpress |
You’ll find three files at this moment :
1 2 3 | http-wordpress-brute.nse http-wordpress-enum.nse http-wordpress-users.nse |
In order to read the help file, you have to run this kind of command :
1 | nmap -script-help http-wordpress-brute.nse |
In most easy simple form you can run the script in this way :
1 | nmap -sV --script http-wordpress-brute 127.0.0.1 |
You’ll get this kind of output :
1 | Starting Nmap 7.01 ( https://nmap.org ) at 2017-05-16 05:48 IST |
After a time you’ll get the full result :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Nmap scan report for localhost.localdomain (127.0.0.1) Host is up (0.000019s latency). Not shown: 996 closed ports PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.2 (Ubuntu Linux; protocol 2.0) 80/tcp open http nginx |_http-server-header: nginx 443/tcp open ssl/http nginx |_http-server-header: nginx | http-wordpress-brute: | Accounts: No valid accounts found |_ Statistics: Performed 18633 guesses in 599 seconds, average tps: 31 3306/tcp open mysql MySQL 5.6.32-78.1-log Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 613.35 seconds |
You can read the official documentation on Nmap WordPress NSE script related pages :
1 2 3 | https://nmap.org/nsedoc/scripts/http-wordpress-enum.html https://nmap.org/nsedoc/scripts/http-wordpress-users.html https://nmap.org/nsedoc/scripts/http-wordpress-brute.html |
There are other user created scripts like you can see few on GitHub’s this repo :
1 | https://github.com/peter-hackertarget/nmap-nse-scripts |
You’ll see installation of custom Nmap scripts for that repo is written. After test is done, do not keep the scripts on publicly available directory.
Tagged With create own nse script , http-wordpress-plugins nse nmap , nmap scripts http-wordpress-plugins nse download , nmap scripts to test network security , nmap ssh-brute nse , review nmap with nse scripts , wordpress nmap