Make your dumb netcat shell interactive and awesome
Reducing the pain of working with netcat reverse shells
Netcat shells can be a tough nut to crack and work with, so, you can make them interactive with auto completions and stuffs to make it easier for you to work with them.
Once you have the netcat shell back (it can be a simple bash reverse shell or a php-web-reverse-shell) check if python is available or not:
If python exists, then you can run:
Now you should have a better shell like the one below:
Now set the terminal type in host/target terminal (aka your reverse shell):
Next you need to background the shell with Ctrl + Z
.
Now run:
The fg
is to foreground our shell running in the background.
You won't be able to see those letters on the screen as you type, but hit Enter
afterwards, and the shell will appear automatically.
Now just set the rows and columns using:
Next in the prompt terminal type?
set the type you obtained before. Generally it will be xterm
.
Note that if the shell dies, any input in your own terminal will not be visible (as a result of having disabled terminal echo). To fix this, type reset and press enter.
Last updated
Was this helpful?