T1216.002 Splunk · SPL

Detect SyncAppvPublishingServer in Splunk

Adversaries may abuse SyncAppvPublishingServer.vbs to proxy execution of malicious PowerShell commands, bypassing execution restrictions and evading defensive countermeasures. SyncAppvPublishingServer.vbs is a legitimate, Microsoft-signed Visual Basic script associated with Windows Application Virtualization (App-V), located in System32 and commonly executed via wscript.exe. By embedding PowerShell commands in the script's argument using the syntax `SyncAppvPublishingServer.vbs "n; {PowerShell}"`, adversaries can invoke PowerShell logic through a trusted signed host process rather than calling powershell.exe directly. This technique has been observed in DarkHotel APT and BlueNoroff campaigns as a means of evading script-block logging, execution policy restrictions, and process-based detection rules that focus on powershell.exe as the initiating process.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1216 System Script Proxy Execution
Sub-technique
T1216.002 SyncAppvPublishingServer
Canonical reference
https://attack.mitre.org/techniques/T1216/002/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog (sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1)
(Image="*\\wscript.exe" OR Image="*\\cscript.exe" OR Image="*\\powershell.exe" OR Image="*\\pwsh.exe")
| eval CommandLine=lower(CommandLine)
| eval ParentImage=lower(ParentImage)
| eval ParentCommandLine=lower(ParentCommandLine)
| eval IsSyncAppvDirect=if(
    (match(Image, "(wscript|cscript)\.exe$") AND match(CommandLine, "syncappvpublishingserver")),
    1, 0
  )
| eval HasPSPayload=if(
    match(CommandLine, "(invoke-expression|iex[\s(]|invoke-webrequest|net\.webclient|downloadstring|downloadfile|-encodedcommand|-enc\s|new-object|bypass|shellcode|amsiutils|frombase64string|invoke-command|start-process)"),
    1, 0
  )
| eval IsPSFromSyncAppv=if(
    match(Image, "(powershell|pwsh)\.exe$") AND
    match(ParentImage, "(wscript|cscript)\.exe$") AND
    match(ParentCommandLine, "syncappvpublishingserver"),
    1, 0
  )
| eval IsSyncAppvUnexpectedParent=if(
    match(Image, "(wscript|cscript)\.exe$") AND
    match(CommandLine, "syncappvpublishingserver") AND
    NOT match(ParentImage, "(explorer|svchost|services|winlogon|cmd)\.exe$"),
    1, 0
  )
| eval DetectionReason=case(
    IsPSFromSyncAppv=1, "PowerShell spawned by SyncAppvPublishingServer proxy",
    IsSyncAppvDirect=1 AND HasPSPayload=1, "SyncAppvPublishingServer with embedded PowerShell payload",
    IsSyncAppvUnexpectedParent=1, "SyncAppvPublishingServer invoked from unexpected parent",
    true(), null()
  )
| where isnotnull(DetectionReason)
| eval RiskScore=case(
    IsPSFromSyncAppv=1 AND HasPSPayload=1, 90,
    IsSyncAppvDirect=1 AND HasPSPayload=1, 85,
    IsPSFromSyncAppv=1, 75,
    IsSyncAppvUnexpectedParent=1, 60,
    true(), 50
  )
| table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine,
        IsSyncAppvDirect, HasPSPayload, IsPSFromSyncAppv, IsSyncAppvUnexpectedParent,
        DetectionReason, RiskScore
| sort - RiskScore, - _time
high severity high confidence

Detects abuse of SyncAppvPublishingServer.vbs to proxy PowerShell execution using Sysmon Event ID 1. Evaluates three detection scenarios: (1) wscript.exe/cscript.exe directly executing SyncAppvPublishingServer.vbs with embedded PowerShell command indicators; (2) powershell.exe spawned as a child of wscript.exe/cscript.exe where the parent's command line references SyncAppvPublishingServer.vbs; (3) SyncAppvPublishingServer.vbs invoked from an unexpected parent process. Assigns a risk score to prioritize analyst review, with the highest scores for confirmed PowerShell proxy patterns.

Data Sources

Process: Process CreationCommand: Command ExecutionSysmon Event ID 1

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Legitimate App-V administrators running SyncAppvPublishingServer.vbs as part of application publishing workflows — the script may be invoked with parameters that superficially resemble PowerShell patterns
  • MDM solutions (Microsoft Intune, SCCM) invoking SyncAppvPublishingServer.vbs during App-V package deployment and synchronization tasks on managed endpoints
  • System administrators testing App-V virtualization environments where PowerShell is legitimately used alongside the SyncAppvPublishingServer script in the same session
  • Security red team exercises or authorized penetration tests validating detection coverage for LOLBin-based PowerShell execution
Download portable Sigma rule (.yml)

Other platforms for T1216.002


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1SyncAppvPublishingServer PowerShell Proxy — Benign Command

    Expected signal: Sysmon Event ID 1: wscript.exe with CommandLine containing 'SyncAppvPublishingServer.vbs' and the argument 'n; whoami'. PowerShell ScriptBlock Log Event ID 4104 may capture the proxied command execution depending on the App-V configuration. Security Event ID 4688 (if command line auditing enabled) for wscript.exe.

  2. Test 2SyncAppvPublishingServer PowerShell Proxy — Encoded Command

    Expected signal: Sysmon Event ID 1: wscript.exe with CommandLine containing 'SyncAppvPublishingServer.vbs', '-encodedCommand', and the Base64 payload. PowerShell ScriptBlock Log Event ID 4104 capturing the decoded command 'Write-Output Argus-Test-T1216.002'. If PowerShell spawns as a child process, a second Sysmon Event ID 1 for powershell.exe with parent=wscript.exe.

  3. Test 3SyncAppvPublishingServer PowerShell Proxy — Download Cradle Simulation

    Expected signal: Sysmon Event ID 1: wscript.exe with CommandLine containing 'SyncAppvPublishingServer.vbs', 'Net.WebClient', 'DownloadString', and 'IEX'. Sysmon Event ID 3: network connection attempt to 127.0.0.1:8080 originating from wscript.exe or a child powershell.exe. PowerShell ScriptBlock Log Event ID 4104 capturing the download cradle code.

  4. Test 4SyncAppvPublishingServer via cmd.exe — Indirect Invocation

    Expected signal: Sysmon Event ID 1 for cmd.exe (from whatever launched the test), then Sysmon Event ID 1 for wscript.exe with ParentImage=cmd.exe and CommandLine containing 'SyncAppvPublishingServer.vbs' and the PowerShell Get-Process command. The parent-child chain cmd.exe -> wscript.exe -> [powershell proxy] is captured.

Unlock Pro Content

Get the full detection package for T1216.002 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections