OracleDBAudit - Query on Sensitive Table
Id | d7fdcad5-ce96-4db6-9a5e-4a86a5166e5e |
Rulename | OracleDBAudit - Query on Sensitive Table |
Description | Detects when user queries sensitive tables. |
Severity | Medium |
Tactics | Collection |
Techniques | T1005 |
Required data connectors | OracleDatabaseAudit SyslogAma |
Kind | Scheduled |
Query frequency | 30m |
Query period | 30m |
Trigger threshold | 0 |
Trigger operator | gt |
Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/OracleDatabaseAudit/Analytic Rules/OracleDBAuditQueryOnSensitiveTable.yaml |
Version | 1.0.2 |
Arm template | d7fdcad5-ce96-4db6-9a5e-4a86a5166e5e.json |
let sensitive_tbls = dynamic(['table_name1', 'table_name2']);
OracleDatabaseAuditEvent
| where isnotempty(DstUserName)
| where isnotempty(Action)
| extend TableName = replace(@'[,\(\)]', '', extract(@'(?i)SELECT(.*?)FROM\s(.*?)\s', 2, Action))
| where isnotempty(TableName)
| where TableName in (sensitive_tbls)
| project TableName, DstUserName, DbAction
| extend AccountCustomEntity = DstUserName
relevantTechniques:
- T1005
name: OracleDBAudit - Query on Sensitive Table
requiredDataConnectors:
- dataTypes:
- Syslog
connectorId: OracleDatabaseAudit
- datatypes:
- Syslog
connectorId: SyslogAma
entityMappings:
- fieldMappings:
- identifier: FullName
columnName: AccountCustomEntity
entityType: Account
triggerThreshold: 0
id: d7fdcad5-ce96-4db6-9a5e-4a86a5166e5e
tactics:
- Collection
version: 1.0.2
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/OracleDatabaseAudit/Analytic Rules/OracleDBAuditQueryOnSensitiveTable.yaml
queryPeriod: 30m
kind: Scheduled
queryFrequency: 30m
severity: Medium
status: Available
description: |
'Detects when user queries sensitive tables.'
query: |
let sensitive_tbls = dynamic(['table_name1', 'table_name2']);
OracleDatabaseAuditEvent
| where isnotempty(DstUserName)
| where isnotempty(Action)
| extend TableName = replace(@'[,\(\)]', '', extract(@'(?i)SELECT(.*?)FROM\s(.*?)\s', 2, Action))
| where isnotempty(TableName)
| where TableName in (sensitive_tbls)
| project TableName, DstUserName, DbAction
| extend AccountCustomEntity = DstUserName
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/d7fdcad5-ce96-4db6-9a5e-4a86a5166e5e')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/d7fdcad5-ce96-4db6-9a5e-4a86a5166e5e')]",
"properties": {
"alertRuleTemplateName": "d7fdcad5-ce96-4db6-9a5e-4a86a5166e5e",
"customDetails": null,
"description": "'Detects when user queries sensitive tables.'\n",
"displayName": "OracleDBAudit - Query on Sensitive Table",
"enabled": true,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"columnName": "AccountCustomEntity",
"identifier": "FullName"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/OracleDatabaseAudit/Analytic Rules/OracleDBAuditQueryOnSensitiveTable.yaml",
"query": "let sensitive_tbls = dynamic(['table_name1', 'table_name2']);\nOracleDatabaseAuditEvent\n| where isnotempty(DstUserName)\n| where isnotempty(Action)\n| extend TableName = replace(@'[,\\(\\)]', '', extract(@'(?i)SELECT(.*?)FROM\\s(.*?)\\s', 2, Action))\n| where isnotempty(TableName)\n| where TableName in (sensitive_tbls)\n| project TableName, DstUserName, DbAction\n| extend AccountCustomEntity = DstUserName\n",
"queryFrequency": "PT30M",
"queryPeriod": "PT30M",
"severity": "Medium",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"Collection"
],
"techniques": [
"T1005"
],
"templateVersion": "1.0.2",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}