CompTIA PenTest+ (PT0-002) — Question 317
A client has requested that the penetration test scan include the following UDP services: SNMP. NetBIOS, and DNS. Which of the following Nmap commands will perform the scan?
Answer options
- A. nmap -vv sUV -p 53, 123-159 10.10.1.20/24 -oA udpscan
- B. nmap -vv sUV -p 53,123,161-162 10.10.1.20/24 -oA udpscan
- C. nmap -vv sUV -p 53,137-139,161-162 10.10.1.20/24 -oA udpscan
- D. nmap -vv sUV -p 53, 122-123, 160-161 10.10.1.20/24 -oA udpscan
Correct answer: C
Explanation
The correct answer is C because it includes the ports for DNS (53), NetBIOS (137-139), and SNMP (161-162). Option A incorrectly includes ports 123-159, which do not correspond to the requested services. Option B is missing the NetBIOS ports, and option D includes incorrect port ranges that do not match the specified services.