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

OracleDBAudit - User activity after long inactivity time

Back
Id5e93a535-036b-4570-9e58-d8992f30e1ae
RulenameOracleDBAudit - User activity after long inactivity time
DescriptionDetects when an action was made by a user which last activity was observed more than 30 days ago.
SeverityMedium
TacticsInitialAccess
Persistence
TechniquesT1078
Required data connectorsSyslogAma
KindScheduled
Query frequency1h
Query period14d
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/OracleDatabaseAudit/Analytic Rules/OracleDBAuditRareUserActivity.yaml
Version1.0.2
Arm template5e93a535-036b-4570-9e58-d8992f30e1ae.json
Deploy To Azure
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
entityMappings:
- fieldMappings:
  - columnName: AccountCustomEntity
    identifier: FullName
  entityType: Account
severity: Medium
name: OracleDBAudit - User activity after long inactivity time
triggerThreshold: 0
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/OracleDatabaseAudit/Analytic Rules/OracleDBAuditRareUserActivity.yaml
id: 5e93a535-036b-4570-9e58-d8992f30e1ae
kind: Scheduled
status: Available
queryFrequency: 1h
relevantTechniques:
- T1078
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  
version: 1.0.2
tactics:
- InitialAccess
- Persistence
queryPeriod: 14d
requiredDataConnectors:
- datatypes:
  - Syslog
  connectorId: SyslogAma