psremote
Thepsremote command provides PowerShell Remoting operations for remote command execution, script delivery, and interactive sessions over WS-Management.
Usage
Overview
PowerShell Remoting (PSRemote) is a protocol built on top of WS-Management (WinRM) that enables operators to execute PowerShell commands and scripts on remote Windows hosts. It operates over HTTP (port 5985) or HTTPS (port 5986) and is one of the most common administrative remote access methods in Windows enterprise environments. PSRemote is distinct from raw WinRM command execution — it provides a full PowerShell runspace on the remote host, enabling cmdlet execution, pipeline operations, and module loading that are not possible through basiccmd.exe execution.
Planned Capabilities
| Capability | Description |
|---|---|
| Command Execution | Execute PowerShell commands on remote hosts |
| Script Execution | Run PowerShell script files (.ps1) remotely |
| Interactive Session | Establish an interactive PowerShell Remoting session |
| Constrained Language Bypass | Execute in Full Language Mode where possible |
| Module Loading | Import and execute PowerShell modules remotely |
Authentication
PSRemote uses the same global authentication flags as all other R4t commands. The following authentication methods are supported:| Method | Flag | Description |
|---|---|---|
| Password | -u / -p | Domain username and password |
| NTLM Hash | --hash | Pass-the-hash via NT hash |
| Kerberos | --aes / --ccache | Kerberos authentication via AES key or ccache |
| Certificate (PFX) | --pfx | PFX certificate authentication |
| Certificate (PEM) | --cert / --key | PEM certificate and key authentication |
| Anonymous | --anonymous | Unauthenticated access |
Connection Details
| Property | Value |
|---|---|
| Protocol | PowerShell Remoting over WS-Management |
| HTTP Port | 5985 |
| HTTPS Port | 5986 |
| Authentication | NTLM, Kerberos, Basic, Certificate |
| Remote Shell | Full PowerShell runspace |
| Access Group | Remote Management Users (RID 580) |
Payload Execution via PSRemote
PSRemote is a primary execution channel for delivering payloads to remote hosts. Its PowerShell runspace enables both fileless in-memory execution and disk-based delivery.Fileless Execution
Disk-Based Execution
Payload Factory Integration
When the payload factory is operational, PSRemote execution modules will request artifacts by capability:| Capability Request | Use Case |
|---|---|
execution=script, type=ps1 | PowerShell stager for direct execution |
inmemory=true, execution=script | Fileless execution via encoded PowerShell |
reflective=true, execution=reflective-load | Reflective DLL loaded via [Reflection.Assembly]::Load |
execution=self-exec, os=windows | Standard EXE executed after file transfer |
type=shellcode, inmemory=true | Shellcode injected via PowerShell process injection |
Remote Management Users (RID 580)
Access to PSRemote on a host is controlled by membership in the Remote Management Users local group (RID 580). By default, only members of this group (and local Administrators) can establish PowerShell Remoting sessions. This group is critical for attack path analysis — any user with Remote Management Users membership on a host can execute arbitrary PowerShell commands there.Spray Integration
PSRemote credential validation can be tested through the WinRM spray protocol, since PSRemote operates over WinRM:Related Commands
winrm— Raw WinRM command execution (cmd.exe level)wmi— WMI remote execution (alternative lateral movement)smb— SMB file operations (payload staging)spray— Multi-protocol credential sprayingbloodhound— BloodHound collection (includespsremotecollection method)

