let lbperiod_start = 14d;
let lbperiod_end = 1d;
let admins = BoxEvents
| where EventEndTime between (ago(lbperiod_start) .. ago(lbperiod_end))
| where EventType =~ 'ADMIN_LOGIN'
| summarize makeset(SourceLogin);
BoxEvents
| where EventType =~ 'ADMIN_LOGIN'
| where SourceLogin !in (admins)
| extend AccountCustomEntity = SourceLogin
| extend IPCustomEntity = SrcIpAddr
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/Box/Analytic Rules/BoxUserLoginAsAdmin.yaml
version: 1.0.1
tactics:
- PrivilegeEscalation
queryPeriod: 14d
kind: Scheduled
id: b2197d7f-4731-483c-89de-d48606b872da
severity: Medium
query: |
let lbperiod_start = 14d;
let lbperiod_end = 1d;
let admins = BoxEvents
| where EventEndTime between (ago(lbperiod_start) .. ago(lbperiod_end))
| where EventType =~ 'ADMIN_LOGIN'
| summarize makeset(SourceLogin);
BoxEvents
| where EventType =~ 'ADMIN_LOGIN'
| where SourceLogin !in (admins)
| extend AccountCustomEntity = SourceLogin
| extend IPCustomEntity = SrcIpAddr
triggerThreshold: 0
name: Box - User logged in as admin
status: Available
description: |
'Detects when user logged in as admin.'
relevantTechniques:
- T1078
requiredDataConnectors:
- connectorId: BoxDataConnector
dataTypes:
- BoxEvents_CL
queryFrequency: 1h