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