SlackAudit
| where DvcAction =~ 'file_downloaded'
| extend FileName = tostring(EntityFileName)
| extend fe = split(FileName, '.')
| extend FileExtension = iff(array_length(fe) > 1, tostring(fe[-1]), '')
| where FileName contains '.'
| where FileExtension matches regex @"^[A-Za-z]{1,4}$"
| project EntityFileName = FileName, SrcUserName
| extend AccountCustomEntity = SrcUserName
| extend FileCustomEntity = EntityFileName
entityMappings:
- entityType: Account
fieldMappings:
- identifier: FullName
columnName: AccountCustomEntity
- entityType: File
fieldMappings:
- identifier: Name
columnName: FileCustomEntity
tactics:
- InitialAccess
requiredDataConnectors:
- dataTypes:
- SlackAudit_CL
connectorId: SlackAuditAPI
alertDetailsOverride:
alertDisplayNameFormat: 'Suspicious Slack file downloaded by {{SrcUserName}}: {{EntityFileName}}'
alertDescriptionFormat: A Slack audit file_downloaded event matched the suspicious extension heuristic for {{EntityFileName}} by {{SrcUserName}}.
id: 132b98a5-07e9-401a-9b6f-453e52a53979
severity: Medium
status: Available
customDetails:
UserName: SrcUserName
FileName: EntityFileName
query: |
SlackAudit
| where DvcAction =~ 'file_downloaded'
| extend FileName = tostring(EntityFileName)
| extend fe = split(FileName, '.')
| extend FileExtension = iff(array_length(fe) > 1, tostring(fe[-1]), '')
| where FileName contains '.'
| where FileExtension matches regex @"^[A-Za-z]{1,4}$"
| project EntityFileName = FileName, SrcUserName
| extend AccountCustomEntity = SrcUserName
| extend FileCustomEntity = EntityFileName
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SlackAudit/Analytic Rules/SlackAuditSuspiciousFileDownloaded.yaml
kind: Scheduled
queryPeriod: 1h
version: 1.0.1
name: SlackAudit - Suspicious file downloaded.
queryFrequency: 1h
triggerThreshold: 0
relevantTechniques:
- T1189
description: |
'Detects potentialy suspicious downloads.'
triggerOperator: gt