PT0-002 · Question #227
The attacking machine is on the same LAN segment as the target host during an internal penetration test. Which of the following commands will BEST enable the attacker to conduct host delivery and…
The correct answer is A. nmap -sn -n -exclude 10.1.1.15 10.1.1.0/24 -oA target_txt. To conduct host discovery on a LAN segment, write results to files, and exclude the attacking machine, the Nmap command nmap -sn -n -exclude 10.1.1.15 10.1.1.0/24 -oA target_txt is the most appropriate.
Question
The attacking machine is on the same LAN segment as the target host during an internal penetration test. Which of the following commands will BEST enable the attacker to conduct host delivery and write the discovery to files without returning results of the attack machine?
Options
- Anmap -sn -n -exclude 10.1.1.15 10.1.1.0/24 -oA target_txt
- Bnmap -iR 10 -n -oX out.xml | grep "Nmap" | cut -d " " -f5 > live-hosts.txt
- Cnmap -Pn -sV -O -iL target.txt -oA target_text_Service
- Dnmap -sS -Pn -n -iL target.txt -oA target_txtl
How the community answered
(50 responses)- A70% (35)
- B8% (4)
- C4% (2)
- D18% (9)
Why each option
To conduct host discovery on a LAN segment, write results to files, and exclude the attacking machine, the Nmap command `nmap -sn -n -exclude 10.1.1.15 10.1.1.0/24 -oA target_txt` is the most appropriate.
The `nmap -sn` command performs a fast host discovery (ping scan), `-n` disables reverse DNS resolution for speed, `-exclude 10.1.1.15` prevents the attacking machine from being included in the results, `10.1.1.0/24` specifies the target LAN segment, and `-oA target_txt` saves the output in all standard Nmap formats to files.
`nmap -iR 10` scans 10 random hosts, which does not target the specified LAN segment and is not suitable for comprehensive host discovery on a known network.
`nmap -Pn -sV -O` performs an aggressive scan with service and OS detection and disables ping, which is not primarily for quick host discovery and does not include an exclusion for the attacking machine.
`nmap -sS -Pn` performs a SYN stealth port scan and disables ping, which goes beyond simple host discovery and does not include an exclusion for the attacking machine.
Concept tested: Nmap host discovery and output options
Source: https://nmap.org/book/man-host-discovery.html
Topics
Community Discussion
No community discussion yet for this question.