Analytic rule catalog
SlackAudit - Public link created for file which can contain sensitive information
Back
| Id | 279316e8-8965-47d2-9788-b94dc352c853 |
| Rulename | SlackAudit - Public link created for file which can contain sensitive information. |
| Description | Detects public links created for files that may contain sensitive data such as passwords, authentication tokens, secret keys, or private configuration files. Tune exclusions using the SlackAuditSensitiveFile_Allowlist_File and SlackAuditSensitiveFile_Allowlist_Account watchlists when known benign files or accounts generate expected public-link activity. |
| Severity | Medium |
| Tactics | Exfiltration |
| Techniques | T1048 T1567.002 |
| Required data connectors | SlackAuditAPI |
| Kind | Scheduled |
| Query frequency | 1h |
| Query period | 1h |
| Trigger threshold | 0 |
| Trigger operator | gt |
| Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SlackAudit/Analytic%20Rules/SlackAuditSensitiveFile.yaml |
| Version | 1.0.1 |
| Arm template | 279316e8-8965-47d2-9788-b94dc352c853.json |
let AllowedFiles = toscalar(_GetWatchlist('SlackAuditSensitiveFile_Allowlist_File') | summarize make_set(tostring(SearchKey)));
let AllowedUsers = toscalar(_GetWatchlist('SlackAuditSensitiveFile_Allowlist_Account') | summarize make_set(tostring(SearchKey)));
SlackAudit
| where Action =~ 'file_public_link_created'
| extend FileNameLower = tolower(EntityFileName), UserLower = tolower(SrcUserName)
| where EntityFileName in~ ('id_rsa')
or FileNameLower has_any ('password', 'secret', 'token', 'credential', 'private key', 'api key')
or FileNameLower has_any ('.ssh', '.npmrc', '.muttrc', '.gitconfig', '.netrc', 'package.json', 'Gemfile', 'bower.json', 'config.gypi', 'travis.yml', 'config.json')
| where isempty(AllowedFiles) or EntityFileName !in~ (AllowedFiles)
| where isempty(AllowedUsers) or UserLower !in~ (AllowedUsers)
| extend AccountCustomEntity = SrcUserName
| extend IPCustomEntity = SrcIpAddr
relevantTechniques:
- T1048
- T1567.002
customDetails:
IpEntity: IPCustomEntity
Action: Action
ActorEntity: AccountCustomEntity
SourceUser: SrcUserName
SourceIP: SrcIpAddr
FileName: EntityFileName
tactics:
- Exfiltration
queryFrequency: 1h
queryPeriod: 1h
triggerThreshold: 0
alertDetailsOverride:
alertDescriptionFormat: Public link created for {{EntityFileName}} by {{SrcUserName}} from {{SrcIpAddr}}
alertDisplayNameFormat: Slack public link created for sensitive file {{EntityFileName}} by {{SrcUserName}}
name: SlackAudit - Public link created for file which can contain sensitive information.
kind: Scheduled
description: |
'Detects public links created for files that may contain sensitive data such as passwords, authentication tokens,
secret keys, or private configuration files. Tune exclusions using the SlackAuditSensitiveFile_Allowlist_File and SlackAuditSensitiveFile_Allowlist_Account
watchlists when known benign files or accounts generate expected public-link activity.'
id: 279316e8-8965-47d2-9788-b94dc352c853
entityMappings:
- fieldMappings:
- columnName: AccountCustomEntity
identifier: FullName
entityType: Account
- fieldMappings:
- columnName: IPCustomEntity
identifier: Address
entityType: IP
status: Available
version: 1.0.1
requiredDataConnectors:
- dataTypes:
- SlackAudit_CL
connectorId: SlackAuditAPI
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SlackAudit/Analytic%20Rules/SlackAuditSensitiveFile.yaml
query: |
let AllowedFiles = toscalar(_GetWatchlist('SlackAuditSensitiveFile_Allowlist_File') | summarize make_set(tostring(SearchKey)));
let AllowedUsers = toscalar(_GetWatchlist('SlackAuditSensitiveFile_Allowlist_Account') | summarize make_set(tostring(SearchKey)));
SlackAudit
| where Action =~ 'file_public_link_created'
| extend FileNameLower = tolower(EntityFileName), UserLower = tolower(SrcUserName)
| where EntityFileName in~ ('id_rsa')
or FileNameLower has_any ('password', 'secret', 'token', 'credential', 'private key', 'api key')
or FileNameLower has_any ('.ssh', '.npmrc', '.muttrc', '.gitconfig', '.netrc', 'package.json', 'Gemfile', 'bower.json', 'config.gypi', 'travis.yml', 'config.json')
| where isempty(AllowedFiles) or EntityFileName !in~ (AllowedFiles)
| where isempty(AllowedUsers) or UserLower !in~ (AllowedUsers)
| extend AccountCustomEntity = SrcUserName
| extend IPCustomEntity = SrcIpAddr
severity: Medium
triggerOperator: gt
{
"$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/279316e8-8965-47d2-9788-b94dc352c853')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/279316e8-8965-47d2-9788-b94dc352c853')]",
"properties": {
"alertDetailsOverride": {
"alertDescriptionFormat": "Public link created for {{EntityFileName}} by {{SrcUserName}} from {{SrcIpAddr}}",
"alertDisplayNameFormat": "Slack public link created for sensitive file {{EntityFileName}} by {{SrcUserName}}"
},
"alertRuleTemplateName": "279316e8-8965-47d2-9788-b94dc352c853",
"customDetails": {
"Action": "Action",
"ActorEntity": "AccountCustomEntity",
"FileName": "EntityFileName",
"IpEntity": "IPCustomEntity",
"SourceIP": "SrcIpAddr",
"SourceUser": "SrcUserName"
},
"description": "'Detects public links created for files that may contain sensitive data such as passwords, authentication tokens,\nsecret keys, or private configuration files. Tune exclusions using the SlackAuditSensitiveFile_Allowlist_File and SlackAuditSensitiveFile_Allowlist_Account\nwatchlists when known benign files or accounts generate expected public-link activity.'\n",
"displayName": "SlackAudit - Public link created for file which can contain sensitive information.",
"enabled": true,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"columnName": "AccountCustomEntity",
"identifier": "FullName"
}
]
},
{
"entityType": "IP",
"fieldMappings": [
{
"columnName": "IPCustomEntity",
"identifier": "Address"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SlackAudit/Analytic%20Rules/SlackAuditSensitiveFile.yaml",
"query": "let AllowedFiles = toscalar(_GetWatchlist('SlackAuditSensitiveFile_Allowlist_File') | summarize make_set(tostring(SearchKey)));\nlet AllowedUsers = toscalar(_GetWatchlist('SlackAuditSensitiveFile_Allowlist_Account') | summarize make_set(tostring(SearchKey)));\nSlackAudit\n| where Action =~ 'file_public_link_created'\n| extend FileNameLower = tolower(EntityFileName), UserLower = tolower(SrcUserName)\n| where EntityFileName in~ ('id_rsa')\n or FileNameLower has_any ('password', 'secret', 'token', 'credential', 'private key', 'api key')\n or FileNameLower has_any ('.ssh', '.npmrc', '.muttrc', '.gitconfig', '.netrc', 'package.json', 'Gemfile', 'bower.json', 'config.gypi', 'travis.yml', 'config.json')\n| where isempty(AllowedFiles) or EntityFileName !in~ (AllowedFiles)\n| where isempty(AllowedUsers) or UserLower !in~ (AllowedUsers)\n| extend AccountCustomEntity = SrcUserName\n| extend IPCustomEntity = SrcIpAddr\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT1H",
"severity": "Medium",
"status": "Available",
"subTechniques": [
"T1567.002"
],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"Exfiltration"
],
"techniques": [
"T1048",
"T1567"
],
"templateVersion": "1.0.1",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}