icmp重定向

ICMP和重定向攻击

痴心易碎 提交于 2019-11-27 10:41:38
目录 ICMP数据报格式 smurf攻击 ICMP重定向攻击 基于libpcap的sniffer raw socket 定义包头 解析数据包 重定向 @ ICMP数据报格式 https://zhuanlan.zhihu.com/p/58662573 头部type,code,checksum ,4字节,扩展字段,4字节 icmp作为数据部分封装到ip数据报中 IPv4中的常用type,ipv6与之不同 0:Echo Reply 回显应答,返回数据 ping 3:Destination Unreachable 不可达 5:Redirect (change route) 重定向 8:Echo Request 回显请求,ping 11:time Exceeded for a Datagram,超时 struct icmp { u_int8_t icmp_type; /* type of message, see below */ u_int8_t icmp_code; /* type sub code */ u_int16_t icmp_cksum; /* ones complement checksum of struct tcp、icmp是全部的校验和,ip的只有头部*/ union { u_char ih_pptr; /* ICMP_PARAMPROB */ struct in