Launching Nmap scans remotely from a web browser using Rainmap Lite
Rainmap Lite is a web application designed for running Nmap scans from any web browser. It was designed to be light and to depend on as few dependencies as possible. It is perfect for installing on a remote server and then just logging in from your phone and scheduling scans when you are on the road.
In this recipe, you will learn how to launch a Nmap scan using Rainmap Lite.
Getting ready
To run Rainmap Lite, we need to download the code and run the application as follows:
- Grab the latest stable version of Rainmap Lite:
$git clone https://github.com/cldrn/rainmap-lite.git
- Install Django and the only project dependency,
lxml
:
$ pip install Django $ pip install lxml
- Change your working directory to the newly created folder and create the database schema:
$python manage.py migrate
- Load the default scanning profiles:
$python manage.py loaddata nmapprofiles
- Locate
nmaper-cronjob.py
and update theBASE_URL
,SMTP_SERVER
,SMTP_USER
,SMTP_PASS
, andSMTP_PORT
variables to reflect your installation. - Run the application:
#python manage.py runserver 127.0.0.1:8080
- Add a cron task that executes the agent periodically:
*/5 * * * * cd <App path> && /usr/bin/python nmaper-cronjob.py >> /var/log/nmaper.log 2>&1
- And finally, don't forget to add an administrative user:
$ python manage.py createsuperuser
How to do it...
Point your favorite web browser to the URL where Rainmap Lite is running. If you follow the steps described previously, it should be running on port 8080
.
The interface was designed to require as little typing as possible. Just fill in the field for target, select a scan profile from the drop-down list, and enter the e-mail address where you would like to receive the report. Hit SCAN
when you are ready to add your scan to the queue:
How it works...
Rainmap Lite is a simple Django application that allows users to schedule and run Nmap scans from any web browser. The application was designed to be easy to install on any server, and it is great for installing on a remote VPS and use the interface to schedule scans and share the results with your team.
An important aspect is that it is based on a standard cron agent to reduce the number of dependencies. A more robust queue will probably be implemented in the future.
This project is very young and started as a personal project that I decided to share at Blackhat US Arsenal 2016. Feel free to send any bug report or suggestion to the project's GitHub page directly:
https://github.com/cldrn/rainmap-lite
There's more...
Scan profiles can be customized from the management console. The scanning profiles are updated in every version, and you are invited to contribute your own to the project's wiki at https://github.com/cldrn/rainmap-lite/wiki/Scanning-profiles.
Custom arguments
Custom arguments may be added on the fly without accessing the administration console by checking the box with the Custom Nmap arguments
option: