Pivoting tools work because networks allow more than they should. Hardening is about shrinking what’s allowed, baselining what’s normal, and watching for traffic that doesn’t fit the baseline. This note is the defender-facing counterpart to the rest of the module — same tools, opposite perspective.

The Three Legs — People, Process, Technology

No single control stops pivoting. Hardening is layered:

  • People — admin discipline, MFA, security awareness, BYOD policy
  • Process — asset inventory, change management, incident response, disaster recovery
  • Technology — firewalls, IDS/IPS, SIEM, EDR, network segmentation, MFA

A network that nails all three is still breachable — but detection and response happen in hours instead of months.

Start With a Baseline

You can’t detect abnormal until you’ve documented normal. The baseline covers:

CategoryWhat to record
Enterprise hostsEvery device that should exist on the network, by role
Application inventoryWhat’s installed per host category
DNS recordsInternal zones, delegations, allowed external resolvers
DHCP leasesScopes, reservations, expected MAC ranges
Admin usersWho has elevated access, where, and why
Dual-homed hostsAny host with more than one NIC — these are pivot candidates
Network diagramCurrent (not from 2019) topology of VLANs, firewalls, trust boundaries

Without this, every alert is “is that normal?” with no answer.

MITRE ATT&CK Mapping

Pivoting techniques map cleanly to ATT&CK. Pair every alert rule with its technique for faster triage.

TechniqueIDDefensive focus
External Remote ServicesT1133VPN hardening, exposed service review
Remote ServicesT1021MFA on SSH/RDP/WinRM, geofencing
Non-Standard PortT1571Monitor protocol/port mismatches (HTTPS on :444)
Protocol TunnelingT1572Detect DNS/ICMP/HTTP tunnels; enforce allowed protocols
Proxy (External / Internal)T1090Proxy allowlists, netflow analytics
Ingress Tool TransferT1105Monitor uncommon downloads, EDR file reputation
Living Off the Land—Baseline normal use of PowerShell, WMI, certutil, netsh

Detection Strategies by Pivot Type

SSH Tunnels

  • Baseline who’s allowed to SSH outbound. Workstations rarely need outbound 22.
  • Alert on AllowTcpForwarding yes combined with sessions from unprivileged accounts.
  • EDR hook on ssh -D, ssh -L, ssh -R command lines.
  • Network: long-lived TCP connections to external IPs on port 22 from non-admin hosts.

Chisel / HTTPS Tunnels

  • Chisel’s default WebSocket handshake has recognizable signatures (JA3, specific HTTP headers).
  • Long-lived WebSocket connections to uncategorized external IPs — alert.
  • SNI mismatch (connecting to IP with no SNI, or SNI not in corporate allowlist) — alert.
  • Chisel binaries hashable; feed hashes to EDR.

DNS Tunneling (dnscat2, iodine, dns2tcp)

  • Volume: a workstation making hundreds of queries per second to the same zone is abnormal.
  • Entropy: subdomain labels with high Shannon entropy (base64/base32-looking) indicate encoded data.
  • TXT/NULL/CNAME requests at unusual ratios vs. baseline.
  • Queries to recently registered domains (NRD lists catch this).
  • Beaconing — same source polling the same domain at fixed intervals with no human activity.

Umbrella, Infoblox ADP, and Cisco DNS Security all flag dnscat2 defaults within minutes. Real adversaries randomize beacon timing and use high-reputation parent domains; detection shifts to volume and entropy.

ICMP Tunneling

  • ICMP payload size: a normal ping is small and fixed. ptunnel packets are large and variable — simple size histograms flag them.
  • Ratio of echo requests to echo replies that’s not 1:1.
  • ICMP from hosts that shouldn’t ping externally (servers, segmented workstations).

Protocol Tunneling in General

  • Port/protocol mismatch — SSH on 443, HTTPS on 8080, etc. Deep packet inspection or JA3 fingerprinting catches it.
  • Allowlist outbound by protocol per host role. Workstations don’t need direct outbound TCP 22, 1080, 4444.
  • Egress firewall logs are the single highest-value log source — ingest them into SIEM.

Proxy Pivots (rpivot, SocksOverRDP)

  • Netflow showing a single internal host as the source of connections to many internal subnets within short windows.
  • RDP sessions with abnormally high data volume (SocksOverRDP tunneling pushes DVC volume well above normal).
  • Unexplained Proxifier / ProxyCap installs on user endpoints.

Core Hardening Controls

Network Segmentation

Flat networks make pivoting trivial. Segmenting into user / server / admin / DMZ / management zones means a single foothold doesn’t yield the whole network.

  • East-west firewalls between zones, not just north-south
  • Admin networks reachable only from jump hosts, MFA required
  • DMZ hosts talk back to internal networks over explicitly allowed services only
  • OOB management network for switches/firewalls, air-gapped from user networks

Least Privilege + MFA

  • No standing domain admin — Just-In-Time elevation via PAM
  • MFA on every remote access path (VPN, RDP, SSH, Citrix, VDI)
  • Service accounts non-interactive, managed service accounts (gMSA/MSA) over password-based
  • Regular access reviews — former employees disabled within 24h

Egress Filtering

Most tunneling tools die here if egress is locked down:

  • Deny all outbound by default; allow by service/destination
  • Force all web traffic through an inspection proxy
  • Block direct external DNS; internal resolvers only
  • Rate-limit ICMP outbound
  • Alert on outbound to IPs without SNI or to uncategorized hostnames

Monitoring & Detection Stack

LayerTool classWhat it catches
EndpointEDRUnusual process trees, tunneling binaries, LotL abuse
NetworkIDS/IPSProtocol anomalies, JA3 fingerprints, signature matches
LogsSIEMCorrelation across hosts, baseline comparison
DNSDNS SecurityQuery entropy, beaconing, NRD
FlowNetFlow / ZeekLong-lived flows, data volume anomalies

The gaps in this stack are where attackers live. SIEM without endpoint = you see traffic but not who initiated it. EDR without egress logs = you see the tool but not the exfil.

Response Playbook (Abbreviated)

  1. Contain — isolate the suspected pivot host at the network level (quarantine VLAN or EDR network isolation).
  2. Preserve — image volatile state before shutdown (memory, netstat, process list).
  3. Analyze — identify tool (binary hashes, network signatures, command-line history).
  4. Pivot the investigation — if host A was pivoting, who was it pivoting to? Check the next hop.
  5. Eradicate — rotate credentials used by compromised accounts, remove persistence.
  6. Recover — rebuild from clean images; don’t trust in-place cleanup.
  7. Lessons learned — update baseline, add detection rules that would have caught it sooner.

Quick Reference — Defender’s Grep List

# Linux hosts: unexpected tunneling binaries in common paths
find / -name 'chisel*' -o -name 'ssh' -newer /etc/passwd 2>/dev/null
find / -name 'ptunnel*' -o -name 'dnscat*' 2>/dev/null
 
# Linux: long-lived outbound connections
ss -tnp state established
 
# Linux: suspicious listeners on non-standard ports
ss -tlnp | grep -vE ':22|:80|:443|:3306'
 
# Windows: netsh portproxy entries
netsh interface portproxy show v4tov4
 
# Windows: scheduled tasks that persist tunnels
schtasks /query /fo LIST /v | findstr /i "chisel plink ssh"
 
# Windows: SocksOverRDP plugin registered
reg query HKLM\SOFTWARE\Microsoft\Terminal Server Client\Default\AddIns

The Attacker-Defender Loop

Everything in this module is about finding and crossing boundaries. Defenders win by:

  1. Shrinking the boundaries (segmentation, egress filtering)
  2. Instrumenting the boundaries (logs on every firewall, DNS, proxy)
  3. Defining normal at each boundary (baseline)
  4. Alerting when traffic doesn’t fit normal (SIEM correlation, EDR detections)

An attacker with full knowledge of a network can usually still pivot — but every tool they drop, every protocol they abuse, every long-lived connection they leave behind is a chance for the defender to see them. Make the pivot expensive, slow, and loud.