Detection rules › Kusto

CTE - Device Enrolled but On Hold

Severity
low
Time window
30m
Source
github.com/Azure/Azure-Sentinel

A device enrollment is on hold, typically due to a license/device-capacity limit being reached.

Rule body

id: 21818920-85eb-4955-a7cc-f62c731f32ac
name: CTE - Device Enrolled but On Hold
description: |
  A device enrollment is on hold, typically due to a license/device-capacity limit being reached.
severity: Low
requiredDataConnectors:
  - connectorId: cybereinforce_cte
    dataTypes:
      - CybereinforceCTE_CL
queryFrequency: 30m
queryPeriod: 30m
triggerOperator: gt
triggerThreshold: 0
tactics:
  []
relevantTechniques: []
query: |
  CybereinforceCTE_CL
  | where EventType == "device.onhold"
  | extend d = parse_json(Details)
  | extend
      HostName = iff(isnotempty(tostring(d.hostname)), tostring(d.hostname), strcat("cte-device-", substring(EntityId, 0, 8))),
      DeviceId = tostring(d.deviceId),
      DeviceUser = tostring(d.deviceUser),
      DeviceOs = tostring(d.deviceOs),
      AppName = "Cybereinforce"
  | project TimeGenerated, TenantId, DeviceId, HostName, DeviceUser, DeviceOs, AppName, Actor, Severity, Category, Source
entityMappings:
  - entityType: Host
    fieldMappings:
      - identifier: HostName
        columnName: HostName
version: 1.0.0
kind: Scheduled

Stages and Predicates

Stage 1: source

CybereinforceCTE_CL

Stage 2: where

| where EventType == "device.onhold"

Stage 3: extend

| extend d = parse_json(Details)

Stage 4: extend

| extend
    HostName = iff(isnotempty(tostring(d.hostname)), tostring(d.hostname), strcat("cte-device-", substring(EntityId, 0, 8))),
    DeviceId = tostring(d.deviceId),
    DeviceUser = tostring(d.deviceUser),
    DeviceOs = tostring(d.deviceOs),
    AppName = "Cybereinforce"
HostName =
if/* macro: isnotempty(tostring(d.hostname)) */tostring(d.hostname)
elsestrcat("cte-device-", substring(EntityId, 0, 8))

Stage 5: project

| project TimeGenerated, TenantId, DeviceId, HostName, DeviceUser, DeviceOs, AppName, Actor, Severity, Category, Source

Indicators

These rows show field, operator, and value matches.

Output fields

These fields are emitted when the rule matches.

FieldSource
Actorproject
AppNameproject
Categoryproject
DeviceIdproject
DeviceOsproject
DeviceUserproject
HostNameproject
Severityproject
Sourceproject
TenantIdproject
TimeGeneratedproject