Discover pivot interfaces, routes and internal service context
Contents ↑Use when: A foothold exposes an interface/subnet or a loopback-only service
Needs: A usable pivot process/identity and explicit scope; both forward and return directions must be understood
Client commands / example output
# Baseline
APPLICATION TOOL
-> local listener / SOCKS endpoint / TUN route
-> tunnel transport endpoint
-> pivot exit
-> internal destination service
CALLBACK TARGET
-> pivot listener or routable address
-> relay/tunnel
-> final listener
# Record
TOOL_HOST -> ENTRY_SOCKET/ROUTE -> TRANSPORT -> PIVOT -> DESTINATION
application protocol | TCP/UDP | initiator | bind address | DNS point
credential/SPN name | callback route | privilege | cleanup objects
Linux
# Linux
id
ip -brief address
ip route
ip neigh
ss -lntup
cat /etc/resolv.conf
Windows
REM Windows
whoami /all
ipconfig /all
route print
arp -a
netstat -ano
PowerShell selected endpoints
# PowerShell selected endpoints
Get-NetIPConfiguration
Get-NetRoute -AddressFamily IPv4 | Sort-Object DestinationPrefix,RouteMetric
Get-NetTCPConnection -State Listen
Get-DnsClientServerAddress -AddressFamily IPv4
Shell commands
An interface or route proves a possible network position, not destination reachability. Validate one justified socket from the pivot before building a tunnel.
# Baseline
nc -nvz -w 3 INTERNAL_HOST INTERNAL_PORT
curl -v --connect-timeout 5 http://INTERNAL_HOST:INTERNAL_PORT/
PowerShell commands
# Baseline
Test-NetConnection INTERNAL_HOST -Port INTERNAL_PORT
Kali/Linux
Need Baseline Choose when Main limitation One TCP service through an SSH pivot SSH local forward Kali can initiate SSH to pivot One destination socket per forward Many TCP destinations through SSH pivot SSH dynamic forward Kali can initiate SSH to pivot SOCKS/client compatibility Pivot can connect outward but inbound access is blocked SSH remote or remote-dynamic forward Pivot has OpenSSH client and can reach Kali SSH Kali SSH policy; OpenSSH version for remote dynamic SSH hop directly to internal SSH ProxyJumpBoth pivot and destination provide SSH SSH-only path Simple Linux TCP relay Socat Binary already exists and listener can be exposed Clear TCP relay; no authentication/encryption Transparent selected subnets through SSH sshuttle Suitable SSH server with Python; local privileges TCP/DNS-oriented, local firewall changes Windows SSH-based forward Built-in ssh.exeor PlinkCompatible client exists and outbound SSH works Server policy and credential/host-key handling Windows native fixed TCP relay netsh interface portproxyElevated token; target modification acceptable TCP only; firewall/IP Helper/stateful cleanup Outbound HTTP/WebSocket-shaped tunnel Chisel Pivot can run matching binary and reach server Client/server compatibility and proxy/client transport limits Routed access for ordinary clients Ligolo-ng Agent can reach proxy and TUN/route setup is possible Userland stack is not identical to direct raw networking DNS is the only viable egress dnscat2 DNS path plus authoritative/direct server control Slow/noisy, infrastructure and client required
Prefer one explicit forward for one known service. Use SOCKS when several TCP endpoints must be explored. Use a routed pivot when many ordinary tools must operate without proxy wrappers. Do not add a multi-host route when command execution directly on the pivot is sufficient.
# Kali/Linux
ss -lntup
ip -brief address
ip route
ps -ef | grep -E '[s]sh .*-[LDR]|[c]hisel|[l]igolo|[s]ocat|[s]shuttle'
Windows
REM Windows
netstat -ano
tasklist
netsh interface portproxy show all
netsh advfirewall firewall show rule name="OSCP Pivot LOCAL_PORT"
Read / verify → Record source, pivot, destination, protocol, listener placement and required return path.
If it fails → Interface presence is not proof of destination reachability. Routing/firewall and application permission are independent.
- One reachable pivot can connect to one internal TCP destination → Relay a single TCP service through a fixed forward
- SSH reaches a server that can access the needed internal service → Forward a selected service through an SSH client-side listener
- A pivot can make outbound HTTP/WebSocket connections to the tunnel server → Use a reverse Chisel SOCKS or fixed TCP tunnel
- Several protocols/subnets require a route-style interface through an agent → Route a selected internal subnet through Ligolo-ng
- Only the pivot can initiate SSH, but several client-selected internal destinations are needed → Expose a server-side SOCKS proxy through remote dynamic SSH forwarding
- Multiple internal TCP destinations need transparent application access over SSH → Route a selected subnet through sshuttle
- The pivot is Windows and available networking utilities constrain the route → Forward from Windows with OpenSSH, Plink or Netsh
- The assessment-side client can reach a pivot-side tunnel server → Use forward Chisel SOCKS and version-supported UDP routing
- A second internal network is reachable only from a later foothold → Compose multiple pivots and validate every connection leg