0

假设我在本地网络上,如果我可以捕获 ICMP 回显请求数据包,并且考虑到我想欺骗回显回复,那么假设我制作原始数据包的副本,我需要更改原始数据包的哪一部分在我寄回去之前?我猜 IP 标头需要更改(原始的目标 IP 将成为源,反之亦然)以及 ICMP 标头(类型需要更改为 ECHO_REPLYPACKET)。但是除了这两个之外还有其他的吗?

4

1 回答 1

1

Quoting RFC 792 :

Echo or Echo Reply Message

0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type      |     Code      |          Checksum             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Identifier          |        Sequence Number        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Data ...
+-+-+-+-+-

To form an echo reply message, the source and destination addresses are simply reversed, the type code changed to 0, and the checksum recomputed.

Identifier and Sequence Number must be 0 as well.

RFC 1071 shows you how to calculate the Checksum

于 2013-02-01T08:30:42.753 回答