Understanding Internet Control Message Protocol (ICMP): Functions, Security Risks, and Message Types

(1) What is the ICMP Protocol?

The Internet Control Message Protocol (ICMP) is a network layer protocol used for error handling and diagnostics in the Internet Protocol (IP) networks. It facilitates communication between

      ICMP (Internet Control Message Protocol) is one of the core protocols of the Internet protocol suite, primarily used in network computers’ operating systems to send error messages. For example: request service unavailable, host unreachable. The ICMP protocol is a connectionless protocol used for transmitting error report control information. However, ICMP is not a high-level protocol, but an IP-layer protocol.

(2) Importance of Learning ICMP?

      The ICMP protocol is famous for its ping function, which is used to check the continuity of a host device. I think most people may have used the ping command. However, the characteristics of the ICMP protocol itself make it very easy to use for attacking routers or hosts on the network. For example, users can exploit the rule that the maximum size of an ICMP packet is no more than 64K to launch a ping of Death attack on a host. At this point, the host will experience memory allocation failure, causing the host to crash and freeze. In addition, sending ICMP packets to the host over a long period can eventually lead to system paralysis, and a large number of ICMP packets can form an “ICMP storm,” causing the target host to consume a significant amount of CPU resources for processing.

(3) ICMP Header Format

Internet Control Message Protocol />

       It can be clearly seen that the ICMP message serves as the data of an IP-layer datagram, combined with the IP packet header, and is sent out as an IP datagram. The image above shows the format of an ICMP message.

      Type: Classification of ICMP messages based on RFC specifications

      Code: Subclassification of ICMP messages based on RFC specifications

     Checksum: Used to ensure the integrity of the ICMP data header and data section

     Data Section: Depends on the type and code fields

(4) ICMP Request Message Types

Internet Control Message Protocol />

    (5) ICMP Response Message Types

     (6) Diagnostic Message Types Provided by ICMP