Detection rules › Kusto

Cisco SEG - Suspicious sender domain

Status
available
Severity
medium
Time window
1h
Source
github.com/Azure/Azure-Sentinel

'Detects suspicious sender domain age.'

MITRE ATT&CK coverage

TacticTechniques
Initial AccessT1566 Phishing

Rule body kusto

id: ef0a253c-95b5-48e1-8ebc-dbeb073b9338
name: Cisco SEG - Suspicious sender domain
description: |
  'Detects suspicious sender domain age.'
severity: Medium
status: Available
requiredDataConnectors:
  - connectorId: CefAma
    dataTypes:
      - CommonSecurityLog
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  CiscoSEGEvent
  | where NetworkDirection =~ 'Incoming'
  | extend rec_domain = extract(@'@(.*)', 1, DstUserName)
  | extend s_domain = extract(@'@(.*)', 1, SrcUserName)
  | where s_domain != rec_domain
  | where tostring(AdditionalFields) has 'ESASDRDomainAge'
  | extend domain_age = extract(@'ESASDRDomainAge":"(.*days)"', 1, tostring(AdditionalFields))
  | extend yy = toint(extract(@'(\d+)\syears', 1, domain_age))
  | extend mm = toint(extract(@'(\d+)\smonths', 1, domain_age))
  | extend dd = toint(extract(@'(\d+)\sdays', 1, domain_age))
  | where isempty(yy)
  | where isempty(mm) or mm <= 2
  | extend AccountCustomEntity = SrcUserName
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: Name
        columnName: AccountCustomEntity
version: 1.0.3
kind: Scheduled

Stages and Predicates

Stage 1: source

CiscoSEGEvent

Stage 2: where

| where NetworkDirection =~ 'Incoming'

Stage 3: extend

| extend rec_domain = extract(@'@(.*)', 1, DstUserName)

Stage 4: extend

| extend s_domain = extract(@'@(.*)', 1, SrcUserName)

Stage 5: where

| where s_domain != rec_domain

Stage 6: where

| where tostring(AdditionalFields) has 'ESASDRDomainAge'

Stage 7: extend (4 consecutive steps)

| extend domain_age = extract(@'ESASDRDomainAge":"(.*days)"', 1, tostring(AdditionalFields))
| extend yy = toint(extract(@'(\d+)\syears', 1, domain_age))
| extend mm = toint(extract(@'(\d+)\smonths', 1, domain_age))
| extend dd = toint(extract(@'(\d+)\sdays', 1, domain_age))

Stage 8: where

| where isempty(yy)

Stage 9: where

| where isempty(mm) or mm <= 2

Stage 10: extend

| extend AccountCustomEntity = SrcUserName

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
AdditionalFieldsmatch
  • ESASDRDomainAge transforms: tostring, term
NetworkDirectioneq
  • Incoming
mmis_null
  • (no value, null check)
mmle
  • 2 transforms: cased
s_domainne
  • rec_domain transforms: cased
yyis_null
  • (no value, null check)

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
rec_domainextend
s_domainextend
domain_ageextend
yyextend
mmextend
ddextend
AccountCustomEntityextend