Detection rules › Elastic

Execution via SyncAppvPublishingServer

Source
github.com/elastic/protections-artifacts

Identifies the execution of powershell command via a Microsoft signed Visual Basic script Syncappvpublishingserver.vbs. Adversaries may use this method to bypass application whitelisting.

MITRE ATT&CK coverage

Rule body

[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"

Stages and Predicates

Stage 1: process

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;*"))
)

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.argswildcard
  • ;*
  • Break;*
  • Sync-AppvPublishingServer corpus 2 (elastic 2)
  • n;*
field:"process.args" kind:wildcard
process.command_linewildcard
  • *SyncAppvPublishingServer.vbs* corpus 2 (elastic 1, splunk 1)
field:"CommandLine" kind:wildcard value:"*SyncAppvPublishingServer.vbs*"
process.namewildcard
  • powershell.exe corpus 184 (elastic 140, splunk 44)
field:"process_name" kind:wildcard value:"powershell.exe"
process.pe.original_file_namewildcard
  • cmd.exe corpus 81 (sigma 43, elastic 21, splunk 17)
  • cscript.exe corpus 32 (sigma 17, elastic 15)
  • wscript.exe corpus 38 (elastic 21, sigma 17)
field:"OriginalFileName" kind:wildcard