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
queryPeriod: 1h
entityMappings:
- fieldMappings:
- columnName: AccountCustomEntity
identifier: FullName
entityType: Account
- fieldMappings:
- columnName: IPCustomEntity
identifier: Address
entityType: IP
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/OracleDatabaseAudit/Analytic Rules/OracleDBAuditForbiddenSrcIpAddr.yaml
tactics:
- InitialAccess
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
description: |
'Detects when user connects to a database from IP address which is not present in AllowList.'
queryFrequency: 1h
id: 80b1dd6d-1aea-471e-be7a-a4a0afdeec80
status: Available
relevantTechniques:
- T1078
severity: Medium
version: 1.0.0
triggerThreshold: 0
kind: Scheduled
requiredDataConnectors:
- connectorId: OracleDatabaseAudit
dataTypes:
- Syslog
name: OracleDBAudit - Connection to database from unknown IP
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspace": {
"type": "String"
}
},
"resources": [
{
"id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/80b1dd6d-1aea-471e-be7a-a4a0afdeec80')]",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/80b1dd6d-1aea-471e-be7a-a4a0afdeec80')]",
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules",
"kind": "Scheduled",
"apiVersion": "2022-11-01-preview",
"properties": {
"displayName": "OracleDBAudit - Connection to database from unknown IP",
"description": "'Detects when user connects to a database from IP address which is not present in AllowList.'\n",
"severity": "Medium",
"enabled": true,
"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",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0,
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"InitialAccess"
],
"techniques": [
"T1078"
],
"alertRuleTemplateName": "80b1dd6d-1aea-471e-be7a-a4a0afdeec80",
"customDetails": null,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"identifier": "FullName",
"columnName": "AccountCustomEntity"
}
]
},
{
"entityType": "IP",
"fieldMappings": [
{
"identifier": "Address",
"columnName": "IPCustomEntity"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/OracleDatabaseAudit/Analytic Rules/OracleDBAuditForbiddenSrcIpAddr.yaml",
"templateVersion": "1.0.0",
"status": "Available"
}
}
]
}