OracleDBAudit - User activity after long inactivity time
Id | 5e93a535-036b-4570-9e58-d8992f30e1ae |
Rulename | OracleDBAudit - User activity after long inactivity time |
Description | Detects when an action was made by a user which last activity was observed more than 30 days ago. |
Severity | Medium |
Tactics | InitialAccess Persistence |
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/OracleDBAuditRareUserActivity.yaml |
Version | 1.0.1 |
Arm template | 5e93a535-036b-4570-9e58-d8992f30e1ae.json |
let lbtime_14d = 14d;
let lbtime_7d = 7d;
let lbtime_24h = 24h;
let known_users_14d = OracleDatabaseAuditEvent
| where TimeGenerated between (ago(lbtime_14d) .. ago(lbtime_14d))
| where isnotempty(DstUserName)
| where isnotempty(Action)
| summarize makeset(DstUserName);
let known_users_7d = OracleDatabaseAuditEvent
| where TimeGenerated between (ago(lbtime_7d) .. ago(lbtime_24h))
| where isnotempty(DstUserName)
| where isnotempty(Action)
| summarize makeset(DstUserName);
OracleDatabaseAuditEvent
| where isnotempty(DstUserName)
| where isnotempty(Action)
| where DstUserName !in (known_users_7d)
| where DstUserName in (known_users_14d)
| project DstUserName
| extend AccountCustomEntity = DstUserName
relevantTechniques:
- T1078
name: OracleDBAudit - User activity after long inactivity time
requiredDataConnectors:
- dataTypes:
- Syslog
connectorId: OracleDatabaseAudit
- datatypes:
- Syslog
connectorId: SyslogAma
entityMappings:
- fieldMappings:
- identifier: FullName
columnName: AccountCustomEntity
entityType: Account
triggerThreshold: 0
id: 5e93a535-036b-4570-9e58-d8992f30e1ae
tactics:
- InitialAccess
- Persistence
version: 1.0.1
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/OracleDatabaseAudit/Analytic Rules/OracleDBAuditRareUserActivity.yaml
queryPeriod: 14d
kind: Scheduled
queryFrequency: 1h
severity: Medium
status: Available
description: |
'Detects when an action was made by a user which last activity was observed more than 30 days ago.'
query: |
let lbtime_14d = 14d;
let lbtime_7d = 7d;
let lbtime_24h = 24h;
let known_users_14d = OracleDatabaseAuditEvent
| where TimeGenerated between (ago(lbtime_14d) .. ago(lbtime_14d))
| where isnotempty(DstUserName)
| where isnotempty(Action)
| summarize makeset(DstUserName);
let known_users_7d = OracleDatabaseAuditEvent
| where TimeGenerated between (ago(lbtime_7d) .. ago(lbtime_24h))
| where isnotempty(DstUserName)
| where isnotempty(Action)
| summarize makeset(DstUserName);
OracleDatabaseAuditEvent
| where isnotempty(DstUserName)
| where isnotempty(Action)
| where DstUserName !in (known_users_7d)
| where DstUserName in (known_users_14d)
| project DstUserName
| extend AccountCustomEntity = DstUserName
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/5e93a535-036b-4570-9e58-d8992f30e1ae')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/5e93a535-036b-4570-9e58-d8992f30e1ae')]",
"properties": {
"alertRuleTemplateName": "5e93a535-036b-4570-9e58-d8992f30e1ae",
"customDetails": null,
"description": "'Detects when an action was made by a user which last activity was observed more than 30 days ago.'\n",
"displayName": "OracleDBAudit - User activity after long inactivity time",
"enabled": true,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"columnName": "AccountCustomEntity",
"identifier": "FullName"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/OracleDatabaseAudit/Analytic Rules/OracleDBAuditRareUserActivity.yaml",
"query": "let lbtime_14d = 14d;\nlet lbtime_7d = 7d;\nlet lbtime_24h = 24h;\nlet known_users_14d = OracleDatabaseAuditEvent\n| where TimeGenerated between (ago(lbtime_14d) .. ago(lbtime_14d))\n| where isnotempty(DstUserName)\n| where isnotempty(Action)\n| summarize makeset(DstUserName);\nlet known_users_7d = OracleDatabaseAuditEvent\n| where TimeGenerated between (ago(lbtime_7d) .. ago(lbtime_24h))\n| where isnotempty(DstUserName)\n| where isnotempty(Action)\n| summarize makeset(DstUserName);\nOracleDatabaseAuditEvent\n| where isnotempty(DstUserName)\n| where isnotempty(Action)\n| where DstUserName !in (known_users_7d)\n| where DstUserName in (known_users_14d)\n| project DstUserName\n| extend AccountCustomEntity = DstUserName\n",
"queryFrequency": "PT1H",
"queryPeriod": "P14D",
"severity": "Medium",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"InitialAccess",
"Persistence"
],
"techniques": [
"T1078"
],
"templateVersion": "1.0.1",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}