Security for AI - MITRE ATLAS Coverage Visualization by Tactic
MDXDR Security For AI MITRE ATLAS 07 Coverage Visualization By Tactic
Query
let MitreAtlas =
externaldata(objects: dynamic)
[
@"https://raw.githubusercontent.com/mitre-atlas/atlas-navigator-data/main/dist/stix-atlas.json"
]
with (format="multijson")
| mv-expand objects
| where objects.type == "attack-pattern"
| mv-expand Reference = objects.external_references
| where Reference.source_name == "mitre-atlas"
| project
TechniqueId = tostring(Reference.external_id),
TechniqueName = tostring(objects.name),
Description = tostring(objects.description),
Tactics = objects.kill_chain_phases,
IsSubTechnique = tobool(objects.x_mitre_is_subtechnique),
Url = tostring(Reference.url),
Created = todatetime(objects.created),
Modified = todatetime(objects.modified)
| mv-expand Tactics
| extend Tactic = tostring(Tactics.phase_name)
| project-away Tactics;
let AIAlertCoverage = materialize(
AlertInfo
| where DetectionSource in (
"Security for AI",
"Microsoft Defender for AI Services"
)
| summarize arg_max(Timestamp, *) by AlertId
| extend TechniqueIds = extract_all(
@"(AML\.T\d{4}(?:\.\d{3})?)",
tostring(AttackTechniques))
| mv-expand TechniqueId = TechniqueIds to typeof(string)
| where isnotempty(TechniqueId)
| summarize
AlertCount = dcount(AlertId),
AlertIds = make_set(AlertId),
DetectionTitles = make_set(Title)
by TechniqueId
);
MitreAtlas
| join kind=leftouter AIAlertCoverage on TechniqueId
| extend AlertCount = coalesce(AlertCount, 0)
| summarize TotalTechniques = dcount(TechniqueId),
Observed = dcountif(TechniqueId, AlertCount > 0) by Tactic
| extend NotObserved = TotalTechniques - Observed
| project Tactic, Observed, NotObserved
| order by Tactic asc
| render | render columnchart with (kind=stacked)About this query
Explanation
This KQL query is designed to visualize the coverage of MITRE ATLAS techniques by tactic in a security context, specifically focusing on AI-related alerts. Here's a simplified breakdown of what the query does:
-
Data Retrieval:
- It pulls data from an external JSON source that contains information about MITRE ATLAS techniques.
- It processes this data to extract relevant details such as technique IDs, names, descriptions, and associated tactics.
-
Alert Analysis:
- It examines alerts from the
AlertInfotable, specifically those related to "Security for AI" and "Microsoft Defender for AI Services". - It identifies the techniques associated with these alerts and counts the number of unique alerts for each technique.
- It examines alerts from the
-
Data Joining and Summarization:
- The query joins the MITRE ATLAS data with the alert data to determine which techniques have been observed (i.e., have associated alerts) and which have not.
- It calculates the total number of techniques, the number of observed techniques, and the number of not-observed techniques for each tactic.
-
Visualization:
- The results are displayed as a stacked bar chart, showing the count of observed and not-observed techniques for each tactic.
-
Purpose:
- This visualization helps identify potential gaps in detection capabilities by showing which techniques have not been observed in alerts, indicating areas that might need further investigation or improvement in detection strategies.
Overall, the query provides a high-level overview of AI-related security coverage against MITRE ATLAS techniques, helping security teams understand their detection landscape and identify areas for enhancement.