Post-exploitation and Lateral Movement

On a compromised Windows host, netstat -ano shows an unknown service listening on TCP 8443 with PID 4212. The tester needs the process name and its account before pivoting, without disrupting the service. Which command is BEST?

Show the answer

Correct answerB. tasklist /v /fi "PID eq 4212"

AWhy not this: Without the -o switch, netstat shows no PIDs, so it cannot map the port to a process.

BWhy this is right: Filtering tasklist by PID returns the process name, and verbose mode adds the user account.

CWhy not this: taskkill ends the process, which disrupts the service and returns no account details.

DWhy not this: arp -a lists IP-to-MAC mappings and says nothing about processes.

The PID from netstat -ano links the listening port to a process. tasklist /v filtered on that PID returns the image name and the user it runs as without altering it. netstat -an omits PIDs, so it cannot tie the port to a process.