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

Box - User logged in as admin

Back
Idb2197d7f-4731-483c-89de-d48606b872da
RulenameBox - User logged in as admin
DescriptionDetects when user logged in as admin.
SeverityMedium
TacticsPrivilegeEscalation
TechniquesT1078
Required data connectorsBoxDataConnector
KindScheduled
Query frequency1h
Query period14d
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Box/Analytic Rules/BoxUserLoginAsAdmin.yaml
Version1.0.0
Arm templateb2197d7f-4731-483c-89de-d48606b872da.json
Deploy To Azure
let lbperiod_start = 14d;
let lbperiod_end = 1d;
let admins = BoxEvents
| where TimeGenerated 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
name: Box - User logged in as admin
requiredDataConnectors:
- dataTypes:
  - BoxEvents_CL
  connectorId: BoxDataConnector
entityMappings:
- fieldMappings:
  - identifier: FullName
    columnName: AccountCustomEntity
  entityType: Account
- fieldMappings:
  - identifier: Address
    columnName: IPCustomEntity
  entityType: IP
triggerThreshold: 0
id: b2197d7f-4731-483c-89de-d48606b872da
tactics:
- PrivilegeEscalation
version: 1.0.0
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Box/Analytic Rules/BoxUserLoginAsAdmin.yaml
queryPeriod: 14d
kind: Scheduled
queryFrequency: 1h
severity: Medium
status: Available
description: |
    'Detects when user logged in as admin.'
query: |
  let lbperiod_start = 14d;
  let lbperiod_end = 1d;
  let admins = BoxEvents
  | where TimeGenerated 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  
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/b2197d7f-4731-483c-89de-d48606b872da')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/b2197d7f-4731-483c-89de-d48606b872da')]",
      "properties": {
        "alertRuleTemplateName": "b2197d7f-4731-483c-89de-d48606b872da",
        "customDetails": null,
        "description": "'Detects when user logged in as admin.'\n",
        "displayName": "Box - User logged in as admin",
        "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/Box/Analytic Rules/BoxUserLoginAsAdmin.yaml",
        "query": "let lbperiod_start = 14d;\nlet lbperiod_end = 1d;\nlet admins = BoxEvents\n| where TimeGenerated between (ago(lbperiod_start) .. ago(lbperiod_end))\n| where EventType =~ 'ADMIN_LOGIN'\n| summarize makeset(SourceLogin);\nBoxEvents\n| where EventType =~ 'ADMIN_LOGIN'\n| where SourceLogin !in (admins)\n| extend AccountCustomEntity = SourceLogin\n| extend IPCustomEntity = SrcIpAddr\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "P14D",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "PrivilegeEscalation"
        ],
        "techniques": [
          "T1078"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}