Detection rules › Kusto
SlackAudit - User email linked to account changed.
'Detects when user email linked to account changes.'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | T1078 Valid Accounts |
Rule body kusto
id: 9d85feb3-7f54-4181-b143-68abb1a86823
name: SlackAudit - User email linked to account changed.
description: |
'Detects when user email linked to account changes.'
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: SlackAuditAPI
dataTypes:
- SlackAudit_CL
queryFrequency: 1h
queryPeriod: 14d
triggerOperator: gt
triggerThreshold: 0
tactics:
- InitialAccess
relevantTechniques:
- T1078
query: |
SlackAudit
| where TimeGenerated between (ago(14d) .. (1d))
| summarize max(TimeGenerated) by SrcUserName, SrcUserEmail
| join (SlackAudit
| where Action =~ 'user_login'
| project SrcIpAddr, SrcUserName, NewUserEmail = SrcUserEmail) on SrcUserName
| where NewUserEmail != SrcUserEmail
| extend AccountCustomEntity = SrcUserName
| extend IPCustomEntity = SrcIpAddr
entityMappings:
- entityType: Account
fieldMappings:
- identifier: FullName
columnName: AccountCustomEntity
- entityType: IP
fieldMappings:
- identifier: Address
columnName: IPCustomEntity
alertDetailsOverride:
alertDisplayNameFormat: Slack user email changed for {{SrcUserName}}
alertDescriptionFormat: Slack audit detected a user email change for {{SrcUserName}} from {{SrcUserEmail}} to {{NewUserEmail}}.
customDetails:
SourceUserName: SrcUserName
OriginalUserEmail: SrcUserEmail
NewUserEmail: NewUserEmail
SourceIpAddress: SrcIpAddr
version: 1.0.1
kind: Scheduled
Stages and Predicates
Stage 1: source
SlackAudit
Stage 2: where
| where TimeGenerated between (ago(14d) .. (1d))
Stage 3: summarize
| summarize max(TimeGenerated) by SrcUserName, SrcUserEmail
Stage 4: join
| join (SlackAudit
| where Action =~ 'user_login'
| project SrcIpAddr, SrcUserName, NewUserEmail = SrcUserEmail) on SrcUserName
Stage 5: where
| where NewUserEmail != SrcUserEmail
Stage 6: extend
| extend AccountCustomEntity = SrcUserName
Stage 7: extend
| extend IPCustomEntity = SrcIpAddr
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 |
|---|---|---|
Action | eq |
|
NewUserEmail | ne |
|
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 |
|---|---|
SrcUserEmail | summarize |
SrcUserName | summarize |
AccountCustomEntity | extend |
IPCustomEntity | extend |