Dark-shadow

Backdoor Scanner

Sep 3rd, 2015
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.03 KB | None | 0 0
  1. <?php
  2. /* #################################################################################
  3. # [+] File Name : Backdoor Scanner
  4. # [+] Author : inc0mp13te
  5. # [+] File created : june 6 2009
  6. # [+] Contact eMail : [email protected]
  7. # [+] Version : 0.01
  8. # [+] Thanks goes to :
  9. # [+] Shidiq, Wishnew, Xshadow
  10. # [+] X-Code big Family [http://www.xcode.or.id]
  11. # [+] Jasakom Forum [http://www.jasakom.com]
  12. ################################################################################## */
  13. putenv("TZ=Asia/Tokyo");
  14. ?>
  15. <head>
  16. <title>Backdoor Scanner by inc0mp13te</title>
  17. <script language="JavaScript" type="text/JavaScript">
  18. <!--
  19. function MM_openBrWindow(theURL,winName,features) { //v2.0
  20. window.open(theURL,winName,features)
  21. }
  22. //-->
  23. </script>
  24. <style type="text/css">
  25. <!--
  26. body {
  27. font-family: Tahoma;
  28. color: #CCCCCC;
  29. background-color: #000000;
  30. font-size: 11px;
  31. font-weight: bold;
  32. }
  33. .single{
  34. border: 1px solid #00ff00;
  35. padding: 5px;
  36. }
  37. a:visited {
  38. color: #33333;
  39. font-size: 11px;
  40. font-family: tahoma;
  41. text-decoration: none;
  42. }
  43.  
  44. a:hover {
  45. color: #ccff00;
  46. text-decoration: none;
  47. }
  48. .abunai {
  49. color: red;
  50. text-decoration: none;
  51. }
  52. .xxx {
  53. color: blue;
  54. text-decoration: none;
  55. }
  56. a {
  57. color: #ccff99;
  58. font-size: 11px;
  59. font-family: tahoma;
  60. text-decoration: none;
  61. }
  62. td {
  63. border-style: solid;
  64. border-width: 0 0 1px 0;
  65. font-size:11px; font-family:Tahoma,Verdana,Arial; color:#ccff99;
  66. }
  67. .me {
  68. font-size:11px; font-family:Tahoma,Verdana,Arial; color:#ccff99;
  69. border: 0px;
  70. padding: 5px;
  71. }
  72. .isi:disabled{
  73. padding: 2px;
  74. border:1px solid #333333;
  75. font-family: Tahoma;
  76. color: #333333;
  77. background-color: #000000;
  78. font-size: 10px;
  79. font-weight: bold;
  80. }
  81. .isi{
  82. padding: 2px;
  83. border:1px solid #666666;
  84. font-family: Tahoma;
  85. color: #ccff99;
  86. background-color: #666666;
  87. font-size: 10px;
  88. font-weight: bold;
  89. }
  90. -->
  91. </style>
  92. <style type="text/css">
  93. #patch {position:absolute; height:1; width:1px; top:0; left:0;}
  94. </style>
  95. </head>
  96. <body>
  97. <center><br><font color="#339900" size="14" face="arial">Backdoor Scanner</font></center><br>
  98. <?php
  99. if(isset($_REQUEST['edit']) && $_REQUEST['edit']=='file'){
  100. if(isset($_POST['yes'])){
  101. $filename = $_GET['file'];
  102. echo "<br><br><br><font color=red size=3><b><center>".$filename." deleted...</b></font><br><br><br><br><br><br><br>";
  103. unlink($filename);
  104. echo "<META HTTP-EQUIV=Refresh CONTENT=\"2; URL=javascript:window.close();\">";
  105. }else{
  106. if($_POST['update']) {
  107. $filename = $_POST['file'];
  108. if(is_writable($filename)) {
  109. $handle = fopen($filename, "w+");
  110. $isi=$_POST['content'];
  111. fwrite($handle, stripslashes($isi));
  112. fclose($handle);
  113. $stat= "<center><strong>edited successfully<br>";
  114. } else {
  115. $stat= "<center><font color=red><strong>Error! File may not be writable.</font></center>";
  116. }
  117. }
  118. if($_POST['close']) {
  119. echo "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=javascript:window.close();\">";
  120. }
  121. $filename = $_GET['file'];
  122. if (file_exists($filename)){
  123. $vuln = $_GET['bug'];
  124. $handle = fopen($filename, "r");
  125. $contents = fread($handle, filesize($filename));
  126. ?>
  127. <center>
  128. <table>
  129. <tr><td align="left" class="me"><strong><?=$filename?>&nbsp;&nbsp;>> Contains :&nbsp;<?=$vuln?></strong></td></tr>
  130. <tr><td class="me">
  131. <form method="post" action="">
  132. <input type="hidden" name="file" value="<?=$filename?>">
  133. <textarea name="content" cols="80" rows="15"><?=htmlspecialchars($contents)?></textarea><br>
  134. </td></tr>
  135. <tr><td align="center" class="me">
  136. <?php
  137. if($_POST['delete']) {
  138. echo "Are you sure to delete ".$filename." ?";
  139. ?>
  140. <tr><td align="center" class="me">
  141. <input type="submit" name="yes" value=" Y E S ">
  142. <input type="submit" name="no" value=" N O ">
  143. </td></tr>
  144. <?php
  145. }else{
  146. echo $stat;
  147. ?>
  148. </td></tr>
  149. <tr><td align="right" class="me">
  150. <input type="submit" name="close" value=" C l o s e ">
  151. <input type="submit" name="delete" value=" D e l e t e ">
  152. <input type="submit" name="update" value=" S a v e ">
  153. </td></tr>
  154. <?php
  155. }
  156. fclose($handle);
  157. ?>
  158. </table>
  159. </form>
  160. <?php
  161. }else{
  162. echo "<br><br><br><font color=red size=3><b><center>".$filename." not exist...</b></font><br><br><br><br><br><br><br>";
  163. echo "<META HTTP-EQUIV=Refresh CONTENT=\"4; URL=javascript:window.close();\">";
  164. }
  165. ?>
  166. </center>
  167. <?php
  168. }
  169. }elseif(isset($_POST['Submit'])){
  170. $ceks = array('base64_decode','system','passthru','popen','exec','shell_exec','eval','move_uploaded_file');
  171. foreach($ceks as $ceker){
  172. if($_POST[$ceker]<>""){
  173. $six.=$_POST[$ceker].".";
  174. }
  175. }
  176. $cek = explode('.', $six);
  177.  
  178. function ListFiles($dir) {
  179. if($dh = opendir($dir)) {
  180.  
  181. $files = Array();
  182. $inner_files = Array();
  183.  
  184. while($file = readdir($dh)) {
  185. if($file != "." && $file != "..") {
  186. if(is_dir($dir . "/" . $file)) {
  187. $inner_files = ListFiles($dir . "/" . $file);
  188. if(is_array($inner_files)) $files = array_merge($files, $inner_files);
  189. } else {
  190. array_push($files, $dir . "/" . $file);
  191. }
  192. }
  193. }
  194.  
  195. closedir($dh);
  196. return $files;
  197. }
  198. }
  199. ?>
  200. <center>
  201. <table border="0" width="90%" cellpadding="5">
  202. <tr>
  203. <td class="me" align="right" width="30"><b>No</b></td>
  204. <td class="me" align="center" width="105"><b> T y p e </b></td>
  205. <td class="me" align="center"><b> F i l e&nbsp;&nbsp;L o c a t i o n </b></td>
  206. <td class="me" align="center" width="150"><b> L a s t&nbsp;&nbsp;E d i t </b></td>
  207. <td class="me" align="right" width="80"><b>F i l e&nbsp;&nbsp;S i z e</b></td>
  208. </tr><br>
  209. <?php
  210. $target=$_SERVER['DOCUMENT_ROOT'];
  211. foreach (ListFiles($target) as $key=>$file){
  212. $nFile = substr($file, -4, 4);
  213. if($nFile == ".php"){
  214. if($file==$_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF']){
  215. }else{
  216. $ops = @file_get_contents($file);
  217. $op=strtolower($ops);
  218. $arr = array('c99_buff_prepare' => 'c 9 9',
  219. 'abcr57' => 'r 5 7');
  220. $sis=0;
  221. if($op)
  222. $size=filesize($file);
  223. $last_modified = filemtime($file);
  224. $last=date("M-d-Y H:i", $last_modified);
  225. foreach($arr as $key => $val) {
  226. if(@preg_match("/$key/", $op)) {
  227. $sis=1;
  228. $i++;
  229. ?>
  230. <tr style ="background-color: Your background Color;" onmouseover="mover(this)" onmouseout="mout(this)">
  231. <td align="right"><font color="red"><blink><?=$i?></blink></font></td>
  232. <td align="center"><font color="red"><blink><?=$val?></blink></font></td>
  233. <td align="left"><blink>
  234. <a href="#" class="abunai" onclick="MM_openBrWindow('?edit=file&file=<?=$file?>&bug=<?=$val?>','File view','status=yes,scrollbars=yes,width=700,height=600')" rel="nofollow"><?=$file?></a>
  235. </blink></td>
  236. <td align="center"><font color="red"><blink><?=$last?> GMT+9</blink></font></td>
  237. <td align="right"><font color="red"><blink><?=$size?> byte</blink></font></td>
  238. <script language="javascript">
  239. var bgcolor = "transparent";
  240. var change_color = "#444444"
  241. function mover(aa) {
  242. aa.style.backgroundColor = change_color;
  243. }
  244. function mout(aa) {
  245. aa.style.backgroundColor = bgcolor;
  246. }
  247. </script>
  248. </tr>
  249. <?php
  250. }
  251. }
  252. if($sis<>"1"){
  253. if((@preg_match("/system\((.*?)\)/", $op))&&(@preg_match("/<pre>/", $op))&&(@preg_match("/empty\((.*?)\)/", $op))) {
  254. $sis="2";
  255. $i++;
  256. $val="hidden shell";
  257. ?>
  258. <tr style ="background-color: Your background Color;" onmouseover="mover(this)" onmouseout="mout(this)">
  259. <td align="right"><font color="blue"><?=$i?></font></td>
  260. <td align="center"><font color="blue"><?=$val?></font></td>
  261. <td align="left">
  262. <a href="#" class="xxx" onclick="MM_openBrWindow('?edit=file&file=<?=$file?>&bug=<?=$val?>','File view','status=yes,scrollbars=yes,width=700,height=600')" rel="nofollow"><?=$file?></a>
  263. </td>
  264. <td align="center"><font color="blue"><?=$last?> GMT+9</font></td>
  265. <td align="right"><font color="blue"><?=$size?> byte</font></td>
  266. <script language="javascript">
  267. var bgcolor = "transparent";
  268. var change_color = "#444444"
  269. function mover(aa) {
  270. aa.style.backgroundColor = change_color;
  271. }
  272. function mout(aa) {
  273. aa.style.backgroundColor = bgcolor;
  274. }
  275. </script>
  276. </tr>
  277. <?php
  278. }
  279. }
  280. if($sis=="0"){
  281. foreach($cek as $bugs) {
  282. if ($bugs<>""){
  283. if(@preg_match("/$bugs\((.*?)\)/", $op)) {
  284. $i++;
  285. ?>
  286. <tr style ="background-color: Your background Color;" onmouseover="mover(this)" onmouseout="mout(this)">
  287. <td align="right"><?=$i?></td>
  288. <td align="center"><?=$bugs?></td>
  289. <td align="left">
  290. <a href="#" onclick="MM_openBrWindow('?edit=file&file=<?=$file?>&bug=<?=$bugs?>','File view','status=yes,scrollbars=yes,width=700,height=600')" rel="nofollow"><?=$file?></a>
  291. </td>
  292. <td align="center"><?=$last?> GMT+9</td>
  293. <td align="right"><?=$size?> byte</td>
  294. <script language="javascript">
  295. var bgcolor = "transparent";
  296. var change_color = "#444444"
  297. function mover(aa) {
  298. aa.style.backgroundColor = change_color;
  299. }
  300. function mout(aa) {
  301. aa.style.backgroundColor = bgcolor;
  302. }
  303. </script>
  304. </tr>
  305. <?php
  306. }
  307. }
  308. }
  309. }
  310. if($_POST['textV']<>""){
  311. $text=$_POST['textV'];
  312. if(@preg_match("/$text/", $op)) {
  313. $i++;
  314. ?>
  315. <tr style ="background-color: Your background Color;" onmouseover="mover(this)" onmouseout="mout(this)">
  316. <td align="right"><?=$i?></td>
  317. <td align="center"><?=$text?></td>
  318. <td align="left">
  319. <a href="#" onclick="MM_openBrWindow('?edit=file&file=<?=$file?>&bug=<?=$text?>','File view','status=yes,scrollbars=yes,width=700,height=600')" rel="nofollow"><?=$file?></a>
  320. </td>
  321. <td align="center"><?=$last?> GMT+9</td>
  322. <td align="right"><?=$size?> byte</td>
  323. <script language="javascript">
  324. var bgcolor = "transparent";
  325. var change_color = "#444444"
  326. function mover(aa) {
  327. aa.style.backgroundColor = change_color;
  328. }
  329. function mout(aa) {
  330. aa.style.backgroundColor = bgcolor;
  331. }
  332. </script>
  333. </tr>
  334. <?php
  335. }
  336.  
  337.  
  338. }
  339. }
  340. }
  341. }
  342. if($i==0){
  343. foreach($cek as $bugs) {
  344. if ($bugs<>""){
  345. $x++;
  346. ?>
  347. <tr style ="background-color: Your background Color;" onmouseover="mover(this)" onmouseout="mout(this)">
  348. <td align="right"><?=$x?></td>
  349. <td align="center"><?=$bugs?></td>
  350. <td align="center"> not exist </td>
  351. <td align="center"> no record </td>
  352. <td align="right"> -&nbsp;&nbsp;&nbsp;&nbsp;byte </td>
  353. </tr>
  354. <?php
  355. }
  356. }
  357. }
  358. ?>
  359. </table>
  360. <?php
  361. }else{
  362. $find = array('default','base64_decode','system','passthru','popen','exec','shell_exec','eval','move_uploaded_file');
  363. ?>
  364. <form id="fCheck" name="fCheck" method="post" action="" autocomplete="off">
  365. <center>
  366. <table class="single" width="400" border="1" cellpadding="10">
  367. <tr><td class="me"><center>
  368. <b>S e l e c t &nbsp;&nbsp;s c a n&nbsp;&nbsp;t y p e :</b><br>
  369. <table class="me" width="200">
  370. <tr><td class="me">
  371. <script language="javascript">
  372. function cekKlik(){
  373. if (!document.fCheck.cekV.checked)
  374. document.fCheck.textV.disabled=true;
  375. else
  376. document.fCheck.textV.disabled=false;
  377. if(document.fCheck.cekV.checked){
  378. master = master + 1;
  379. }else{
  380. if(master > 0 ){
  381. master = master - 1;
  382. }else{
  383. master = master;
  384. }
  385. }
  386. if(master != 0){
  387. document.fCheck.Submit.disabled=false;
  388. }else{
  389. document.fCheck.Submit.disabled=true;
  390. }
  391. }
  392. </script>
  393. <?php
  394. //dari sini
  395. foreach($find as $bug) {
  396. ?>
  397. <script language="javascript">
  398. var master = 0;
  399. function checkValue<?=$bug?>(){
  400. if(document.fCheck.<?=$bug?>.checked){
  401. master = master + 1;
  402. }else{
  403. if(master > 0 ){
  404. master = master - 1;
  405. }else{
  406. master = master;
  407. }
  408. }
  409. if(master != 0){
  410. document.fCheck.Submit.disabled=false;
  411. }else{
  412. document.fCheck.Submit.disabled=true;
  413. }
  414. }
  415. </script>
  416. <input onclick="checkValue<?=$bug?>();" name="<?=$bug?>" type="checkbox" id="<?=$bug?>" value="<?=$bug?>" />&nbsp;<?=$bug?><br>
  417. <?php
  418. }
  419. ?>
  420. <input name="cekV" type="checkbox" onClick="cekKlik();" id="cekV" value="cekV">
  421. <input class="isi" disabled="disabled" name="textV" value="other key word" onFocus="this.select()" type="text" id="textV">
  422. <br><br>
  423. <input type="hidden" name="asal" value="abcd">
  424. <input disabled="disabled" type="submit" name="Submit" value=" S t a r t&nbsp;&nbsp;S c a n " />
  425. </td></tr>
  426. </table>
  427. </td></tr></table>
  428. </form>
  429. <?
  430. }
  431. ?>
  432. <br><br><hr width="300">
  433. <center>
  434. Backdoor Scanner BDS 0.01 &copy inc0mp13te 2009
  435. <br><br>
  436. </body>
Add Comment
Please, Sign In to add comment