Detection rules › Kusto

OracleDBAudit - Connection to database from external IP

Status
available
Severity
medium
Time window
30m
Source
github.com/Azure/Azure-Sentinel

'Detects when connection to database is from external IP source.'

MITRE ATT&CK coverage

Rule body kusto

id: 54aa2c17-acfd-4e3a-a1c4-99c88cf34ebe
name: OracleDBAudit - Connection to database from external IP
description: |
  'Detects when connection to database is from external IP source.'
severity: Medium
status: Available
requiredDataConnectors:
  - connectorId: SyslogAma
    datatypes:
      - Syslog
queryFrequency: 30m
queryPeriod: 30m
triggerOperator: gt
triggerThreshold: 0
tactics:
  - InitialAccess
  - Collection
  - Exfiltration
relevantTechniques:
  - T1190
  - T1133
  - T1078
  - T1119
  - T1029
query: |
  OracleDatabaseAuditEvent
  | where isnotempty(SrcIpAddr)
  | where isnotempty(Action)
  | where DbAction =~ 'connect'
  | where ipv4_is_private(SrcIpAddr) == 'false'
  | 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

Stage 1: source

OracleDatabaseAuditEvent

Stage 2: where

| where isnotempty(SrcIpAddr)

Stage 3: where

| where isnotempty(Action)

Stage 4: where

| where DbAction =~ 'connect'

Stage 5: where

| where ipv4_is_private(SrcIpAddr) == 'false'

Stage 6: extend

| extend AccountCustomEntity = DstUserName

Stage 7: extend

| extend IPCustomEntity = SrcIpAddr

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
SrcIpAddrcidr_match10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, 127.0.0.0/8

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.

FieldKindValues
Actionis_not_null
  • (no value, null check)
DbActioneq
  • connect
SrcIpAddris_not_null
  • (no value, null check)

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.

FieldSource
AccountCustomEntityextend
IPCustomEntityextend