Spawning a TTY Shell

来源:互联网 发布:nginx epoll 编辑:程序博客网 时间:2024/04/27 12:39

原文地址:
netsec.ws/?p=337

Often during pen tests you may obtain a shell without having tty, yet wish to interact further with the system. Here are some commands which will allow you to spawn a tty shell. Obviously some of this will depend on the system environment and installed packages.

Shell Spawning

若已经安装python

python -c 'import pty; pty.spawn("/bin/sh")'

这里写图片描述
在python的交互式命令行中

>>> import os; os.system('/bin/bash')

这里写图片描述

进入sh交互式命令行

/bin/sh -i

这里写图片描述
这前三个最常见!!!

0 0
原创粉丝点击