Sign inSign up

gagarter/autonmap

By gagarter

•Updated over 4 years ago

Automate those boring initial Nmap scans with autoNmap. Extremely lightweight!

Image
0

213

gagarter/autonmap repository overview

⁠autoNmap

Simple wee tool for automating your initial scans.

With this tool you can automate the process and hopefully help your busy day.

The Docker image is as lightweight as less than 12MB!! Link to the image in Docker Hub⁠

⁠Requisites

  • Docker installed and the Docker Engine running
  • The autoNmap_self_deploy.sh⁠` script alongside Docker will handle the rest for you!

⁠But... Why?

You probably have come across repeating the same first step over and over again: your Nmap scan.

I know there are other cooler tools out there, like nmapAutomator⁠, but I wanted to test my skills and create my own cool, slim, dockerised tool for a quick deployment and, you know, I love to see how it destroys itself! So it will be like it was never there, for you to not to worry about extra cleaning up after the test.

You will find the Docker image to be as light as possible. This is, an Alpine distro with the bare minimums for Nmap to be able to run, so any cool tools that could have positively enriched the script beyond a POSIX shell or the built-in scripts within Alpine have been left out to compromise high-resources over portability.

The coolest thing about all this? If you choose to use the autoNmap self-deployer⁠, you will only need to do the following:

./autoNmap_self_deploy.sh <Target/TargetsFile> <outputName>

... and it will, without you doing anything:

  1. Build/pull the Docker image and run the container
  2. Create ./nmap/ directory in your current folder and mount it in the container using Docker volumes
  3. Pass your arguments to the autoNmap script inside the Docker container
  4. Start scanning your target (or your list of targets), one by one, only attacking those ports that it finds open, both TCP and the top 1000 UDP ports. (If you want more UDP ports to be scanned, feel free to edit line 86 of autoNmap⁠
  5. It will be saving all the Nmap output files in the ./nmap/ dir we created earlier. They will be syncing live so you can start checking those initial scans while you wait for the aggressive / UDP ones!
  6. Self-destruction!!!!!! The script will kill the container from your machine to free up any dangling resources.

⁠Do you want to try it out?

Try it straight away with this one-liner:

curl -LJO https://raw.githubusercontent.com/0x5ubt13/myToolkit/main/autoNmap/autoNmap_self_deploy.sh; ./autoNmap_self_deploy.sh 127.0.0.1 localhost_test

⁠Disclaimer

As you see, a lot of dangerous sudo stuff happens behind the scenes. All the code involved is here for you to review. If you have any doubts, feel free to reach out!

⁠To Do:
  • Implement ability to directly pass arguments whilst calling the script
  • Experimenting with nice colors
  • Also remove the Docker image to truly make it like look like it never happened
  • Always open to more suggestions!! Your feedback is appreciated :)

Tag summary

Content type

Image

Digest

Size

11.3 MB

Last updated

over 4 years ago

docker pull gagarter/autonmap