Sebek UDP packet length field bug |
On May 2005, while I was inspecting in-depth the Honeynet Sebek LKM, a good rootkit , I figured out that the UDP header length field of the network packets generated by this tool had an invalid value.
The UDP length field is the length of the UDP header and the UDP data in bytes. The minimum value for this field is 8 bytes (sending a UDP datagram with 0 bytes of data is OK).
The figure below shows UDP packets generated by a Sebek Linux client version 3.0.2, running over a Red Hat 9.0 honeypot system. The 10.10.10.2 IP address belongs to the honeypot while the 10.10.10.1 is the IP address of the network gateway. 2f 6c 6d 68 6f 73 74 73
The reason for this is that the UDP header length field has an incorrect value because it only includes the UDP data payload length, instead of the UDP data payload length plus the UDP header length. If the first UDP packet showed above is inspected, it can be seen that the following are the different length values associated to it:
This bug is located in the "sebek.c" file, within the "gen_pkt()" function. The UDP packet length value is calculated using the following formula:
The affected versions were the Linux client version 3.0.3 and below (including the 2.X.Y branch). |
Copyright © 2005-2005 (Raúl Siles). All rights reserved.