mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-05-28 05:07:23 +00:00
Updated advanced-hunting best-practice code example to filter on time
This commit is contained in:
parent
5d29265636
commit
abfc2d45e4
@ -81,11 +81,11 @@ ProcessCreationEvents
|
||||
|
||||
// Better query - filters on filename, does case-insensitive matches
|
||||
ProcessCreationEvents
|
||||
| where FileName in~ ("net.exe", "net1.exe") and ProcessCommandLine contains "stop" and ProcessCommandLine contains "MpsSvc"
|
||||
| where EventTime > ago(7d) and FileName in~ ("net.exe", "net1.exe") and ProcessCommandLine contains "stop" and ProcessCommandLine contains "MpsSvc"
|
||||
|
||||
// Best query also ignores quotes
|
||||
ProcessCreationEvents
|
||||
| where FileName in~ ("net.exe", "net1.exe")
|
||||
| where EventTime > ago(7d) and FileName in~ ("net.exe", "net1.exe")
|
||||
| extend CanonicalCommandLine=replace("\"", "", ProcessCommandLine)
|
||||
| where CanonicalCommandLine contains "stop" and CanonicalCommandLine contains "MpsSvc"
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user