Query Details
# Identify 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 ThreatIntelligenceIndicator 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:
Threat Intelligence IPs (TIIPs):
ThreatIntelligenceIndicator table.TIIPAddress), the type of threat, a description, and a confidence score.Exposure Management IPs (EASMIPs):
ExposureGraphNodes table where the node is labeled as an "IP address."EASPIPAdress.Matching IPs:
TIIPs and EASMIPs).In summary, this query helps identify which IPs from your organization's external attack surface, as managed by Microsoft Defender, are also flagged in threat intelligence databases. This can be useful for prioritizing security efforts on assets that are both exposed and potentially compromised.

Michalis Michalos
Released: July 31, 2025
Tables
Keywords
Operators