Detection rules › Kusto
Digital Guardian - Exfiltration to external domain
'Detects exfiltration to external domain.'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Exfiltration |
Rule body
id: a19885c8-1e44-47e3-81df-d1d109f5c92d
name: Digital Guardian - Exfiltration to external domain
description: |
'Detects exfiltration to external domain.'
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: SyslogAma
datatypes:
- Syslog
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
- Exfiltration
relevantTechniques:
- T1048
query: |
let corp_domain = dynamic(['example.com']); //add all corporate domains to this list
DigitalGuardianDLPEvent
| where NetworkApplicationProtocol =~ 'SMTP'
| where isnotempty(inspected_document)
| extend s_domain = extract(@'@(.*)', 1, SrcUserName)
| extend d_domain = extract(@'@(.*)', 1, DstUserName)
| where s_domain in~ (corp_domain)
| where d_domain !in (corp_domain)
| extend AccountCustomEntity = SrcUserName
entityMappings:
- entityType: Account
fieldMappings:
- identifier: Name
columnName: AccountCustomEntity
version: 1.0.2
kind: Scheduled
Stages and Predicates
Parameters
let corp_domain = dynamic(['example.com']);
Stage 1: source
DigitalGuardianDLPEvent
Stage 2: where
| where NetworkApplicationProtocol =~ 'SMTP'
Stage 3: where
| where isnotempty(inspected_document)
Stage 4: extend
| extend s_domain = extract(@'@(.*)', 1, SrcUserName)
Stage 5: extend
| extend d_domain = extract(@'@(.*)', 1, DstUserName)
Stage 6: where
| where s_domain in~ (corp_domain)
Stage 7: where
| where d_domain !in (corp_domain)
Stage 8: extend
| extend AccountCustomEntity = SrcUserName
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
d_domain | eq | corp_domain | excludes:d_domain field:"d_domain" value:"corp_domain" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
NetworkApplicationProtocol | eq |
| field:"NetworkApplicationProtocol" kind:eq value:"SMTP" |
inspected_document | is_not_null | field:"inspected_document" kind:is_not_null | |
s_domain | in |
| field:"s_domain" kind:in value:"corp_domain" |
Output fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
s_domain | extend |
d_domain | extend |
AccountCustomEntity | extend |