Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

OracleDBAudit - Connection to database from unknown IP

Back
Id80b1dd6d-1aea-471e-be7a-a4a0afdeec80
RulenameOracleDBAudit - Connection to database from unknown IP
DescriptionDetects when user connects to a database from IP address which is not present in AllowList.
SeverityMedium
TacticsInitialAccess
TechniquesT1078
Required data connectorsOracleDatabaseAudit
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/OracleDatabaseAudit/Analytic Rules/OracleDBAuditForbiddenSrcIpAddr.yaml
Version1.0.0
Arm template80b1dd6d-1aea-471e-be7a-a4a0afdeec80.json
Deploy To Azure
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
relevantTechniques:
- T1078
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/OracleDatabaseAudit/Analytic Rules/OracleDBAuditForbiddenSrcIpAddr.yaml
triggerOperator: gt
kind: Scheduled
entityMappings:
- fieldMappings:
  - columnName: AccountCustomEntity
    identifier: FullName
  entityType: Account
- fieldMappings:
  - columnName: IPCustomEntity
    identifier: Address
  entityType: IP
requiredDataConnectors:
- dataTypes:
  - Syslog
  connectorId: OracleDatabaseAudit
queryPeriod: 1h
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  
version: 1.0.0
description: |
    'Detects when user connects to a database from IP address which is not present in AllowList.'
tactics:
- InitialAccess
severity: Medium
name: OracleDBAudit - Connection to database from unknown IP
queryFrequency: 1h
triggerThreshold: 0
status: Available
id: 80b1dd6d-1aea-471e-be7a-a4a0afdeec80
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2023-02-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/80b1dd6d-1aea-471e-be7a-a4a0afdeec80')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/80b1dd6d-1aea-471e-be7a-a4a0afdeec80')]",
      "properties": {
        "alertRuleTemplateName": "80b1dd6d-1aea-471e-be7a-a4a0afdeec80",
        "customDetails": null,
        "description": "'Detects when user connects to a database from IP address which is not present in AllowList.'\n",
        "displayName": "OracleDBAudit - Connection to database from unknown IP",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "AccountCustomEntity",
                "identifier": "FullName"
              }
            ]
          },
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "IPCustomEntity",
                "identifier": "Address"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/OracleDatabaseAudit/Analytic Rules/OracleDBAuditForbiddenSrcIpAddr.yaml",
        "query": "let ip_allowlist = dynamic(['127.0.0.2']);\nOracleDatabaseAuditEvent\n| where isnotempty(SrcIpAddr)\n| where DbAction =~ 'CONNECT'\n| where SrcIpAddr !in (ip_allowlist)\n| project SrcIpAddr, DstUserName\n| extend AccountCustomEntity = DstUserName\n| extend IPCustomEntity = SrcIpAddr\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1078"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}