Based on a script released by Jerry Gamblin here
This runs an nmap scan on a list of targets and saves the results.
Subsequent scans will be compared with the last scan and if desired can be posted to slack
NOTE: You must ensure that you run this script and/or container responsibly. Dont be a jerk by using this to abuse stuff. You agree that you are responsible for running this script, not anyone else.
The script is set to save its data to /data
.
If you're running the script outside of the docker container you'll either need to change this in the script or create that directory on the machine you're running this from.
For saftey the script's default target is localhost ( 127.0.0.1 )
You can either change the script or run it like so
TARGETS="192.168.0.1" go.sh
If you're using the docker image append the following option to your docker command:
-e TARGETS="192.168.0.1"
You'll need:
- to setup your own bot on slack so you can get an API token pass it to the variable -
SLACK_TOKEN="xxx"
- The channel to post in. Pass this like so:
SLACK_CHAN="channelname"
- To enable the slack posting option. Pass the following as a variable:
SLACK_ENABLE="y"
You can get your slack bot variable from here: https://my.slack.com/services/new/bot
You can run it direct with the following
SLACK_ENABLE="Y" SLACK_CHAN="channel" SLACK_TOKEN="xxxx" go.sh
Or via docker with the following options set:
-e SLACK_ENABLE="Y" -e SLACK_CHAN="channel" -e SLACK_TOKEN="xxxx"
Run the container with the following command:
docker run -v /path/to/data:/data:rw -e SLACK_ENABLE="Y" -e SLACK_CHAN="channel" -e SLACK_TOKEN="xxxx" -e TARGETS="192.168.0.1" mcrmonkey/nmapdrone
-
-v /path/to/data:/data:rw
- If you want to preserve your scan data./path/to/data
is the path to the directory on your host where you want to save the data -
-e xxxx
- These set envionment variables
The original script was written by Jerry Gamblin ( @JGamblin on twitter and github ) and has been adapted by ant to work in a docker container
I've not applied one.
You can do what ever you like to this version. However, I'd ask you link back here if you make something based on this.