Detection rules › Kusto
Valimail Enforce - Email Authentication Key Deleted
This query searches for deletion of SPF delegations or DKIM keys, which are medium-severity events that could degrade email authentication posture for a domain.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth | T1562 Impair Defenses |
Rule body kusto
id: 483078c6-d029-40f3-931a-30af0032008b
name: Valimail Enforce - Email Authentication Key Deleted
description: |
This query searches for deletion of SPF delegations or DKIM keys, which are medium-severity events
that could degrade email authentication posture for a domain.
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: ValimailEnforce
dataTypes:
- ValimailEnforceEvents_CL
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
- DefenseEvasion
relevantTechniques:
- T1562
query: |
ValimailEnforceEvents_CL
| where EventSeverity == "Medium"
| where EventCategory in ("SPFConfiguration", "DKIMConfiguration")
| where IsHighValueEvent == true
| summarize
EventCount = count(),
FirstSeen = min(PerformedAt),
LastSeen = max(PerformedAt),
AffectedDomains = make_set(Subject),
Actions = make_set(EventType)
by User, EventCategory
| extend
AccountName = tostring(split(User, "@")[0]),
AccountDomain = tostring(split(User, "@")[1]),
DomainName = tostring(AffectedDomains[0])
entityMappings:
- entityType: Account
fieldMappings:
- identifier: Name
columnName: AccountName
- identifier: UPNSuffix
columnName: AccountDomain
- entityType: DNS
fieldMappings:
- identifier: DomainName
columnName: DomainName
alertDetailsOverride:
alertDisplayNameFormat: "{{EventCategory}} key deleted on {{EventCount}} domain(s) by {{User}}"
alertDescriptionFormat: |
User '{{User}}' deleted one or more {{EventCategory}} records affecting
domains: {{AffectedDomains}}. This may weaken email authentication posture.
incidentConfiguration:
createIncident: true
groupingConfiguration:
enabled: true
reopenClosedIncident: false
lookbackDuration: 1d
matchingMethod: Selected
groupByEntities:
- Account
version: 1.0.0
kind: Scheduled
Stages and Predicates
Stage 1: source
ValimailEnforceEvents_CL
Stage 2: where
| where EventSeverity == "Medium"
Stage 3: where
| where EventCategory in ("SPFConfiguration", "DKIMConfiguration")
Stage 4: where
| where IsHighValueEvent == true
Stage 5: summarize
| summarize
EventCount = count(),
FirstSeen = min(PerformedAt),
LastSeen = max(PerformedAt),
AffectedDomains = make_set(Subject),
Actions = make_set(EventType)
by User, EventCategory
Stage 6: extend
| extend
AccountName = tostring(split(User, "@")[0]),
AccountDomain = tostring(split(User, "@")[1]),
DomainName = tostring(AffectedDomains[0])
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.
| Field | Kind | Values |
|---|---|---|
EventCategory | in |
|
EventSeverity | eq |
|
IsHighValueEvent | eq |
|
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.
| Field | Source |
|---|---|
Actions | summarize |
AffectedDomains | summarize |
EventCategory | summarize |
EventCount | summarize |
FirstSeen | summarize |
LastSeen | summarize |
User | summarize |
AccountDomain | extend |
AccountName | extend |
DomainName | extend |