VeriKQL by Kaushik Saha

SecurityEvent.CommandLine

41 rules filter it on a literal value.

Operators: has 20 · has_any 16 · contains 10 · matches regex 3 · !contains 1 · !has 1 · contains_cs 1 · has_cs 1 · hassuffix 1

2 rules reach it through an extend that copies or converts it (extend Country = tostring(LocationDetails.countryOrRegion)), and then filter the new column.

String match (has, contains, startswith …)

.decode('base64')2
.decode64(2
TVqQAAMAAAAEAAA2
\Microsoft\Windows\CurrentVersion2
base64 --decode2
cmd.exe2
curl2
delete2
rundll322
shadow2
wmic2
/s 1
irm1
iwr1
sbt1
$b,15,$b.Length-151
$client = New-Object System.Net.Sockets.TCPClient1
$true1
(.*)>(.*)1
-[Ee^]{1,2}[NnCcOoDdEeMmAaPpHh^`]+\s+"?[a-zA-Z0-9+/=]{6,}1
-b64exec1
-e1
-encodedCommand1
-exec bypass -w 1 -enc1
-k GPSvcGroup1
-kvm11
-ma1
-mm1
-s gpsvc1
.bat1
.dll 1
.dll,1
.onion1
/IM1
/add1
/c1
/q /c color f7&1
0bin1
Add-PSSnapin Microsoft.Exchange.Management.Powershell.Snapin1
Administrators1
AppData1
Checkpoint-Computer1
Clear-History1
DisableRealtimeMonitoring1
DnsAdmins1
Domain Admins1
Downloads1
EnableBDEWithNoTPM1
Enterprise Admins1
FromBase64String1
GetAgent1
HealthMailbox55x2yq1
Hyper-V Administrators1
Invoke-RestMethod1
Invoke-WebRequest1
Net.We$()bClient1
New-Mailbox1
New-MailboxExportRequest1
RecoveryKeyMessageSource1
Remove-Item (Get-PSReadlineOption).HistorySavePath1
Remove-MailboxExportRequest1
Schema Admins1
Set-MpPreference1
Set-PSReadlineOption -HistorySaveStyle SaveNothing1
Start1
Start-BitsTransfer1
SysAidServer1
System.Net.Http.HttpClient1
System.Net.WebClient1
Temp1
Update-RoleGroupMember1
UseAdvancedStartup1
UseTPMKey1
UseTPMKeyPIN1
UwB0AGEAcgB0AC0ASgBvAGIAIAAtAFMAYwByAGkAcAB0AEIAbABvAGMAawAgAHsAKABzAGEAcABzACAAKAAiAHAA1
\/[Cc] +[Ss][Tt][Aa][Rr][Tt].*\.exe1
atera.com1
backup1
bcdedit1
bootstatuspolicy ignoreallfailures1
catalog1
cdn.discordapp.com1
cl1
clear-log1
config1
create1
del (Get-PSReadlineOption).HistorySavePath*1
delete shadows1
dumpz1
explorer1
ghostbin1
github1
githubusercontent1
group1
hastebin1
hatebin1
http1
integratorLogin1
klgrth1
localgroup1
lsass1
moc.ppadrocsid.ndc1
paste.1
pastebin1
powercat.ps11
powershell1
privatebin1
recoveryenabled no1
rm (Get-PSReadlineOption).HistorySavePath1
sdelete1
set-log1
shadowcopy delete1
sl1
start1
systemstatebackup1
termbin1
vssadmin1
vssvc1
wbadmin1
wget1
wmic computersystem get domain1
zerobin1

Excluded (!=, !has, !in …)

/domain1
sdelete1

Every rule that filters it

Rules are from Azure/Azure-Sentinel (MIT licence) at commit 9ea9f7c. VeriKQL stores facts its parser read from each rule and links the rule; it does not copy rule text. Counts are what the rules do: practice, not guidance, and not Microsoft's recommendation.