CompTIA PenTest+ (PT0-002) — Question 67
A security analyst needs to perform a scan for SMB port 445 over a/16 network. Which of the following commands would be the BEST option when stealth is not a concern and the task is time sensitive?
Answer options
- A. Nmap -s 445 -Pn -T5 172.21.0.0/16
- B. Nmap -p 445 -n -T4 -open 172.21.0.0/16 С. Nmap -sV --script=smb* 172.21.0.0/16
- D. Nmap -p 445 -max -sT 172. 21.0.0/16
Correct answer: B
Explanation
Option B is the correct answer because it uses the -p flag to specify the port, -n to skip DNS resolution, and -T4 for faster execution, making it ideal for time-sensitive tasks. Options A and D contain incorrect syntax and flags that do not effectively accomplish the scanning task, while option C focuses on service detection and scripts, which is unnecessary given the requirement for speed.