Post-exploitation and Lateral Movement
A tester on a compromised dual-homed Windows host must reach 10.10.20.0/24, which is only reachable through the internal gateway 10.10.5.1. The entry must survive a reboot. Which command does this?
Show the answer
Correct answerD. route -p add 10.10.20.0 mask 255.255.255.0 10.10.5.1
AWhy not this: net use maps a network share and does not create a route to a subnet.
BWhy not this: The route is added, but without -p it is held in memory only and is lost at reboot.
CWhy not this: netstat -rn only displays the routing table; it cannot add or change a route.
DWhy this is right: route with -p adds a static route to the internal subnet through the gateway and keeps it after a reboot.
The route command modifies the routing table, and the -p switch stores the static route so it persists across reboots. Without -p the same route add works only until the next restart, so it fails the persistence requirement.