[rule]
description = """
Identifies the execution of powershell command via a Microsoft signed Visual Basic script Syncappvpublishingserver.vbs.
Adversaries may use this method to bypass application whitelisting.
"""
id = "96a12f63-320b-4738-bca5-5cf80fc89ede"
license = "Elastic License v2"
name = "Execution via SyncAppvPublishingServer"
os_list = ["windows"]
reference = ["https://lolbas-project.github.io/lolbas/Scripts/Syncappvpublishingserver/"]
version = "1.0.16"
query = '''
process where event.action == "start" and
(
(process.pe.original_file_name : ("wscript.exe", "cscript.exe", "cmd.exe") and
process.command_line : "*SyncAppvPublishingServer.vbs*" and process.args : ("n;*", ";*", "Break;*")) or
(process.name : "powershell.exe" and process.args : "Sync-AppvPublishingServer" and process.args : ("n;*", ";*", "Break;*"))
)
'''
min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.001"
name = "PowerShell"
reference = "https://attack.mitre.org/techniques/T1059/001/"
[[threat.technique.subtechnique]]
id = "T1059.003"
name = "Windows Command Shell"
reference = "https://attack.mitre.org/techniques/T1059/003/"
[[threat.technique.subtechnique]]
id = "T1059.005"
name = "Visual Basic"
reference = "https://attack.mitre.org/techniques/T1059/005/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "7.15.0"