1/71
Pivoting and Lateral Movement
Using a compromised system to reach otherwise inaccessible targets.
Exploiting additional systems through established network pivot points.
To reach new hosts, privileges, or data resources.
A compromised system used as an intermediary to access other systems.
Command and control.
Meterpreter.
MsfVenom.
portfwd add.
Local listening port on the attacker system.
Remote destination IP address.
Remote destination TCP port.
Forwards local TCP port 8000 through the pivot to 10.10.10.100:80.
On the attacking system.
Provide a SOCKS proxy through a pivot.
The compromised pivot host, 10.10.10.11.
Returns to the Metasploit console while retaining the session.
The first established Meterpreter session.
Send traffic for a destination network through a chosen session.
Routes Metasploit traffic to that network through Meterpreter session 1.
RHOST or RHOSTS, depending on the module.
Modules can send traffic through an existing Meterpreter connection.
It increments to a new session number.
A route for one specific IPv4 address.
Sends traffic for that single host through session 1.
Removes that host route through session 1.
Routes traffic for that host through session 2.
A firewall blocked access from the first compromised host.
The firewall permitted access from the second compromised host.
Which internal paths are permitted through firewalls.
Discovers hosts on the specified local subnet using ARP.
No; Metasploit provides separate port-scanning modules.
auxiliary/scanner/portscan/tcp.
use.
Specifies target hosts to scan.
Specifies TCP ports to check.
run.
Internal systems may be unreachable from the external attacker.
nmap and db_nmap.
Living off the land: reusing built-in system capabilities.
Local TCP port forwarding through an SSH connection.
Listen locally on 8000 and forward to 10.10.10.100 port 80.
On the attacking system.
Dynamic port forwarding through a SOCKS proxy.
A local SOCKS proxy listening on port 3128.
SOCKS can tunnel multiple protocols; HTTP proxies are HTTP-focused.
SOCKS proxy-aware client applications.
Yes, for multiple local port forwards.
netsh interface portproxy.
Administrator privileges.
On the compromised Windows host.
The local interface address to listen on.
The local incoming TCP port.
The destination IP address for forwarded traffic.
The destination TCP port for forwarded traffic.
An IPv4-to-IPv4 TCP forwarding rule.
Listen on all local IPv4 interfaces.
netstat -nato | findstr :4444
LISTENING.
netsh listens on the victim; the shown portfwd listens on the attacker.
Get-NetTCPConnection or Sysinternals TCPView.
The destination may see another victim IP rather than the external attacker.
The intermediary address the reverse payload connects to.
The actual interface and port used by the Metasploit listener.
T1090: Proxy.
Netcat together with named pipes.
Machine-in-the-middle or local password-harvesting attacks.
It identifies a compromised intermediary that must be investigated.
Scoping the compromise.
Identify the true source and all compromised intermediary systems.
No. The book notes they are generally less fast or capable.
PowerShell, smbclient, and Netcat.
Pivot Exploitation.