Shell Upgrading and Stabilization

on under CTF
1 minute read

I’ve been participating in this year’s Tryhackme.com Adent of Cyber cybersecurity event.
Thought I better drop some notes on stabilizing a shell so I don’t forget.
Reverse shells are crappy and have no features. Try Ctrl+a, up-arrow, or even pressing back-arrow to correct a pasted in one-liner. It won’t work.
So here is the method I’ve found for upgrading and stabilizing a reverse shell.

python3 -c 'import pty;pty.spawn("/bin/bash")'  
export TERM=xterm  
Ctrl + Z  
stty raw -echo; fg  
//if the shell dies, try 'reset' command
CTF
comments powered by Disqus