Example of LIBNET (4)

zhaozj2021-02-16  69

Example of Libnet (4) 2000-01-01 Wuhan Baiyun Yellow Crane Station Safety Text Infinite Circulation In turn to the DOS purpose. I used ./linuxkiller -q lo -o 0x44 observed this infinite loop on Linux, viewed with the TOP command, you can see the inetd process CPU usage is as high as 96.0%, because 7/19 is processed from inetd, Note that there is no fork out another inetd, actual DOS is quite effective. As for Solaris, use / usr / sbin / snoop -x 42 UDP and host 192.168.10.2 and port 7 does not observe unlimited loops, may be in support with Snoop devices, plus Solaris itself does not take TOP (happening experimental machine There is no GNU), I can't confirm whether the infinite loop is established. The following is given an example of the UDP message transmitter, which can specify the number of transmit UDP packets, while allowing specifying srcip, srcport, dstip, dstport, etc., which also provides a randomized source IP, source port. Just involve the Raw_Socket. Compared to SYN-FLOOD, libnet_build_ip () specifies the IP data area length to the UDP head length (fixed to 8 bytes) plus UDP data area length, the upper protocol is ipproto_UDP. This time you need to call the following function constructs UDP header: int libnet_build_udp (u_short sport, u_short dport, const u_char * payload, int pay); UDP does not have an IP, TCP header option data area, here's PayLoad and The payload meaning of the two functions is different. The PayLoad here points to the UDP data area, and the payload_s corresponds to the UDP data area length. There is a domain in the UDP header corresponding to the entire UDP packet (including UDP header) length, different from IP, TCP. The last shape needs to point to an allocated data area, and the UDP head starts from the pointer. Or call libnet_do_checksum (packet, ipproto_udp, libnet_udp_h sczudpdatalen); Calculate UDP packet checksum, including head and data area. Therefore, the function must be called after the data area is completed, otherwise the checksum is wrong. UDP checksum is optional, if set to zero means no verification. We do verify. The program is really meaningless, give a function fragment, using the UDP packet transmitter to do DOS attack index, idle is nothing to close UDP 7/19, TCP 7/19 is slightly better, think about why.

转载请注明原文地址:https://www.9cbs.com/read-16453.html

New Post(0)