linux - how is TCP's checksum calculated when we use tcpdump to capture packets which we send out -
I am trying to prepare a series of packets to simulate the TCP 3-way handshake process, my The first step is to get real connecting packets, and send the same packet from the same machine again, but it does not work in advance.
In the end, I came to know that the packet I bought with the taxipamp is not at all, my computer was sent, the checksum field of TCP has changed and it inspires me to think that I have a TCP connection I can install TCP checksum is also wrong.
So my question is how checksum fields are calculated? Is it modified by TCPDump or hardware? Why has this changed? Is this a bug of TCPDump? Or is it because the calculation has been omitted.
The following is a screenshot taken from my host machine and a virtual machine, you can see that the same packet captured on the defiant machine is all the same except the TCP Checksum.
And the small window is my virtual machine, I have used the command "ssh 10.82.25.138" to create these packets from the host
Most modern operating systems support some form of network offloading, where there is a network network on the NIC instead of the CPU. Generally this is a big thing, it can free resources on the rest of the system and allow it to manage more connections. If you are trying to catch traffic, then the result may be in false errors and may be strange or even lose traffic.
Checksum offloading support on the system Does, IP, TCP, and UDP checksums are calculated on NIC before transmitting on the wire. In Wyrhark they are shown in the form of outgoing packets, which are black colored marks with red text and notes [wrong, xxxx (maybe "due to TCP checksum offload"?)].
The virus captures the packet before the shark is sent, the network adapter will not show this correct checksum because it has not yet been calculated. Even worse, most of the OSs do not bother starting this data, so you're probably looking at a little bit of memory that you do not want.
Although it is for Wirehark, the same principle applies. In your host machine, you see wrong checksum because it is not yet filled. It looks fine on the guest, because it is filled with before being sent to "wire". Try disabling checksum offloading on the interface that controls this traffic, such as:
Eth08 eth0 rx off tx off
If it is eth0 is.
Comments
Post a Comment