Upgrading Dumb Shells to Fully Interactive TTYs

Vishal Rashmika published on
1 min, 124 words

Categories: Guide

It can often be frustrating when working with reverse shells if all you have is a “dumb” shell. A dumb shell is a type of shell that doesn’t have a proper terminal’s full functionality. That means things like tab completion, keyboard shortcuts, and terminal history simply aren’t present.

Specific commands like su will not work in dumb shells, which makes things complicated when trying different privilege escalation techniques. Text editors don’t work very well in these conditions either, which can be a pain.

Method 1 : Python pty Module

python -c 'import pty; pty.spawn("/bin/bash")'

Method 2: Upgrading from netcat with magic

python3 -c 'import pty;pty.spawn("/bin/bash")'
ctrl + z
stty raw -echo
fg
enter