Stabilizing Shell
After a reverse shell we can obtain a corrupted shell who's not working well.
How to stabilize your shell :
Victim Machine
python3 -c "import pty; pty.spawn('/bin/bash')"
///
python3 -c 'import pty; pty.spawn("/bin/bash")'
/usr/bin/script -qc /bin/bash /dev/null
///
/bin/sh -i
perl βe 'exec "/bin/sh";'
///
perl: exec "/bin/sh";
ruby: exec "/bin/sh"
lua: os.execute('/bin/sh')
Victim Machine
ctrtl + z
Attacker Machine
stty raw -echo; fg
ENTER
Victim Machine
export TERM=xterm

Last updated
Was this helpful?