Malware Detections by Detection technology Trend
Description
This query visualises total emails with Malware detections over time summarizing the data daily by various Malware detection technologies/controls.
Query · kql
let TimeStart = startofday(ago(30d)); let TimeEnd = startofday(now()); let baseQuery = EmailEvents | where Timestamp >= TimeStart | where DetectionMethods has "Malware"; let av=baseQuery | project Timestamp,RecipientEmailAddress,NetworkMessageId, DT=parse_json(DetectionMethods) | evaluate bag_unpack(DT) | where Malware has 'Antimalware engine' | make-series Count= count() default = 0 on Timestamp from TimeStart to TimeEnd step 1d | extend Details = "Antimalware engine"; let fd=baseQuery | project Timestamp,RecipientEmailAddress,NetworkMessageId, DT=parse_json(DetectionMethods) | evaluate bag_unpack(DT) | where Malware has 'File detonation' and Malware !has 'File detonation reputation' | make-series Count= count() default = 0 on Timestamp from TimeStart to TimeEnd step 1d | extend Details = "File detonation"; let fdr=baseQuery | project Timestamp,RecipientEmailAddress,NetworkMessageId, DT=parse_json(DetectionMethods) | evaluate bag_unpack(DT) | where Malware has 'File detonation reputation' | make-series Count= count() default = 0 on Timestamp from TimeStart to TimeEnd step 1d | extend Details = "File detonation reputation"; let ud=baseQuery | project Timestamp,RecipientEmailAddress,NetworkMessageId, DT=parse_json(DetectionMethods) | evaluate bag_unpack(DT) | where Malware has 'URL detonation' and Malware !has 'URL detonation reputation' | make-series Count= count() default = 0 on Timestamp from TimeStart to TimeEnd step 1d | extend Details = "URL detonation"; let udr=baseQuery | project Timestamp,RecipientEmailAddress,NetworkMessageId, DT=parse_json(DetectionMethods) | evaluate bag_unpack(DT) | where Malware has 'URL detonation reputation' | make-series Count= count() default = 0 on Timestamp from TimeStart to TimeEnd step 1d | extend Details = "URL detonation reputation"; let umr=baseQuery | project Timestamp,RecipientEmailAddress,NetworkMessageId, DT=parse_json(DetectionMethods) | evaluate bag_unpack(DT) | where Malware has 'URL malicious reputation' | make-series Count= count() default = 0 on Timestamp from TimeStart to TimeEnd step 1d | extend Details = "URL malicious reputation"; union av,fd,fdr,ud,udr,umr | project Count, Details, Timestamp | render timechart