Detection rules › Kusto
OracleDBAudit - Multiple tables dropped in short time
'Detects when user drops many tables in short period of time.'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Impact |
Rule body
id: b3aa0e5a-75a2-4613-80ec-93a1be3aeb8f
name: OracleDBAudit - Multiple tables dropped in short time
description: |
'Detects when user drops many tables in short period of time.'
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: SyslogAma
datatypes:
- Syslog
queryFrequency: 30m
queryPeriod: 30m
triggerOperator: gt
triggerThreshold: 0
tactics:
- Impact
relevantTechniques:
- T1485
query: |
let tbl_threshold = 10;
OracleDatabaseAuditEvent
| where isnotempty(DstUserName)
| where DbAction =~ 'DROP'
| extend TableName = replace(@'[,\(\)]', '', extract(@'(?i)SELECT(.*?)FROM\s(.*?)\s', 2, Action))
| where isnotempty(TableName)
| where TableName !~ 'SELECT'
| summarize tbl_count = dcount(TableName) by DstUserName
| where tbl_count > tbl_threshold
| extend AccountCustomEntity = DstUserName
entityMappings:
- entityType: Account
fieldMappings:
- identifier: FullName
columnName: AccountCustomEntity
version: 1.0.2
kind: Scheduled
Stages and Predicates
Parameters
let tbl_threshold = 10;
Stage 1: source
OracleDatabaseAuditEvent
Stage 2: where
| where isnotempty(DstUserName)
Stage 3: where
| where DbAction =~ 'DROP'
Stage 4: extend
| extend TableName = replace(@'[,\(\)]', '', extract(@'(?i)SELECT(.*?)FROM\s(.*?)\s', 2, Action))
Stage 5: where
| where isnotempty(TableName)
Stage 6: where
| where TableName !~ 'SELECT'
Stage 7: summarize
| summarize tbl_count = dcount(TableName) by DstUserName
Stage 8: where
| where tbl_count > tbl_threshold
Stage 9: extend
| extend AccountCustomEntity = DstUserName
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
DbAction | eq |
| field:"DbAction" kind:eq value:"DROP" |
DstUserName | is_not_null | field:"DstUserName" kind:is_not_null | |
TableName | is_not_null | field:"TableName" kind:is_not_null | |
TableName | ne |
| field:"TableName" kind:ne value:"SELECT" |
tbl_count | gt |
| field:"tbl_count" kind:gt value:"10" |
Output fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
DstUserName | summarize |
tbl_count | summarize |
AccountCustomEntity | extend |