Detection rules › Kusto

Corelight - C2 DGA Detected Via Repetitive Failures

Status
available
Severity
medium
Time window
5m
Group by
id_orig_h, query
Source
github.com/Azure/Azure-Sentinel

'Detects large amounts of DNS resolution failures.'

MITRE ATT&CK coverage

TacticTechniques
Command & ControlT1568 Dynamic Resolution

Rule body kusto

id: 8eaa2268-74ee-492c-b869-450eff707fef
name: Corelight - C2 DGA Detected Via Repetitive Failures
description: |
  'Detects large amounts of DNS resolution failures.'
severity: Medium
status: Available
requiredDataConnectors:
  - connectorId: Corelight
    dataTypes:
      - Corelight_v2_dns
      - Corelight_v2_dns_red
      - corelight_dns
      - corelight_dns_red
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - CommandAndControl
relevantTechniques:
  - T1568
query: |
  let threshold = 25;
  union corelight_dns, corelight_dns_red
  // rcodes: SERVFAIL=2, NXDOMAIN=3
  | where rcode in (2, 3)
  | summarize count() by query, id_orig_h, bin(TimeGenerated, 5m)
  | where count_ > threshold
entityMappings:
  - entityType: IP
    fieldMappings:
      - identifier: Address
        columnName: id_orig_h
version: 2.1.1
kind: Scheduled

Stages and Predicates

Parameters

let threshold = 25;

union (2 sources)

Each leg below queries one source; the rule matches if any leg does. Sources: corelight_dns, corelight_dns_red

Leg 1: corelight_dns

Leg 2: corelight_dns_red

Applied to the combined result

| where rcode in (2, 3) | summarize count() by query, id_orig_h, bin(TimeGenerated, 5m) | where count_ > threshold

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
count_gt
  • 25 transforms: cased
rcodein
  • 2 transforms: cased
  • 3 transforms: cased

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

FieldSource
id_orig_hsummarize
querysummarize