Once a system is compromised, internal network scanning helps identify other potential targets, open ports, and services for lateral movement. Using Metasploit, you can conduct reconnaissance within the compromised network by setting up an IP route, scanning for open ports, and forwarding traffic for deeper exploitation.
Step 1: Set an Internal IP Route
Routes internal network traffic through the compromised machine, allowing for internal scans.
runautoroute-sIP_RANGE
The autoroute module adds a network route to the target subnet (10.0.16.0/20).
Enables access to other internal systems through the compromised machine.
Step 2: Background the Session
Moves the Meterpreter session to the background for multi-tasking.
background
Step 3: Perform a TCP Port Scan
Uses the Metasploit auxiliary scanner to enumerate open ports on a target machine.