Query Details
# Identify IP assets from MDEASM in Exposure Management that match TI
## Description
The following query will help identify which IPs from Microsoft Defender External Attack Surface Management in the Advanced Hunting tables from Exposure Management match Threat Intelligence indicators and the ThreatIntelIndicators table.
### References
- https://www.michalos.net/2025/07/31/breaking-down-the-microsoft-defender-external-attack-surface-management-opportunities-for-queries-in-advanced-hunting-log-analytics-workspace/
### Microsoft Defender XDR
```
let TIIPs =
ThreatIntelligenceIndicator
| extend TIIPAddress = tostring(NetworkIP)
| where isnotempty(TIIPAddress)
| project TIIPAddress, ThreatType, Description, ConfidenceScore;
let EASMIPs =
ExposureGraphNodes
| where NodeLabel == "IP address"
| project EASPIPAdress = tostring(NodeName);
TIIPs
| join kind=inner (
EASMIPs
) on $left.TIIPAddress == $right.EASPIPAdress
```
### Versioning
| Version | Date | Comments |
| ------------- |---------------| ---------------------------------------|
| 1.0 | 31/07/2025 | Initial publish |
This query is designed to identify IP addresses from Microsoft Defender External Attack Surface Management (MDEASM) that match threat intelligence indicators. Here's a simple breakdown of what the query does:
Collect Threat Intelligence IPs:
ThreatIntelligenceIndicator table, along with associated threat types, descriptions, and confidence scores.TIIPs.Collect Exposure Management IPs:
ExposureGraphNodes table.EASMIPs.Find Matching IPs:
TIIPs and EASMIPs datasets.In summary, this query helps security analysts identify IP addresses that are both part of their organization's external attack surface and flagged in threat intelligence, allowing for better prioritization of potential threats.

Michalis Michalos
Released: August 5, 2025
Tables
Keywords
Operators