A penetration tester needs to scan a remote infrastructure with Nmap. The tester issues the following command:
nmap 10.10.1.0/24
Which of the following is the number of TCP ports that will be scanned?
Correct Answer: B
By default, Nmap scans the top 1,000 most commonly used TCP ports unless otherwise specified.
Option A (256) #: Incorrect. This refers to the number of hosts in a /24 subnet, not the number of ports scanned.
Option B (1,000) #: Correct. Nmap defaults to scanning the 1,000 most common TCP ports unless the -p flag is used to specify a different range.
Option C (1,024) #: Incorrect. The first 1,024 ports are well-known ports, but Nmap scans 1,000 by default, not 1,024.
Option D (65,535) #: Incorrect. Nmap only scans all ports if the -p- flag is used (e.g., nmap -p- <target>).
# Reference: CompTIA PenTest+ PT0-003 Official Guide - Network Scanning with Nmap