1

Quick Nmap question. If there are X amount of ports per machine to scan and I want to scan 2 machines at once (no more no less), is there any way of forcing nmap to always be scanning 2 different machines? Further question: If there is an odd number of machines will both threads converge on one IP or is there a way of stopping that.

2
  • 1
    why not run 2 consecutive scans to make sure?
    – schroeder
    Commented Dec 12, 2018 at 14:35
  • Why are you concerned about the last remaining target? Are you assuming Nmap will scan the last target twice? It will not. Commented Dec 28, 2018 at 17:52

2 Answers 2

3

I believe the flag that you're looking for would be max-parellelism

TIMING AND PERFORMANCE:
 Options which take <time> are in seconds, or append 'ms' (milliseconds),
 's' (seconds), 'm' (minutes), or 'h' (hours) to the value (e.g. 30m).
 -T<0-5>: Set timing template (higher is faster)
 --min-hostgroup/max-hostgroup <size>: Parallel host scan group sizes
 --min-parallelism/max-parallelism <numprobes>: Probe parallelization
 --min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <time>: Specifies
     probe round trip time.
 --max-retries <tries>: Caps number of port scan probe retransmissions.
 --host-timeout <time>: Give up on target after this long
 --scan-delay/--max-scan-delay <time>: Adjust delay between probes
 --min-rate <number>: Send packets no slower than <number> per second
 --max-rate <number>: Send packets no faster than <number> per second
3
  • 1
    Welcome and thanks for answering a question! Could you mention where you found the information? Then others can learn where to look and, if needed, they can find more info at the source.
    – Luc
    Commented Dec 12, 2018 at 16:05
  • But are IP addresses exclusive to the thread? I can't have 2 threads scanning the same address
    – BlueMan400
    Commented Dec 12, 2018 at 16:35
  • @BlueMan400 what do you mean you can't have 2 threads scanning? This is the point of paralleling. I would check for yourself. Run the command and run wireshark and run (or download and run) atop and then track through the history and see what's happening and report back.
    – bashCypher
    Commented Dec 12, 2018 at 23:17
0

Nmap scans in parallel by default, but not by using threads. Instead, it uses non-blocking I/O functions to continue sending new probes while it waits for responses to old ones. For most scan types, this involves running a packet capture during the scan and alternating between sending new probes and processing captured response packets. There are lots of options for tuning performance.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .