Advertisement
Mac_Dhuhri

Backdoor Scanner

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