PT0-001 · Question #135
A penetration tester is scanning a network for SSH and has a list of provided targets. Which of the following Nmap commands should the tester use?
The correct answer is A. nmap -p 22 -iL targets. The Nmap -iL flag reads target hosts from an input file, making it the correct choice when scanning a provided list of targets on a specific port.
Question
A penetration tester is scanning a network for SSH and has a list of provided targets. Which of the following Nmap commands should the tester use?
Options
- Anmap -p 22 -iL targets
- Bnmap -p 22 -sL targets
- Cnmap -p 22 -oG targets
- Dnmap -p 22 -oA targets
How the community answered
(46 responses)- A91% (42)
- B4% (2)
- C2% (1)
- D2% (1)
Why each option
The Nmap -iL flag reads target hosts from an input file, making it the correct choice when scanning a provided list of targets on a specific port.
The -p 22 flag restricts the scan to SSH port 22, and -iL (input list) instructs Nmap to read target IP addresses or hostnames from the specified file. Together, these flags perform a targeted SSH port scan against every host in the provided list, which matches the scenario exactly.
-sL performs a list scan that only resolves and enumerates hostnames without sending probe packets to any port, so no actual SSH scan is conducted.
-oG specifies grepable output format for writing scan results to a file and has no function for reading an input list of targets.
-oA outputs scan results simultaneously in normal, XML, and grepable formats and is strictly an output option, not an input mechanism.
Concept tested: Nmap -iL flag for scanning from an input target list
Source: https://nmap.org/book/man-input-output.html
Topics
Community Discussion
No community discussion yet for this question.