nerdexam
CompTIA

PT0-001 · Question #140

A penetration tester has performed a pivot to a new Linux device on a different network. The tester writes the following command: for m in {1..254..1};do ping -c 1 192.168.101.$m; done Which of the…

The correct answer is C. Live host identification. The bash loop sends a single ICMP ping to each address in the 192.168.101.0/24 subnet sequentially, performing a ping sweep to discover which hosts are online.

Reconnaissance and enumeration

Question

A penetration tester has performed a pivot to a new Linux device on a different network. The tester writes the following command:

for m in {1..254..1};do ping -c 1 192.168.101.$m; done Which of the following BEST describes the result of running this command?

Options

  • APort scan
  • BService enumeration
  • CLive host identification
  • DDenial of service

How the community answered

(36 responses)
  • A
    3% (1)
  • B
    6% (2)
  • C
    89% (32)
  • D
    3% (1)

Why each option

The bash loop sends a single ICMP ping to each address in the 192.168.101.0/24 subnet sequentially, performing a ping sweep to discover which hosts are online.

APort scan

A port scan probes specific TCP or UDP ports on a host to identify open services; this command uses ICMP only and does not test any ports.

BService enumeration

Service enumeration involves querying open ports to identify running services and their versions, which requires tools like nmap with service detection flags, not ICMP pings.

CLive host identificationCorrect

The command iterates through IP addresses 192.168.101.1 through 192.168.101.254 and issues one ping (-c 1) to each address. Hosts that respond with an ICMP echo reply are considered live, making this a classic ping sweep for live host identification on a newly pivoted network segment. This technique allows the tester to map active devices before conducting deeper enumeration.

DDenial of service

A denial of service attack would require sending a high volume of packets designed to overwhelm a target; a single ping per host across a subnet does not constitute a DoS attack.

Concept tested: Ping sweep for live host identification after pivot

Source: https://nmap.org/book/host-discovery-techniques.html

Topics

#ping sweep#live host identification#bash scripting#network discovery

Community Discussion

No community discussion yet for this question.

Full PT0-001 Practice