SyncAppvPublishingServer
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.
// Branch 1: wscript.exe directly invoking SyncAppvPublishingServer.vbs with embedded PowerShell content
let SyncAppvPath = dynamic(["syncappvpublishingserver.vbs", "syncappvpublishingserver"]);
let PowerShellIndicators = dynamic([
"invoke-expression", "iex(", "iex ",
"invoke-webrequest", "net.webclient", "downloadstring", "downloadfile",
"-encodedcommand", "-enc ", "-e ",
"start-process", "new-object", "invoke-command",
"bypass", "hidden", "mimikatz", "shellcode",
"invoke-mimikatz", "amsiutils", "reflection",
"frombase64string", "io.memorystream"
]);
let SyncAppvEvents = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "wscript.exe" or FileName =~ "cscript.exe"
| where ProcessCommandLine has_any (SyncAppvPath)
| where ProcessCommandLine has_any (PowerShellIndicators)
| extend ExecutionVector = "Direct-SyncAppv-PowerShell-Proxy"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
InitiatingProcessAccountName, ProcessId, InitiatingProcessId,
ExecutionVector;
// Branch 2: PowerShell spawned by wscript.exe/cscript.exe where parent command line references SyncAppvPublishingServer
let PSFromSyncAppv = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("powershell.exe", "pwsh.exe")
| where InitiatingProcessFileName in~ ("wscript.exe", "cscript.exe")
| where InitiatingProcessCommandLine has_any (SyncAppvPath)
| extend ExecutionVector = "PowerShell-Child-Of-SyncAppv"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
InitiatingProcessAccountName, ProcessId, InitiatingProcessId,
ExecutionVector;
// Branch 3: Any process spawning SyncAppvPublishingServer.vbs from unexpected parent (not system/winlogon)
let UnexpectedParent = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("wscript.exe", "cscript.exe")
| where ProcessCommandLine has_any (SyncAppvPath)
| where InitiatingProcessFileName !in~ ("explorer.exe", "svchost.exe", "services.exe", "winlogon.exe", "cmd.exe")
| extend ExecutionVector = "SyncAppv-Unexpected-Parent"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
InitiatingProcessAccountName, ProcessId, InitiatingProcessId,
ExecutionVector;
union SyncAppvEvents, PSFromSyncAppv, UnexpectedParent
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- 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
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.