nerdexam
EC-Council

312-50V9 · Question #298

You want to do an ICMP scan on a remote computer using hping2. What is the proper syntax?

The correct answer is D. hping2 -1 host.domain.com. hping2 defaults to TCP mode, and the -1 flag (or --icmp) is required to switch it into ICMP echo request mode for performing an ICMP scan.

Scanning Networks

Question

You want to do an ICMP scan on a remote computer using hping2. What is the proper syntax?

Options

  • Ahping2 host.domain.com
  • Bhping2 --set-ICMP host.domain.com
  • Chping2 -i host.domain.com
  • Dhping2 -1 host.domain.com

How the community answered

(33 responses)
  • A
    3% (1)
  • C
    9% (3)
  • D
    88% (29)

Why each option

hping2 defaults to TCP mode, and the -1 flag (or --icmp) is required to switch it into ICMP echo request mode for performing an ICMP scan.

Ahping2 host.domain.com

Running hping2 with only a hostname and no protocol flag defaults to TCP SYN packets on port 0, not ICMP.

Bhping2 --set-ICMP host.domain.com

--set-ICMP is not a valid hping2 option; the correct long-form flag for ICMP mode is --icmp, and the short form is -1.

Chping2 -i host.domain.com

The -i flag in hping2 specifies the interval between sent packets in microseconds and has nothing to do with selecting the ICMP protocol.

Dhping2 -1 host.domain.comCorrect

The -1 flag explicitly sets hping2 to ICMP mode, equivalent to using the long form --icmp, causing it to send ICMP echo request packets to the target host. Without this flag, hping2 sends TCP packets by default. This is the correct and documented syntax for conducting ICMP-based host probing with hping2.

Concept tested: hping2 ICMP scan mode syntax and flags

Source: https://linux.die.net/man/8/hping3

Topics

#hping2#ICMP scan#ping sweep#network scanning

Community Discussion

No community discussion yet for this question.

Full 312-50V9 Practice