Detection rules › Kusto
SlackAudit - Unknown User Agent
'Detects Slack workspace activity from unknown user agents by comparing recent UserAgentOriginal values against a 14d baseline of known user agents.'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Command & Control | T1071.001 Application Layer Protocol: Web Protocols |
Rule body kusto
id: 3b11f06e-4afd-4ae6-8477-c61136619ac8
name: SlackAudit - Unknown User Agent
description: |
'Detects Slack workspace activity from unknown user agents by comparing recent UserAgentOriginal values against
a 14d baseline of known user agents.'
severity: Low
status: Available
requiredDataConnectors:
- connectorId: SlackAuditAPI
dataTypes:
- SlackAudit_CL
queryFrequency: 24h
queryPeriod: 14d
triggerOperator: gt
triggerThreshold: 0
tactics:
- CommandAndControl
relevantTechniques:
- T1071
- T1071.001
query: |
let lbperiod = 14d;
let known_UAs = SlackAudit
| where TimeGenerated > ago(lbperiod)
| where isnotempty(UserAgentOriginal)
| summarize makeset(UserAgentOriginal);
SlackAudit
| where UserAgentOriginal !in (known_UAs)
| extend AccountCustomEntity = SrcUserName
entityMappings:
- entityType: Account
fieldMappings:
- identifier: FullName
columnName: AccountCustomEntity
alertDetailsOverride:
alertDisplayNameFormat: Slack audit unknown user agent for {{AccountCustomEntity}}
alertDescriptionFormat: Slack activity from {{AccountCustomEntity}} used unknown user agent {{UserAgentOriginal}}
customDetails:
Account: AccountCustomEntity
UserAgent: UserAgentOriginal
version: 1.0.2
kind: Scheduled
Stages and Predicates
Parameters
let lbperiod = 14d;
Let binding: known_UAs
let known_UAs = SlackAudit
| where TimeGenerated > ago(lbperiod)
| where isnotempty(UserAgentOriginal)
| summarize makeset(UserAgentOriginal);
Derived from lbperiod.
Stage 1: source
SlackAudit
Stage 2: where
| where UserAgentOriginal !in (known_UAs)
References known_UAs (defined above).
Stage 3: extend
| extend AccountCustomEntity = SrcUserName
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
UserAgentOriginal | eq | known_UAs |
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 |
|---|---|
AccountCustomEntity | extend |