exam questions

Exam PT0-002 All Questions

View all questions & answers for the PT0-002 exam

Exam PT0-002 topic 1 question 223 discussion

Actual exam question from CompTIA's PT0-002
Question #: 223
Topic #: 1
[All PT0-002 Questions]

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 discovery and write the discovery to files without returning results of the attack machine?

  • A. nmap -sn -n -exclude 10.1.1.15 10.1.1.0/24 -oA target_txt
  • B. nmap -iR 10 -n -oX out.xml | grep "Nmap" | cut -d "" -f5 > live-hosts.txt
  • C. nmap -Pn -sV -O -iL target.txt -oA target_text_Service
  • D. nmap -sS -Pn -n -iL target.txt -oA target_txt1
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
masso435
Highly Voted 2 years, 7 months ago
Selected Answer: A
This excludes the attacker computer and does only a host discovery
upvoted 8 times
...
2Fish
Highly Voted 2 years, 4 months ago
Selected Answer: A
A, Same as Question#167
upvoted 8 times
...
Etc_Shadow28000
Most Recent 12 months ago
Selected Answer: A
A. nmap -sn -n -exclude 10.1.1.15 10.1.1.0/24 -oA target_txt Explanation: A. nmap -sn -n -exclude 10.1.1.15 10.1.1.0/24 -oA target_txt: • -sn: Performs a ping scan (host discovery) without port scanning. • -n: Disables DNS resolution to speed up the scan. • -exclude 10.1.1.15: Excludes the attack machine (with IP 10.1.1.15) from the scan results. • 10.1.1.0/24: Specifies the target network. • -oA target_txt: Outputs the results in three formats (normal, XML, and grepable) with the base filename target_txt. This command ensures that the scan focuses on discovering active hosts within the specified network range and excludes the attack machine’s IP address from the results. The results are saved to files for further analysis.
upvoted 2 times
...
pepgua
1 year ago
The MOST correct command for the attacker to conduct host discovery and write results to a file without including the attacker's machine is: A. nmap -sn -n -exclude 10.1.1.15 10.1.1.0/24 -oA target_txt Here's a breakdown of the options and why A is the best choice: -sn: Performs a SYN scan (ping sweep) to identify active hosts. -n: Disables DNS resolution, as the attacker is likely on the same LAN where IP addresses are more relevant. -exclude 10.1.1.15: Excludes the attacker's machine (assumed to be 10.1.1.15) from the scan results. 10.1.1.0/24: Specifies the target network range. -oA target_txt: Outputs the scan results in an appendable (A) text format file named "target_txt". In conclusion, option A effectively performs a ping sweep, excludes the attacker's machine, and saves the results in a text file, fulfilling the requirements of the scenario.
upvoted 2 times
...
solutionz
1 year, 10 months ago
Selected Answer: A
The given scenario describes an internal penetration test where the attacking machine needs to conduct host discovery on the same LAN segment without including results of the attack machine itself. Option A would be the best choice for this scenario. The other options either don't accomplish the desired host discovery, don't exclude the attacking machine, or use unnecessary options for this specific task.
upvoted 1 times
...
[Removed]
2 years, 2 months ago
Selected Answer: D
Option A: The -exclude option can be used to exclude a particular IP address from the scan, but it does not satisfy the requirement of writing the discovery to files without returning results of the attack machine. Therefore, this option is incorrect. Option B: The -iR option is used to specify the number of hosts to scan randomly, and it does not satisfy the requirement of discovering hosts on the same LAN segment. Additionally, the output of the command is not in a format suitable for writing the discovery to files. Therefore, this option is incorrect.
upvoted 1 times
[Removed]
2 years, 2 months ago
Option C: The -iL option is used to specify a list of targets to scan from a file, and the -oA option is used to output the results in multiple formats to the specified file prefix. The -Pn option is used to skip the host discovery stage and scan the specified targets directly. The -sV and -O options are used to perform version detection and operating system detection, respectively. This option does not satisfy the requirement of writing the discovery to files without returning results of the attack machine. Therefore, this option is incorrect.
upvoted 1 times
[Removed]
2 years, 2 months ago
Option D: The -sS option is used to perform a TCP SYN scan, which is a stealthy scanning technique that does not complete the TCP handshake and can be used to avoid detection. The -Pn option is used to skip the host discovery stage and scan the specified targets directly. The -n option is used to skip DNS resolution, which can save time during the scan. The -iL option is used to specify a list of targets to scan from a file, and the -oA option is used to output the results in multiple formats to the specified file prefix. This option satisfies the requirement of discovering hosts on the same LAN segment and writing the discovery to files without returning results of the attack machine. Therefore, this option is correct.
upvoted 1 times
...
...
...
cy_analyst
2 years, 3 months ago
Selected Answer: A
-sn: This option tells Nmap not to run a port scan on the target hosts, but rather to only determine if the hosts are online. -n: This option tells Nmap not to do DNS resolution on the IP addresses of the target hosts. -exclude: This option tells Nmap to exclude a specific IP address from the scan (in this case, the IP address of the attacking machine). 10.1.1.0/24: This specifies the target network range to scan. -oA target_txt: This option tells Nmap to output the results of the scan in three different formats: a human-readable text file, a machine-readable XML file, and a grepable file (in this case, all with the prefix "target_txt").
upvoted 3 times
...
nickwen007
2 years, 3 months ago
A. nmap -sn -n -exclude 10.1.1.15 10.1.1.0/24 -oA target_txt is the best command to enable the attacker to conduct host discovery and write the discovery to files without returning results of the attack machine. This command will perform a ping sweep scan, excluding the address of the attack machine, within a given network, outputs the finding in all the formats (txt, xml,grepable) and write them to target_txt file. The command nmap -sn -n -exclude 10.1.1.15 10.1.1.0/24 -oA target_txt will perform a ping sweep scan, which sends ICMP Echo Requests to every host in a specified network range to detect active hosts and identify their IP addresses. The "-exclude" option allows you to exclude certain hosts from being scanned, such as the attack machine in this case. The "-oA" option outputs the results in all the formats (txt, xml,grepable) and write them to target_txt file. Using this command, the attacker can conduct host discovery without returning results of the attack machine.
upvoted 3 times
...
[Removed]
2 years, 4 months ago
answer A is correct
upvoted 2 times
...
TKW36
2 years, 5 months ago
Selected Answer: A
Definitely A. The nmap command using the option -sn for a ping scan. The option -n to disable reverse DNS resolution, the option -exclude to exclude the IP address of the attack machine (10.1.1.15), and the option -oA to output the results in all formats (Normal, Grepable, and XML) to the target_txt file.
upvoted 5 times
...
kapen
2 years, 5 months ago
Selected Answer: B
I think B is correct cos it seems the emphasis is on "write the discovery to files without returning results of the attack machine" so I think any discovery will do , just don't return results, go straight to the file.
upvoted 1 times
...
masso435
2 years, 6 months ago
-Pn disables host discovery
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...