Detection rules › Kusto

Digital Guardian - Exfiltration to private email

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

'Detects exfiltration to private email.'

MITRE ATT&CK coverage

Rule body

id: edead9b5-243a-466b-ae78-2dae32ab1117
name: Digital Guardian - Exfiltration to private email
description: |
  'Detects exfiltration to private email.'
severity: High
status: Available
requiredDataConnectors:
  - connectorId: SyslogAma
    datatypes:
      - Syslog
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - Exfiltration
relevantTechniques:
  - T1048
query: |
  DigitalGuardianDLPEvent
  | where NetworkApplicationProtocol =~ 'SMTP'
  | where isnotempty(inspected_document)
  | extend s_user = substring(SrcUserName, 0, indexof(SrcUserName, '@'))
  | extend d_user = substring(DstUserName, 0, indexof(DstUserName, '@'))
  | extend s_domain = extract(@'@(.*)', 1, SrcUserName)
  | extend d_domain = extract(@'@(.*)', 1, DstUserName)
  | where s_domain != d_domain
  | where s_user == d_user
  | extend AccountCustomEntity = SrcUserName
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: Name
        columnName: AccountCustomEntity
version: 1.0.2
kind: Scheduled

Stages and Predicates

Stage 1: source

DigitalGuardianDLPEvent

Stage 2: where

| where NetworkApplicationProtocol =~ 'SMTP'

Stage 3: where

| where isnotempty(inspected_document)

Stage 4: extend (4 consecutive steps)

| extend s_user = substring(SrcUserName, 0, indexof(SrcUserName, '@'))
| extend d_user = substring(DstUserName, 0, indexof(DstUserName, '@'))
| extend s_domain = extract(@'@(.*)', 1, SrcUserName)
| extend d_domain = extract(@'@(.*)', 1, DstUserName)

Stage 5: where

| where s_domain != d_domain

Stage 6: where

| where s_user == d_user

Stage 7: extend

| extend AccountCustomEntity = SrcUserName

Indicators

These rows show field, operator, and value matches.

Output fields

These fields are emitted when the rule matches.

FieldSource
s_userextend
d_userextend
s_domainextend
d_domainextend
AccountCustomEntityextend