Exam PT0-002 All QuestionsBrowse all questions from this exam
Question 223

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?

    Correct Answer: A

    The command 'nmap -sn -n -exclude 10.1.1.15 10.1.1.0/24 -oA target_txt' is the most suitable for conducting host discovery on the same LAN segment without including the attacker's machine in the results. The '-sn' option performs a ping scan to identify online hosts without port scanning, '-n' disables DNS resolution to speed up the process, and '-exclude' prevents the inclusion of the attack machine's IP address (10.1.1.15) in the scan. Finally, the '-oA' option saves the results in multiple formats in files with the prefix 'target_txt', meeting all requirements specified in the question.

Discussion
masso435Option: A

This excludes the attacker computer and does only a host discovery

2FishOption: A

A, Same as Question#167

TKW36Option: 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.

masso435Option: D

-Pn disables host discovery

cy_analystOption: 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").

nickwen007Option: A

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.

[Removed]Option: A

answer A is correct

Etc_Shadow28000Option: 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.

pepguaOption: A

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.

solutionzOption: 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.

[Removed]Option: 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.

[Removed]

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.

[Removed]

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.

kapenOption: 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.