WimRM (PowerShell Remoting)
#powershell #winrs
Ports: 5985/TCP (WinRM HTTP) or 5986/TCP (WinRM HTTPS)
Group Required: Remote Management Users
PsExec on steroids
If Admin creds are used, we get a elevated shell on the remote machine (No UAC issues), because the remoting process runs a a High Integrity Process.
PSRemoting uses WinRM which is MS's implementation of WS-Management
Enabled by default since Server 2012
Need to manually enable in Windows Desktop (Requires Adminitrative Privs)
Some disadvantages:
Supports systemwide transcript and deep script logging
One-to-One
Interactive login to one machine
Runs in a new process (wsmprovhost)
State-full (persistent variables and state) using
New-PSSession
Commands:
Enter-PSSession
: Enter interactive prompt on the target machineNew-PSSession
: Returns sessions to create persistent environment.
One-to-Many
Also knows as fan-out remoting.
Non Interactive
Executes commands parallely.
Commands:
Invoke-Command
: Executes command on one more machine parallely.
Run commands/scripts on:
one more more computers
disconnected session
as a background job
Required administrative access on the target machine.
We can also get host process information for the running PS Remoting session
winrs
Evades powershell based logging
Uses WinRM ports - 5985 and 5986
Last updated