Stabilizing reverse shells

From Enlace Hacktivista
Revision as of 17:43, 21 July 2023 by Booda (talk | contribs) (Stabilizing reverse shells)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

After gaining a reverse shell it's good practice to stabilize it for better usability and functionality.

python3 -c 'import pty;pty.spawn("/bin/bash");'
stty -a
stty rows <NUMBER> cols <NUMBER>
echo $SHELL
export SHELL=bash
echo $TERM
export TERM=xterm-256color
press CTRL+Z
stty raw -echo ; fg
reset