Detection rules › Kusto
OracleDBAudit - Connection to database from unknown IP
'Detects when user connects to a database from IP address which is not present in AllowList.'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | T1078 Valid Accounts |
Rule body kusto
id: 80b1dd6d-1aea-471e-be7a-a4a0afdeec80
name: OracleDBAudit - Connection to database from unknown IP
description: |
'Detects when user connects to a database from IP address which is not present in AllowList.'
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: SyslogAma
datatypes:
- Syslog
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
- InitialAccess
relevantTechniques:
- T1078
query: |
let ip_allowlist = dynamic(['127.0.0.2']);
OracleDatabaseAuditEvent
| where isnotempty(SrcIpAddr)
| where DbAction =~ 'CONNECT'
| where SrcIpAddr !in (ip_allowlist)
| project SrcIpAddr, DstUserName
| extend AccountCustomEntity = DstUserName
| extend IPCustomEntity = SrcIpAddr
entityMappings:
- entityType: Account
fieldMappings:
- identifier: FullName
columnName: AccountCustomEntity
- entityType: IP
fieldMappings:
- identifier: Address
columnName: IPCustomEntity
version: 1.0.2
kind: Scheduled
Stages and Predicates
Parameters
let ip_allowlist = dynamic(['127.0.0.2']);
Stage 1: source
OracleDatabaseAuditEvent
Stage 2: where
| where isnotempty(SrcIpAddr)
Stage 3: where
| where DbAction =~ 'CONNECT'
Stage 4: where
| where SrcIpAddr !in (ip_allowlist)
Stage 5: project
| project SrcIpAddr, DstUserName
Stage 6: extend
| extend AccountCustomEntity = DstUserName
Stage 7: extend
| extend IPCustomEntity = SrcIpAddr
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
SrcIpAddr | eq | ip_allowlist |
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
Output fields
Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.
| Field | Source |
|---|---|
DstUserName | project |
SrcIpAddr | project |
AccountCustomEntity | extend |
IPCustomEntity | extend |