Certified Ethical Hacker (CEH) — Question 110
Which command lets a tester enumerate alive systems in a class C network via ICMP using native Windows tools?
Answer options
- A. ping 192.168.2.
- B. ping 192.168.2.255
- C. for %V in (1 1 255) do PING 192.168.2.%V
- D. for /L %V in (1 1 254) do PING -n 1 192.168.2.%V | FIND /I "Reply"
Correct answer: D
Explanation
The correct answer, D, uses a loop to ping each address in the range from 192.168.2.1 to 192.168.2.254, checking for replies. Options A and B do not enumerate all hosts; A only sends a ping to the base address and B to the broadcast address, which does not confirm individual live hosts. Option C has a syntax error in the loop that prevents it from achieving the intended enumeration.