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

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

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
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/8excludes:SrcIpAddr

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Actionis_not_null
  • (no value, null check)
field:"Action" kind:is_not_null
DbActioneq
  • connect
field:"DbAction" kind:eq value:"connect"
SrcIpAddris_not_null
  • (no value, null check)
field:"src_ip" kind:is_not_null

Output fields

These fields are emitted when the rule matches.

FieldSource
AccountCustomEntityextend
IPCustomEntityextend