Used to cross network boundaries through a compromised host.
Example: Compromise a machine with multiple network interfaces (dual-homed) to move between separate networks.
Lateral Movement
Movement within the same network segment to compromise more hosts.
Example: Using local administrator credentials to access other machines on the network.
Tunneling
Encapsulate network traffic in another protocol to hide malicious activities.
Example: Use HTTP/HTTPS to disguise C2 (Command & Control) traffic.
Key Differences
Technique: Objective — Practical Example
Pivoting: Move deeper into the network by crossing physical or virtual boundaries. — Use a dual-homed machine to access separate networks.
Lateral Movement: Spread within the same network segment, compromising more hosts or services. — Use local administrator credentials to compromise other computers.
Tunneling: Hide malicious traffic by encapsulating it in legitimate protocols to avoid detection. — Encapsulate commands in HTTP/HTTPS requests to control compromised hosts.
Networking Fundamentals Behind Pivoting
IP Addresses and NICs:
Every device on a network needs an IP address, assigned to a network interface controller (NIC).
IP Types:
Public: Routable on the Internet (such as 134.122.100.200).
Private: Routable only within internal networks (such as 10.106.0.172).
Tools:
Linux/macOS: ifconfig or ip addr.
Windows: ipconfig.
Routing Tables:
Dictate how a system sends packets based on their destination.
They can include static, dynamic (protocols such as OSPF/BGP), or directly connected routes.
Commands:
Linux: netstat -r or ip route.
Windows: route print.
Protocols, Services, and Ports:
Protocols define how applications communicate.
Ports:
Identify specific services on a machine (e.g., HTTP → port 80).
Open ports indicate applications listening for incoming connections.
Identifying Pivoting Opportunities
Multiple NICs (eth0, eth1, ….):
Devices with multiple interfaces (e.g., eth0, eth1) can connect different networks.
It is important to review assigned IP addresses and accessible ranges.
Routing Tables:
Analyze which routes are configured and which networks are reachable.
Identify missing routes to configure pivots.
Services and Protocols:
Identify services that can be exploited to move laterally or pivot.
Example: Use an accessible port 80 to smuggle commands disguised as legitimate traffic.