312-50V9 · Question #492
A company has five different subnets: 192.168.1.0, 192.168.2.0, 192.168.3.0, 192.168.4.0 and 192.168.5.0. How can NMAP be used to scan these adjacent Class C networks?
The correct answer is A. NMAP -P 192.168.1-5. NMAP supports hyphen-based octet range notation to scan multiple consecutive subnets in a single command without over-scanning an entire supernet.
Question
A company has five different subnets: 192.168.1.0, 192.168.2.0, 192.168.3.0, 192.168.4.0 and 192.168.5.0. How can NMAP be used to scan these adjacent Class C networks?
Options
- ANMAP -P 192.168.1-5.
- BNMAP -P 192.168.0.0/16
- CNMAP -P 192.168.1.0,2.0,3.0,4.0,5.0
- DNMAP -P 192.168.1/17
How the community answered
(33 responses)- A79% (26)
- B6% (2)
- C12% (4)
- D3% (1)
Why each option
NMAP supports hyphen-based octet range notation to scan multiple consecutive subnets in a single command without over-scanning an entire supernet.
NMAP's target specification allows a hyphen within any octet to define a range, so 192.168.1-5.* targets all hosts across subnets 192.168.1.0 through 192.168.5.0 inclusive. This precisely matches the five specified adjacent class C networks without scanning unintended address space. The range notation is a native NMAP feature documented in its target specification guide.
192.168.0.0/16 is a class B supernet that encompasses all 256 subnets from 192.168.0.0 to 192.168.255.255, far exceeding the five intended target subnets.
The comma-separated partial octet syntax 192.168.1.0,2.0,3.0,4.0,5.0 is not valid NMAP notation - comma separation requires fully qualified IP addresses, not partial octets.
192.168.1/17 is malformed CIDR notation and does not represent a valid network address, making it an unrecognized target specification.
Concept tested: NMAP octet range notation for multiple adjacent subnets
Source: https://nmap.org/book/man-target-specification.html
Topics
Community Discussion
No community discussion yet for this question.