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.
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)- A3% (1)
- C9% (3)
- D88% (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.
Running hping2 with only a hostname and no protocol flag defaults to TCP SYN packets on port 0, not ICMP.
--set-ICMP is not a valid hping2 option; the correct long-form flag for ICMP mode is --icmp, and the short form is -1.
The -i flag in hping2 specifies the interval between sent packets in microseconds and has nothing to do with selecting the ICMP protocol.
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
Community Discussion
No community discussion yet for this question.