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
relevantTechniques:
- T1078
entityMappings:
- fieldMappings:
- columnName: AccountCustomEntity
identifier: FullName
entityType: Account
- fieldMappings:
- columnName: IPCustomEntity
identifier: Address
entityType: IP
triggerThreshold: 0
description: |
'Detects when user logged in as admin.'
requiredDataConnectors:
- connectorId: BoxDataConnector
dataTypes:
- BoxEvents_CL
triggerOperator: gt
version: 1.0.1
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Box/Analytic Rules/BoxUserLoginAsAdmin.yaml
id: b2197d7f-4731-483c-89de-d48606b872da
queryFrequency: 1h
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
severity: Medium
status: Available
queryPeriod: 14d
name: Box - User logged in as admin
tactics:
- PrivilegeEscalation
kind: Scheduled