Detection rules › Kusto

Google Threat Intelligence - Threat Hunting Domain

Severity
medium
Time window
1d
Group by
Id, lowerDomain
Source
github.com/Azure/Azure-Sentinel

Google Threat Intelligence domain correlation.

MITRE ATT&CK coverage

TacticTechniques
Command & Control

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 22: DNSEvent (DNS query)

Rule body

id: "d9e1646c-dc17-4150-ac85-581f5c9cb41f"
name: Google Threat Intelligence - Threat Hunting Domain
description: |
  'Google Threat Intelligence domain correlation.'
severity: Medium
requiredDataConnectors:
  - connectorId: ThreatIntelligence
    dataTypes:
      - ThreatIntelIndicators
queryFrequency: 30m
queryPeriod: 1d
triggerOperator: gt
triggerThreshold: 0
tactics:
  - CommandAndControl
relevantTechniques:
  - T1071
incidentConfiguration:
  createIncident: true
  groupingConfiguration:
    enabled: true
    reopenClosedIncident: false
    lookbackDuration: 1h
    matchingMethod: AllEntities
eventGroupingSettings:
  aggregationKind: AlertPerResult
alertDetailsOverride:
  alertDisplayNameFormat: 'Google Threat Intelligence Match'
  alertDescriptionFormat: 'Correlation found from the {{Type}} table.'
query: |
  let ioc_lookBack = 1d;
  _Im_Dns
  | where isnotempty(DnsQuery)
  | extend lowerDomain=tolower(DnsQuery)
  | join kind=inner (
  ThreatIntelIndicators
  | where ObservableKey == 'domain-name:value'
  | where isnotempty(ObservableValue)
  | where SourceSystem == "Google Threat Intelligence"
  | where TimeGenerated >= ago(ioc_lookBack)
  | summarize LatestIndicatorTime = arg_max(TimeGenerated, *) by Id
  | where IsActive == true and (isnull(ValidUntil) or ValidUntil > now())
  | extend lowerDomain=tolower(ObservableValue)
  ) on lowerDomain
  | project Domain=ObservableValue, Description=Data.description, Type, TimeGenerated
entityMappings:
  - entityType: DNS
    fieldMappings:
      - identifier: DomainName
        columnName: Domain
version: 1.0.0
kind: Scheduled

Stages and Predicates

Parameters

let ioc_lookBack = 1d;

Stage 1: source

_Im_Dns

Stage 2: where

| where isnotempty(DnsQuery)

Stage 3: extend

| extend lowerDomain=tolower(DnsQuery)

Stage 4: join

| join kind=inner (
ThreatIntelIndicators
| where ObservableKey == 'domain-name:value'
| where isnotempty(ObservableValue)
| where SourceSystem == "Google Threat Intelligence"
| where TimeGenerated >= ago(ioc_lookBack)
| summarize LatestIndicatorTime = arg_max(TimeGenerated, *) by Id
| where IsActive == true and (isnull(ValidUntil) or ValidUntil > now())
| extend lowerDomain=tolower(ObservableValue)
) on lowerDomain

Stage 5: project

| project Domain=ObservableValue, Description=Data.description, Type, TimeGenerated

Stage 6: summarize aggregation inside the join branch

summarize by Id

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
DnsQueryis_not_null
  • (no value, null check)
field:"QueryName" kind:is_not_null
IsActiveeq
  • true corpus 21 (kusto 21)
field:"IsActive" kind:eq value:"true"
ObservableKeyeq
  • domain-name:value corpus 4 (kusto 4)
field:"ObservableKey" kind:eq value:"domain-name:value"
ObservableValueis_not_null
  • (no value, null check)
field:"ObservableValue" kind:is_not_null
SourceSystemeq
  • Google Threat Intelligence corpus 4 (kusto 4)
field:"SourceSystem" kind:eq value:"Google Threat Intelligence"
ValidUntilis_null
  • (no value, null check)
field:"ValidUntil" kind:is_null

Output fields

These fields are emitted when the rule matches.

FieldSource
Idsummarize