WinRM

WinRM stands for Windows Remote Management that allows to perform management tasks on systems remotely, WinRM is available if the port is opened.

WinRM Ports:

  • 5985/tcp (HTTP)

  • 5986/tcp (HTTPS)

Enumeration

Find machines with PS Session

User Hunting

PS Session

PSRemoting uses Windows Remote Management (WinRM) which is Microsoft's implementation of WS-Management.

Enable PowerShell Remoting on local system (Requires elevated privileges)

Enable-PSRemoting

Create a session

$sess = New-PSSession -Computername dcorp-adminsrv.dollarcorp.moneycorp.local

Enter existing session

Enter-PSSession -ComputerName dcorp-adminsrv.dollarcorp.moneycorp.local

# Using session object
Enter-PSSession -Session $sess

Invoke-Command

Useful script blocks

Winrs

Last updated

Was this helpful?