Which command pattern is commonly used to perform a ping sweep by iterating over IP addresses?

Study for the SANS560 GIAC Penetration Tester (GPEN) Test. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Multiple Choice

Which command pattern is commonly used to perform a ping sweep by iterating over IP addresses?

Explanation:
This tests using a loop to generate a range of IPs and ping them one by one. In Windows batch, a for /L loop creates a numeric sequence with the syntax (start, step, end). Here it starts at 1, increments by 1, and ends at 254. The command then pings 192.168.1.%i for each value of i, producing addresses from 192.168.1.1 to 192.168.1.254 and pinging each once. This is a classic ping sweep over a /24 subnet. The other options don’t sweep: one performs a single DNS lookup, another sends a single ping to one address, and the last traces the route to a destination.

This tests using a loop to generate a range of IPs and ping them one by one. In Windows batch, a for /L loop creates a numeric sequence with the syntax (start, step, end). Here it starts at 1, increments by 1, and ends at 254. The command then pings 192.168.1.%i for each value of i, producing addresses from 192.168.1.1 to 192.168.1.254 and pinging each once. This is a classic ping sweep over a /24 subnet.

The other options don’t sweep: one performs a single DNS lookup, another sends a single ping to one address, and the last traces the route to a destination.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy