Fully Interactive TTY Reverse Shell


(Mumbai) #1

Came across this, went through it, worked swell! Anyone know of any other ways to acquire a full “tty” shell reversly with history and FINALLY not killing your shell with CTRL-C? https://blog.ropnop.com/upgrading-simple-shells-to-fully-interactive-ttys/


(Command-Line Ninja) #2

I would like to develop a bash wrapper or something for this upgrade technique. I am sure you can do it.

I tried doing

echo python -c 'import pty; pty.spawn("/bin/bash")' | nc -l -p 8080

This gives me a weird string format errors. So I popped the python command in a text file, and did

cat command.txt | nc -l -p 8080

It gave me a prompt, but no interaction. I’ll figure out a way soon enough. Upgrading ordinary netcat shells is really dope. I hate the ordinary netcat shell.


(Mumbai) #3

Ill see if i can build one. I’ve been trying to implement this technique on the ASH shell on embedded systems such as dink or links routers, not as successful.

Yeah, ive done a technique similar to yours, unfortunately no interaction. Quite strange imo. The frustration for years had forced me to opt to Metasploit for its payloads, to avoid me accidently killing my damn shell xD


#4

Can you try something like this:
cat command.txt - | nc -l -p 8080


(Mumbai) #5

Nah, same thing as typing the command at gaining shell. no control over jobs and such.