// Draft hunt; requires Defender for Endpoint process telemetry for this OS. DeviceProcessEvents | where Timestamp > ago(7d) | where FileName in~ ("powershell.exe", "pwsh.exe", "mshta.exe", "wscript.exe", "cscript.exe") | where ProcessCommandLine contains "-enc" or ProcessCommandLine contains "http" or ProcessCommandLine contains "FromBase64String" or ProcessCommandLine contains "javascript:" or ProcessCommandLine contains "vbscript:" | project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, SHA1 | order by Timestamp desc