Back
Ide69be544-9476-35bb-2533-fa8c650dcd46
RulenameUniFi Site Manager: New Device Adopted
DescriptionIdentifies when a new device is adopted into the UniFi network. While often legitimate, unexpected adoptions may indicate unauthorized hardware additions.
SeverityInformational
TacticsInitialAccess
Persistence
TechniquesT1200
T1133
Required data connectorsUniFiSiteManagerConnectorDefinition
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/UniFi%20Site%20Manager%20%28CCF%29/Analytic%20Rules/UniFiCloudNewDeviceAdopted.yaml
Version1.0.0
Arm templatee69be544-9476-35bb-2533-fa8c650dcd46.json
Deploy To Azure
// UniFi New Device Adopted Detection
Unifi_SiteManager_Devices_CL
| where TimeGenerated > ago(1h)
| where isnotempty(AdoptionTime)
| extend AdoptionDateTime = todatetime(AdoptionTime)
| where AdoptionDateTime > ago(1h)
| summarize arg_max(TimeGenerated, *) by Id
| extend
    DeviceName = coalesce(Name, "Unnamed"),
    DeviceId = Id,
    Model = Model,
    IPAddress = Ip,
    MACAddress = Mac,
    ProductLine = ProductLine,
    FirmwareVersion = Version,
    Shortname = Shortname
| extend HostName = DeviceName
| project
    TimeGenerated,
    AdoptionTime = AdoptionDateTime,
    DeviceName,
    DeviceId,
    Model,
    IPAddress,
    MACAddress,
    ProductLine,
    Status = Status,
    FirmwareVersion,
    Shortname,
    HostName
incidentConfiguration:
  createIncident: true
  groupingConfiguration:
    lookbackDuration: PT24H
    reopenClosedIncident: false
    enabled: true
    matchingMethod: AllEntities
entityMappings:
- entityType: Host
  fieldMappings:
  - columnName: HostName
    identifier: HostName
- entityType: IP
  fieldMappings:
  - columnName: IPAddress
    identifier: Address
query: |
  // UniFi New Device Adopted Detection
  Unifi_SiteManager_Devices_CL
  | where TimeGenerated > ago(1h)
  | where isnotempty(AdoptionTime)
  | extend AdoptionDateTime = todatetime(AdoptionTime)
  | where AdoptionDateTime > ago(1h)
  | summarize arg_max(TimeGenerated, *) by Id
  | extend
      DeviceName = coalesce(Name, "Unnamed"),
      DeviceId = Id,
      Model = Model,
      IPAddress = Ip,
      MACAddress = Mac,
      ProductLine = ProductLine,
      FirmwareVersion = Version,
      Shortname = Shortname
  | extend HostName = DeviceName
  | project
      TimeGenerated,
      AdoptionTime = AdoptionDateTime,
      DeviceName,
      DeviceId,
      Model,
      IPAddress,
      MACAddress,
      ProductLine,
      Status = Status,
      FirmwareVersion,
      Shortname,
      HostName
id: e69be544-9476-35bb-2533-fa8c650dcd46
queryFrequency: 1h
status: Available
subTechniques: []
version: 1.0.0
severity: Informational
relevantTechniques:
- T1200
- T1133
name: 'UniFi Site Manager: New Device Adopted'
kind: Scheduled
tactics:
- InitialAccess
- Persistence
requiredDataConnectors:
- dataTypes:
  - Unifi_SiteManager_Devices_CL
  connectorId: UniFiSiteManagerConnectorDefinition
description: |
  Identifies when a new device is adopted into the UniFi network. While often legitimate, unexpected adoptions may indicate unauthorized hardware additions.
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/UniFi%20Site%20Manager%20%28CCF%29/Analytic%20Rules/UniFiCloudNewDeviceAdopted.yaml
triggerOperator: gt
triggerThreshold: 0
queryPeriod: 1h
{
  "$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/e69be544-9476-35bb-2533-fa8c650dcd46')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/e69be544-9476-35bb-2533-fa8c650dcd46')]",
      "properties": {
        "alertRuleTemplateName": "e69be544-9476-35bb-2533-fa8c650dcd46",
        "customDetails": null,
        "description": "Identifies when a new device is adopted into the UniFi network. While often legitimate, unexpected adoptions may indicate unauthorized hardware additions.\n",
        "displayName": "UniFi Site Manager: New Device Adopted",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Host",
            "fieldMappings": [
              {
                "columnName": "HostName",
                "identifier": "HostName"
              }
            ]
          },
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "IPAddress",
                "identifier": "Address"
              }
            ]
          }
        ],
        "incidentConfiguration": {
          "createIncident": true,
          "groupingConfiguration": {
            "enabled": true,
            "lookbackDuration": "PT24H",
            "matchingMethod": "AllEntities",
            "reopenClosedIncident": false
          }
        },
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/UniFi%20Site%20Manager%20%28CCF%29/Analytic%20Rules/UniFiCloudNewDeviceAdopted.yaml",
        "query": "// UniFi New Device Adopted Detection\nUnifi_SiteManager_Devices_CL\n| where TimeGenerated > ago(1h)\n| where isnotempty(AdoptionTime)\n| extend AdoptionDateTime = todatetime(AdoptionTime)\n| where AdoptionDateTime > ago(1h)\n| summarize arg_max(TimeGenerated, *) by Id\n| extend\n    DeviceName = coalesce(Name, \"Unnamed\"),\n    DeviceId = Id,\n    Model = Model,\n    IPAddress = Ip,\n    MACAddress = Mac,\n    ProductLine = ProductLine,\n    FirmwareVersion = Version,\n    Shortname = Shortname\n| extend HostName = DeviceName\n| project\n    TimeGenerated,\n    AdoptionTime = AdoptionDateTime,\n    DeviceName,\n    DeviceId,\n    Model,\n    IPAddress,\n    MACAddress,\n    ProductLine,\n    Status = Status,\n    FirmwareVersion,\n    Shortname,\n    HostName\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Informational",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess",
          "Persistence"
        ],
        "techniques": [
          "T1133",
          "T1200"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}