Fully Interactive TTY Reverse Shell

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/

2 Likes

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.

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

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

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