Detection rules › Kusto

RecordedFuture Threat Hunting Domain All Actors

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

Recorded Future Threat Hunting domain correlation for all actors.

MITRE ATT&CK coverage

TacticTechniques
Initial Access
Command & Control

Telemetry coverage

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

Rule body

id: acbf7ef6-f964-44c3-9031-7834ec68175f
name: RecordedFuture Threat Hunting Domain All Actors
description: |
  'Recorded Future Threat Hunting domain correlation for all actors.'
severity: Medium
requiredDataConnectors:
  - connectorId: ThreatIntelligenceUploadIndicatorsAPI
    dataTypes:
      - ThreatIntelIndicators
queryFrequency: 15m
queryPeriod: 1d
triggerOperator: gt
triggerThreshold: 0
tactics:
  - InitialAccess
  - CommandAndControl
relevantTechniques:
  - T1566
  - T1568
customDetails:
  ActorInformation: RecordedFuturePortalLink
incidentConfiguration:
  createIncident: true
  groupingConfiguration:
    enabled: true
    reopenClosedIncident: false
    lookbackDuration: 1h
    matchingMethod: AllEntities
eventGroupingSettings:
  aggregationKind: AlertPerResult
alertDetailsOverride:
  alertDisplayNameFormat: '{{Description}}'
  alertDescriptionFormat: '**{{Description}}**\n\nCorrelation found on {{Domain}} from the {{Type}} table.\n'
  alertDynamicProperties:
    - alertProperty: AlertLink
      value: RecordedFuturePortalLink
query: |
  let ioc_lookBack = 1d;
  // The source table (_Im_Dns) is an ASIM parser table, but can be replaced by any infrastructure table containing domain/dns data.
  // The following workbook: Recorded Future - Domain Correlation will help researching available data and selecting tables and columns
  _Im_Dns
  | where isnotempty(Domain)
  | extend lowerDomain=tolower(Domain)
  | join kind=inner (
  ThreatIntelIndicators
  // Only look at Domain IOCs
  | where ObservableKey == 'domain-name:value'
  | where isnotempty(ObservableValue)
  // Only look at Recorded Future Threat Hunt Indicators.
  | where Data.description startswith "Recorded Future - Threat Hunt"
  // Only work with the latest indicators
  | where TimeGenerated >= ago(ioc_lookBack)
  | summarize LatestIndicatorTime = arg_max(TimeGenerated, *) by Id
  | where IsActive == true and ValidUntil > now()
  | extend lowerDomain=tolower(ObservableValue)
  ) on lowerDomain
  // select column from the source table to match with Recorded Future $left.Domain
  | mv-expand Label=Data.labels
  | extend RecordedFuturePortalLink = parse_json(tostring(Label)).RecordedFuturePortalLink
  | project Domain=ObservableValue, Description=Data.description, Type, TimeGenerated, RecordedFuturePortalLink
entityMappings:
  - entityType: DNS
    fieldMappings:
      - identifier: DomainName
        columnName: Domain
version: 1.1.1
kind: Scheduled

Stages and Predicates

Parameters

let ioc_lookBack = 1d;

Stage 1: source

_Im_Dns

Stage 2: where

| where isnotempty(Domain)

Stage 3: extend

| extend lowerDomain=tolower(Domain)

Stage 4: join

| join kind=inner (
ThreatIntelIndicators
| where ObservableKey == 'domain-name:value'
| where isnotempty(ObservableValue)
| where Data.description startswith "Recorded Future - Threat Hunt"
| where TimeGenerated >= ago(ioc_lookBack)
| summarize LatestIndicatorTime = arg_max(TimeGenerated, *) by Id
| where IsActive == true and ValidUntil > now()
| extend lowerDomain=tolower(ObservableValue)
) on lowerDomain

Stage 5: mv-expand

| mv-expand Label=Data.labels

Stage 6: extend

| extend RecordedFuturePortalLink = parse_json(tostring(Label)).RecordedFuturePortalLink

Stage 7: project

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

Stage 8: summarize aggregation inside the join branch

summarize by Id

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Domainis_not_null
  • (no value, null check)
field:"Domain" 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
descriptionstarts_with
  • Recorded Future - Threat Hunt corpus 4 (kusto 4)
field:"description" kind:starts_with value:"Recorded Future - Threat Hunt"

Output fields

These fields are emitted when the rule matches.

FieldSource
Idsummarize