nerdexam
EC-Council

312-50V11 · Question #599

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 octet range notation using a hyphen to specify multiple values in a single octet, allowing efficient targeting of consecutive subnets without scanning overly broad address ranges.

Scanning Networks

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

(56 responses)
  • A
    91% (51)
  • B
    2% (1)
  • C
    2% (1)
  • D
    5% (3)

Why each option

Nmap supports octet range notation using a hyphen to specify multiple values in a single octet, allowing efficient targeting of consecutive subnets without scanning overly broad address ranges.

ANMAP -P 192.168.1-5.Correct

Nmap's range notation allows you to specify a range within any octet using a hyphen, so '192.168.1-5.0' targets only the third octets 1 through 5, precisely matching the five subnets 192.168.1.0 through 192.168.5.0. This is more precise than a CIDR block that would include unintended addresses, and it is the correct Nmap syntax for this use case.

BNMAP -P 192.168.0.0/16

192.168.0.0/16 is a /16 CIDR block covering all 65,536 addresses in the entire 192.168.x.x space, which vastly exceeds the five target subnets and would scan many unintended hosts.

CNMAP -P 192.168.1.0,2.0,3.0,4.0,5.0

Comma-separated partial octets like '192.168.1.0,2.0,3.0,4.0,5.0' is not valid Nmap syntax; Nmap does not parse partial-octet comma lists in that format.

DNMAP -P 192.168.1/17

'192.168.1/17' is not valid Nmap or CIDR notation because the CIDR prefix must follow a complete IP address, and /17 would not map to the five specific subnets listed.

Concept tested: Nmap octet range notation for subnet scanning

Source: https://nmap.org/book/man-target-specification.html

Topics

#Nmap#subnet scanning#CIDR notation#network ranges

Community Discussion

No community discussion yet for this question.

Full 312-50V11 Practice