我正在寻找一种方法将我的dumb reverse-shell升级到交互式shell。我想用方法3升级它,可以在这里找到:
https://blog.ropnop.com/upgrading-simple-shells-to-fully-interactive-ttys/
命令工作正常,直到我尝试前台我的 shell 。'fg'是工作一样,它是在指南中描述的,但我的 shell 后,我不能再键入命令。它似乎我的 shell 是冻结的。'reset'将遵循现在这是必要的继续,但因为我不能键入任何东西,我不能继续
任何建议都是非常欢迎的提前感谢
2条答案
按热度按时间wsewodh21#
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 :)
bvhaajcl2#
我认为问题发生在你尝试在不同的行前台shell。如果你有一个zsh shell你必须确保运行命令作为
stty raw -echo;fg
。对于其他shell你可以在单独的行运行它。enter image description here[在此输入图像描述][2]