Try it using Invoke-Atomic

Signed Script Proxy Execution

Description from ATT&CK

Adversaries may use trusted scripts, often signed with certificates, to proxy the execution of malicious files. Several Microsoft signed scripts that have been downloaded from Microsoft or are default on Windows installations can be used to proxy execution of other files.(Citation: LOLBAS Project) This behavior may be abused by adversaries to execute malicious files that could bypass application control and signature validation on systems.(Citation: GitHub Ultimate AppLocker Bypass List)

Atomic Tests

Atomic Test #1 - SyncAppvPublishingServer Signed Script PowerShell Command Execution

Executes the signed SyncAppvPublishingServer script with options to execute an arbitrary PowerShell command. Upon execution, calc.exe will be launched.

Supported Platforms: windows

auto_generated_guid: 275d963d-3f36-476c-8bef-a2a3960ee6eb

Inputs:

Name Description Type Default Value
command_to_execute A PowerShell command to execute. string Start-Process calc

Attack Commands: Run with command_prompt!

1
2
C:\windows\system32\SyncAppvPublishingServer.vbs "\n;#{command_to_execute}"

Atomic Test #2 - manage-bde.wsf Signed Script Command Execution

Executes the signed manage-bde.wsf script with options to execute an arbitrary command.

Supported Platforms: windows

auto_generated_guid: 2a8f2d3c-3dec-4262-99dd-150cb2a4d63a

Inputs:

Name Description Type Default Value
command_to_execute A command to execute. path %windir%\System32\calc.exe

Attack Commands: Run with command_prompt!

1
2
3
set comspec=#{command_to_execute}
cscript %windir%\System32\manage-bde.wsf

Cleanup Commands:

1
2
set comspec=%windir%\System32\cmd.exe

source