SlackAudit
| where DvcAction =~ 'file_downloaded'
| extend fe = split(EntityFileName, '.')
| where array_length(fe) > 2
| where fe[1] matches regex @"\D+"
| where strlen(fe[1]) < 5
| project EntityFileName, SrcUserName
| extend AccountCustomEntity = SrcUserName
| extend FileCustomEntity = EntityFileName
status: Available
queryFrequency: 1h
description: |
'Detects potentialy suspicious downloads.'
severity: Medium
version: 1.0.0
relevantTechniques:
- T1189
name: SlackAudit - Suspicious file downloaded.
triggerThreshold: 0
kind: Scheduled
query: |
SlackAudit
| where DvcAction =~ 'file_downloaded'
| extend fe = split(EntityFileName, '.')
| where array_length(fe) > 2
| where fe[1] matches regex @"\D+"
| where strlen(fe[1]) < 5
| project EntityFileName, SrcUserName
| extend AccountCustomEntity = SrcUserName
| extend FileCustomEntity = EntityFileName
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SlackAudit/Analytic Rules/SlackAuditSuspiciousFileDownloaded.yaml
requiredDataConnectors:
- connectorId: SlackAuditAPI
dataTypes:
- SlackAudit_CL
tactics:
- InitialAccess
id: 132b98a5-07e9-401a-9b6f-453e52a53979
queryPeriod: 1h
entityMappings:
- fieldMappings:
- columnName: AccountCustomEntity
identifier: FullName
entityType: Account
- fieldMappings:
- columnName: FileCustomEntity
identifier: Name
entityType: File
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspace": {
"type": "String"
}
},
"resources": [
{
"apiVersion": "2024-01-01-preview",
"id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/132b98a5-07e9-401a-9b6f-453e52a53979')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/132b98a5-07e9-401a-9b6f-453e52a53979')]",
"properties": {
"alertRuleTemplateName": "132b98a5-07e9-401a-9b6f-453e52a53979",
"customDetails": null,
"description": "'Detects potentialy suspicious downloads.'\n",
"displayName": "SlackAudit - Suspicious file downloaded.",
"enabled": true,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"columnName": "AccountCustomEntity",
"identifier": "FullName"
}
]
},
{
"entityType": "File",
"fieldMappings": [
{
"columnName": "FileCustomEntity",
"identifier": "Name"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SlackAudit/Analytic Rules/SlackAuditSuspiciousFileDownloaded.yaml",
"query": "SlackAudit\n| where DvcAction =~ 'file_downloaded'\n| extend fe = split(EntityFileName, '.')\n| where array_length(fe) > 2\n| where fe[1] matches regex @\"\\D+\"\n| where strlen(fe[1]) < 5\n| project EntityFileName, SrcUserName\n| extend AccountCustomEntity = SrcUserName\n| extend FileCustomEntity = EntityFileName\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT1H",
"severity": "Medium",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"InitialAccess"
],
"techniques": [
"T1189"
],
"templateVersion": "1.0.0",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}