Detect SyncAppvPublishingServer in CrowdStrike LogScale
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/
LogScale Detection Query
#event_simpleName=ProcessRollup2
| FileName_l := lower(FileName)
| CommandLine_l := lower(CommandLine)
| ParentBaseFileName_l := lower(ParentBaseFileName)
| ParentCommandLine_l := lower(ParentCommandLine)
// Pre-filter: only process events relevant to this technique
| FileName_l = /^(wscript|cscript|powershell|pwsh)\.exe$/
| CommandLine_l = /syncappvpublishingserver/ OR ParentCommandLine_l = /syncappvpublishingserver/
// Branch flags
| IsSyncAppvDirect := if(
FileName_l = /^(wscript|cscript)\.exe$/ AND CommandLine_l = /syncappvpublishingserver/,
"true", "false"
)
| HasPSPayload := if(
CommandLine_l = /(invoke-expression|iex[\s(]|invoke-webrequest|net\.webclient|downloadstring|downloadfile|-encodedcommand|-enc\s|new-object|start-process|bypass|shellcode|frombase64string|amsiutils)/,
"true", "false"
)
| IsPSFromSyncAppv := if(
FileName_l = /^(powershell|pwsh)\.exe$/ AND
ParentBaseFileName_l = /^(wscript|cscript)\.exe$/ AND
ParentCommandLine_l = /syncappvpublishingserver/,
"true", "false"
)
| IsUnexpectedParent := if(
FileName_l = /^(wscript|cscript)\.exe$/ AND
CommandLine_l = /syncappvpublishingserver/ AND
NOT ParentBaseFileName_l = /^(explorer|svchost|services|winlogon|cmd)\.exe$/,
"true", "false"
)
// Drop non-matching events
| IsSyncAppvDirect = "true" OR IsPSFromSyncAppv = "true" OR IsUnexpectedParent = "true"
// Assign execution vector and risk score
| ExecutionVector := case {
IsPSFromSyncAppv = "true" AND HasPSPayload = "true" => "PowerShell-Child-Of-SyncAppv-With-Payload";
IsSyncAppvDirect = "true" AND HasPSPayload = "true" => "SyncAppv-Direct-PS-Proxy";
IsPSFromSyncAppv = "true" => "PowerShell-Child-Of-SyncAppv";
IsUnexpectedParent = "true" => "SyncAppv-Unexpected-Parent";
* => "SyncAppv-Generic"
}
| RiskScore := case {
IsPSFromSyncAppv = "true" AND HasPSPayload = "true" => 90;
IsSyncAppvDirect = "true" AND HasPSPayload = "true" => 85;
IsPSFromSyncAppv = "true" => 75;
IsUnexpectedParent = "true" => 60;
* => 50
}
| table([_time, ComputerName, UserName, FileName, CommandLine, ParentBaseFileName, ParentCommandLine, ExecutionVector, RiskScore])
| sort(field=RiskScore, order=desc) CrowdStrike LogScale (CQL) detection for T1216.002 SyncAppvPublishingServer.vbs abuse using ProcessRollup2 Falcon telemetry. Pre-filters on wscript.exe, cscript.exe, powershell.exe, and pwsh.exe processes where CommandLine or ParentCommandLine references SyncAppvPublishingServer. Applies three detection branches with computed risk scores: direct invocation with PowerShell payload indicators, PowerShell spawned as child of wscript/cscript SyncAppv proxy, and SyncAppvPublishingServer launched from an unexpected parent process. Note: ParentCommandLine availability in ProcessRollup2 depends on sensor version; Branch 2 may require a join against parent process events on older sensors where this field is absent.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate App-V package publishing operations by IT administrators or automated deployment agents that invoke wscript.exe with SyncAppvPublishingServer.vbs and include PowerShell arguments for App-V streaming server configuration or package refresh
- Software asset management or MDM platforms (SCCM, Intune, Tanium) that orchestrate App-V publishing workflows on managed endpoints as part of scheduled application deployment and lifecycle management tasks
- Authorized red team or penetration testing activities that simulate T1216.002 SyncAppvPublishingServer proxy execution as part of sanctioned adversary emulation exercises against the organization's environment
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.
- 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.
- 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.
- 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.
- 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.
References (9)
- https://attack.mitre.org/techniques/T1216/002/
- https://lolbas-project.github.io/lolbas/Scripts/Syncappvpublishingserver/
- https://www.trellix.com/en-ca/about/newsroom/stories/research/suspected-darkhotel-apt-activity-update/
- https://securelist.com/bluenoroff-methods-bypass-motw/108383/
- https://strontic.github.io/xcyclopedia/library/SyncAppvPublishingServer.exe-3C291419F60CDF9C2E4E19AD89944FA3.html
- https://x.com/monoxgas/status/895045566090010624
- https://www.hackingarticles.in/indirect-command-execution-defense-evasion-t1202/
- https://learn.microsoft.com/en-us/windows/application-management/app-v/appv-getting-started
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1216.002/T1216.002.md
Unlock Pro Content
Get the full detection package for T1216.002 including response playbook, investigation guide, and atomic red team tests.