How to use dnmap in kali linux
In this tutorial we will learn about dnmap client and dnmap server tool. This can be little be complicated but read carefully. I am sure you will get what and how I am trying to explain here.
What is dnmap- dnmap is a framework to distribute nmap scans among several clients. It reads an already created file with nmap commands and send those commands to each client connected to it.
The framework use a client/server architecture. The server knows what to do and the clients do it. All the logic and statistics are managed in the server. Nmap output is stored on both server and client.
Usually you would want this if you have to scan a large group of hosts and you have several different internet connections.
For performingthis tutorial we need at least a Attacker machine ( Kali Linux – 192.168.71.129) and Target machine (192.168.71.128).
Features of dnmap server
- If the server gets down, clients continue trying to connect until the server gets back online.
- If the server gets down, when you put it up again it will send commands starting from the last command given before the shutdown. You do not need to remember where it was.
- You can add new commands to the original file without having to stop the server. The server will read them automatically.
- If some client goes down, the server will remember which command it was executing and it will re-schedule it for later.
- It will store every detail of the operations in a log file.
- It shows real time statistics about the operation of each client, including:
- Number of commands executed
- Last time seen
- Uptime
- Version of the client
- If the client is being run as root or not.
- It calculates the amount of commands executed per minute
- The historic average of the amount of commands executed per minute
- The status of the client (Online, Offline, Executing or Storing)
- You can choose which port to use. Defaults to 46001
- Only the Online clients are shown in the running stats.
Features of dnmap client
- If the server gets down, it keeps connecting to it until it gets up again.
- Strip strange characters from the command sent by the server. Tries to avoid command injection vulns.
- It only executes the nmap command. It deletes the command send by the server and changes it by the known and trusted nmap binary on the system.
- You can select an alias for your user.
- You can change which port the client connects to.
- If the command sent by the server does not have a -oA option, the client add it anyway to the command, so it will always have a local copy of the output.
- If the server sends a min-rate parameter, it is striped out.
- You can control the nmap scanning rate regarthless of servers sent parameters.
- Tell the server if you are root or not, so it can change the nmap commands accordingly.
First of all start dnmap server
1. How to open dnmap server
A. GUI Method
Application →Kali Linux → Information gathering → Live Host Identification → dnmap-server
(click on image for large view)
B. Open Terminal type dnmap_server and hit enter
2. As you can see, the server requires a file containing our Nmap commands to run.
3. Using Gvim create a file named commands.txt –
a. how to open Gvim GUI method
Application →Accessories → GVim
b. now write some simple nmap command and save it as named commands.txt
To show the ability to schedule multiple jobs, we add multiple Nmap commands to our file. Since we only have one target host, we are simply going to split up the port ranges between jobs. If we had more than one client in our cluster, these jobs would be distributed among the hosts, and it would be difficult for the target host administrator to tell that one attacker was behind the port scan.
4. Now run dnmap_server command with nmap command file
Ex – /usr/bin/ dnmap_server -f commands.txt
After running this command our server started up and waiting for clients.
5. Now time to start dnmap_client
A. How to open dnmap_client
a. GUI Method
Application →Kali Linux → Information gathering → Live Host Identification → dnmap-client
b. open terminal type dnmap_client and hit enter
6. Here simple we need to provide server address for our client to connect to the server, and start running commands.
7. we have done now just back on the server, we see the following status:
8. Here is our output files inside the nmap_output folder which is automatically created.
(click on image for large view)
Like it ? Share it.