OracleDBAudit - User connected to database from new IP
Id | 39a0995e-f4a9-4869-a0ae-36d6d9049bfd |
Rulename | OracleDBAudit - User connected to database from new IP |
Description | Detects when a user connects to database from new IP address. |
Severity | Low |
Tactics | InitialAccess |
Techniques | T1078 |
Required data connectors | OracleDatabaseAudit SyslogAma |
Kind | Scheduled |
Query frequency | 1h |
Query period | 14d |
Trigger threshold | 0 |
Trigger operator | gt |
Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/OracleDatabaseAudit/Analytic Rules/OracleDBAuditNewIpForUser.yaml |
Version | 1.0.1 |
Arm template | 39a0995e-f4a9-4869-a0ae-36d6d9049bfd.json |
let lbtime_d = 14d;
let lbtime_24h = 24h;
OracleDatabaseAuditEvent
| where TimeGenerated between (ago(lbtime_d) .. ago(lbtime_24h))
| where isnotempty(SrcIpAddr)
| where isnotempty(DstUserName)
| summarize knownIPs = make_set(SrcIpAddr) by DstUserName
| join (OracleDatabaseAuditEvent
| where isnotempty(SrcIpAddr)
| where isnotempty(DstUserName)
| where DbAction =~ 'connect'
) on DstUserName
| where knownIPs !contains SrcIpAddr
| project DstUserName, SrcIpAddr
| extend AccountCustomEntity = DstUserName
| extend IPCustomEntity = SrcIpAddr
relevantTechniques:
- T1078
name: OracleDBAudit - User connected to database from new IP
requiredDataConnectors:
- dataTypes:
- Syslog
connectorId: OracleDatabaseAudit
- datatypes:
- Syslog
connectorId: SyslogAma
entityMappings:
- fieldMappings:
- identifier: FullName
columnName: AccountCustomEntity
entityType: Account
- fieldMappings:
- identifier: Address
columnName: IPCustomEntity
entityType: IP
triggerThreshold: 0
id: 39a0995e-f4a9-4869-a0ae-36d6d9049bfd
tactics:
- InitialAccess
version: 1.0.1
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/OracleDatabaseAudit/Analytic Rules/OracleDBAuditNewIpForUser.yaml
queryPeriod: 14d
kind: Scheduled
queryFrequency: 1h
severity: Low
status: Available
description: |
'Detects when a user connects to database from new IP address.'
query: |
let lbtime_d = 14d;
let lbtime_24h = 24h;
OracleDatabaseAuditEvent
| where TimeGenerated between (ago(lbtime_d) .. ago(lbtime_24h))
| where isnotempty(SrcIpAddr)
| where isnotempty(DstUserName)
| summarize knownIPs = make_set(SrcIpAddr) by DstUserName
| join (OracleDatabaseAuditEvent
| where isnotempty(SrcIpAddr)
| where isnotempty(DstUserName)
| where DbAction =~ 'connect'
) on DstUserName
| where knownIPs !contains SrcIpAddr
| project DstUserName, SrcIpAddr
| extend AccountCustomEntity = DstUserName
| extend IPCustomEntity = SrcIpAddr
triggerOperator: gt
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspace": {
"type": "String"
}
},
"resources": [
{
"apiVersion": "2024-01-01-preview",
"id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/39a0995e-f4a9-4869-a0ae-36d6d9049bfd')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/39a0995e-f4a9-4869-a0ae-36d6d9049bfd')]",
"properties": {
"alertRuleTemplateName": "39a0995e-f4a9-4869-a0ae-36d6d9049bfd",
"customDetails": null,
"description": "'Detects when a user connects to database from new IP address.'\n",
"displayName": "OracleDBAudit - User connected to database from new 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/OracleDBAuditNewIpForUser.yaml",
"query": "let lbtime_d = 14d;\nlet lbtime_24h = 24h;\nOracleDatabaseAuditEvent\n| where TimeGenerated between (ago(lbtime_d) .. ago(lbtime_24h))\n| where isnotempty(SrcIpAddr)\n| where isnotempty(DstUserName)\n| summarize knownIPs = make_set(SrcIpAddr) by DstUserName\n| join (OracleDatabaseAuditEvent\n | where isnotempty(SrcIpAddr)\n | where isnotempty(DstUserName)\n | where DbAction =~ 'connect'\n ) on DstUserName\n| where knownIPs !contains SrcIpAddr\n| project DstUserName, SrcIpAddr\n| extend AccountCustomEntity = DstUserName\n| extend IPCustomEntity = SrcIpAddr\n",
"queryFrequency": "PT1H",
"queryPeriod": "P14D",
"severity": "Low",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"InitialAccess"
],
"techniques": [
"T1078"
],
"templateVersion": "1.0.1",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}