获得一个全交互式shell

2019-09-26  本文已影响0人  Instu

使用bash命令反弹的不是交互式shell,像vim、命令补全等功能无法使用,给渗透测试过程造成一定的麻烦,下面介绍如何升级为一个全交互式shell。

# In reverse shell
python -c 'import pty;pty.spawn("/bin/bash")'
Ctrl+Z 把进程挂起
# In Kali
stty raw -echo
fg 把进程调到前台
# In reverse shell
reset 重置终端
export SHELL=bash
export TERM=xterm-256color
stty rows <num> columns <cols> 设置终端的大小
stty rows 40 columns 100
image.png
上一篇 下一篇

猜你喜欢

热点阅读