-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGetEntityOverview.kql.txt
34 lines (29 loc) · 1.15 KB
/
GetEntityOverview.kql.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
let prioEntity = dynamic(['url', 'ip', 'mailMessage', 'file']);
SecurityAlert
| where TimeGenerated >= ago(30d)
| extend entities = parse_json(todynamic(Entities))
| mv-expand entities
| extend EntityType = tostring(entities.Type)
| extend IPv4 = tostring(entities.Address)
| extend privateIPv4 = ipv4_is_private(IPv4)
| where privateIPv4 == "false" or isempty(privateIPv4)
| where EntityType in~ (prioEntity)
| summarize count() by EntityType
let prioEntity = dynamic(['url', 'ip', 'mailMessage', 'file']);
SecurityAlert
| where TimeGenerated >= ago(4d)
| extend entities = parse_json(todynamic(Entities))
| mv-expand entities
| extend EntityType = tostring(entities.Type)
| where EntityType in~ (prioEntity)
| summarize count() by bin(TimeGenerated, 10m), EntityType
| render timechart
let prioEntity = dynamic(['url', 'ip', 'mailMessage', 'file']);
SecurityAlert
| where TimeGenerated >= ago(30d)
| extend entities = parse_json(todynamic(Entities))
| mv-expand entities
| extend EntityType = tostring(entities.Type)
| where EntityType == "url"
| distinct tostring(entities.Url)//, entities.FileHashes, entities.Url
| summarize count()