microsoft / Microsoft-365-Defender-Hunting-Queries

Sample queries for Advanced hunting in Microsoft 365 Defender
MIT License
1.94k stars 539 forks source link

Update Qakbot discovery activies.md #417

Open cbresponse opened 3 years ago

cbresponse commented 3 years ago

It should be ProcessCommandLine instead of InitiatingProcessCommandLine for recon processes spawned by injected parent processes

DeviceProcessEvents | where InitiatingProcessFileName in~('mobsync.exe','explorer.exe') | where (FileName =~ 'net.exe' and ProcessCommandLine has_all('view','/all')) or (FileName =~ 'whoami.exe' and ProcessCommandLine has '/all') or (FileName =~ 'nslookup.exe' and ProcessCommandLine has_all('querytype=ALL','timeout=10')) or (FileName =~ 'netstat.exe' and ProcessCommandLine has '-nao') or (FileName =~ 'arp.exe' and ProcessCommandLine has '-a') or (FileName =~ 'ping.exe' and ProcessCommandLine has '-t' and ProcessCommandLine endswith '127.0.0.1') | summarize DiscoveryCommands = dcount(ProcessCommandLine), make_set(InitiatingProcessFileName), make_set(FileName), make_set(ProcessCommandLine) by DeviceId, bin(Timestamp, 5m)
| where DiscoveryCommands >= 3