Post-exploitation and Lateral Movement

A tester holding valid administrator credentials needs an interactive remote PowerShell session on a Windows server. Its only reachable management port is TCP 5985. What should the tester use?

Show the answer

Correct answerD. A WinRM session using Enter-PSSession

AWhy not this: A dynamic forward needs an SSH foothold and provides routing, not a remote PowerShell session on the server.

BWhy not this: wmic relies on DCOM over RPC, not TCP 5985, and does not give an interactive PowerShell session.

CWhy not this: A relay needs captured authentication and weak signing settings, and does not use valid credentials on 5985.

DWhy this is right: WinRM listens on TCP 5985 over HTTP, and Enter-PSSession gives an interactive remote PowerShell shell.

TCP 5985 is the WinRM HTTP listener, and Enter-PSSession opens an interactive PowerShell session over it with valid credentials. wmic uses DCOM over RPC and cannot provide that session through this port.