|
| 1 | +id: 2e7cda70-c3cd-4173-945e-6b5c14b05817 |
| 2 | +name: Teams Threat Intelligence Indicator Hit for Domain or URL |
| 3 | +description: | |
| 4 | + This rule detects and alerts on known threats in Teams messages when a contained domain or URL matches a Microsoft Defender Threat Intelligence indicator (of type 'Domain' or 'URL') |
| 5 | +description-detailed: | |
| 6 | + This rule detects when a domain or URL observed in Teams Messages matches a known threat intelligence indicator from Microsoft Defender Threat Intelligence. It specifically looks for hits against 'Domain' and 'URL' type indicators. |
| 7 | +requiredDataConnectors: |
| 8 | +- connectorId: MicrosoftThreatProtection |
| 9 | + dataTypes: |
| 10 | + - MessageUrlInfo |
| 11 | + - MessageEvents |
| 12 | + - ThreatIntelIndicators |
| 13 | +tactics: |
| 14 | + - InitialAccess |
| 15 | +relevantTechniques: |
| 16 | + - T1566 |
| 17 | +query: | |
| 18 | + //This Query uses MessageUrlInfo, MessageEvents and UrlClickEvents to find external Teams messages with low reputation URL doamins (.xyz) and identify the top 10 users clicking on them. |
| 19 | + // Extract IOC details from ThreatIntelIndicators export |
| 20 | + let IOC = ThreatIntelIndicators |
| 21 | + | where SourceSystem == "Microsoft Defender Threat Intelligence" |
| 22 | + | extend IOCType = case( |
| 23 | + ObservableKey has "ipv4" or ObservableKey has "network-traffic", "IP Address", |
| 24 | + ObservableKey has "domain", "Domain", |
| 25 | + ObservableKey has "url", "URL", |
| 26 | + ObservableKey has "file", "File Hash", |
| 27 | + ObservableKey has "email", "Email Address", |
| 28 | + "Other") |
| 29 | + | extend IOCValue = ObservableValue |
| 30 | + | extend Pattern = tostring(split(Pattern, "=")[1]) // Extract value from STIX pattern if needed |
| 31 | + | extend Description = tostring(parse_json(Data).description) |
| 32 | + | extend IndicatorTypes = tostring(parse_json(Data).indicator_types) |
| 33 | + | extend ValidFrom = todatetime(parse_json(Data).valid_from) |
| 34 | + | extend ValidUntil = todatetime(parse_json(Data).valid_until) |
| 35 | + | project TimeGenerated, IOCType, IOCValue, Pattern, Description, IndicatorTypes, ValidFrom, ValidUntil, Confidence |
| 36 | + | order by TimeGenerated desc; |
| 37 | + let IOCDomain = IOC |
| 38 | + | where IOCType == "Domain"; |
| 39 | + let IOCUrl = IOC |
| 40 | + | where IOCType == "URL"; |
| 41 | + let URLHits = MessageUrlInfo |
| 42 | + | join IOCUrl on $left.Url == $right.IOCValue; |
| 43 | + let DomainHits = MessageUrlInfo |
| 44 | + | join IOCDomain on $left.UrlDomain == $right.IOCValue; |
| 45 | + URLHits |
| 46 | + | union DomainHits |
| 47 | + | join kind=inner MessageEvents on TeamsMessageId |
0 commit comments