0

I am looking for a way to upgrade my dumb reverse-shell to an interactive shell. I want to upgrade it with Method 3, which can be found here:
https://blog.ropnop.com/upgrading-simple-shells-to-fully-interactive-ttys/
The commands work properly until I try to foreground my shell. 'fg' is working like it is described in the guide but after my shell is foregrounded I am not anymore able to type in commands. It seems like my Shell is frozen. 'reset' would follow now which is necessary to proceed but since I can't type in anything, I cant proceed

Any Suggestions are very welcome Thanks in advance

Manuel
  • 73
  • 5

2 Answers2

1

Okay, I found it out myself:
First of all I upgraded my dumb shell into a python shell which provides more feature than the original shell but is not completely interactive. Afterwards I used the method above to upgrade the python shell to a TTY shell.
I used:

which Python, Python2, Python3

to check my Python Version.

The command 'which' shows the complete Path and says not found if python is not installed. Afterwards I have been running the following command (in my case was python3 installed):

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

If you have another version installed than I had, you need to change python3 to python or python2.

I guess the problem was a bug with the dumb shell but this should fix it. With the python shell you can follow the instructions I posted above :)

Manuel
  • 73
  • 5
1

I think the problem occurs when you try to foreground the shell in a different line. If you are having a zsh shell you have to make sure to run the command as stty raw -echo;fg. For other shells you can run it in separate line.enter image description here

[enter image description here][2]