Back
Idf32950bc-6553-4c03-2686-a9c29ef318e8
RulenameUniFi Site Manager: System log shipping disabled
DescriptionIdentifies when a UniFi host transitions cloudSystemLogState from enabled to disabled. This defense-evasion signal may indicate an attacker silencing audit trails.
SeverityHigh
TacticsDefenseEvasion
TechniquesT1562
Required data connectorsUniFiSiteManagerConnectorDefinition
KindScheduled
Query frequency15m
Query period45m
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/UniFi%20Site%20Manager%20%28CCF%29/Analytic%20Rules/UniFiCloudSystemlogshippingdisabled.yaml
Version1.0.1
Arm templatef32950bc-6553-4c03-2686-a9c29ef318e8.json
Deploy To Azure
let prev = Unifi_SiteManager_Hosts_CL
          | where TimeGenerated between (ago(30m) .. ago(15m))
          | summarize arg_max(TimeGenerated, *) by Id
          | project id_s = Id, prevState = tostring(ReportedState.cloudSystemLogState);
      Unifi_SiteManager_Hosts_CL
      | where TimeGenerated > ago(15m)
      | summarize arg_max(TimeGenerated, *) by Id
      | extend id_s = Id,
               SiteName = tostring(ReportedState.name),
               currentState = tostring(ReportedState.cloudSystemLogState)
      | join kind=inner prev on id_s
      | where currentState == 'disabled' and prevState == 'enabled'
      | extend Activity = strcat('Cloud system log shipping was disabled on host ', SiteName, ' (', prevState, ' -> ', currentState, ')')
      | project TimeGenerated, Id, SiteName, Activity, prevState, currentState
version: 1.0.1
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/UniFi%20Site%20Manager%20%28CCF%29/Analytic%20Rules/UniFiCloudSystemlogshippingdisabled.yaml
triggerThreshold: 0
requiredDataConnectors:
- dataTypes:
  - Unifi_SiteManager_Hosts_CL
  connectorId: UniFiSiteManagerConnectorDefinition
tactics:
- DefenseEvasion
relevantTechniques:
- T1562
kind: Scheduled
incidentConfiguration:
  groupingConfiguration:
    matchingMethod: AllEntities
    lookbackDuration: PT12H
    reopenClosedIncident: false
    enabled: true
  createIncident: true
entityMappings:
- fieldMappings:
  - identifier: HostName
    columnName: Id
  - identifier: DnsDomain
    columnName: SiteName
  entityType: Host
description: |
  Identifies when a UniFi host transitions cloudSystemLogState from enabled to disabled. This defense-evasion signal may indicate an attacker silencing audit trails.
triggerOperator: gt
status: Available
subTechniques:
- T1562.006
- T1562.008
queryFrequency: 15m
id: f32950bc-6553-4c03-2686-a9c29ef318e8
name: 'UniFi Site Manager: System log shipping disabled'
severity: High
query: |
  let prev = Unifi_SiteManager_Hosts_CL
            | where TimeGenerated between (ago(30m) .. ago(15m))
            | summarize arg_max(TimeGenerated, *) by Id
            | project id_s = Id, prevState = tostring(ReportedState.cloudSystemLogState);
        Unifi_SiteManager_Hosts_CL
        | where TimeGenerated > ago(15m)
        | summarize arg_max(TimeGenerated, *) by Id
        | extend id_s = Id,
                 SiteName = tostring(ReportedState.name),
                 currentState = tostring(ReportedState.cloudSystemLogState)
        | join kind=inner prev on id_s
        | where currentState == 'disabled' and prevState == 'enabled'
        | extend Activity = strcat('Cloud system log shipping was disabled on host ', SiteName, ' (', prevState, ' -> ', currentState, ')')
        | project TimeGenerated, Id, SiteName, Activity, prevState, currentState
queryPeriod: 45m
{
  "$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/f32950bc-6553-4c03-2686-a9c29ef318e8')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/f32950bc-6553-4c03-2686-a9c29ef318e8')]",
      "properties": {
        "alertRuleTemplateName": "f32950bc-6553-4c03-2686-a9c29ef318e8",
        "customDetails": null,
        "description": "Identifies when a UniFi host transitions cloudSystemLogState from enabled to disabled. This defense-evasion signal may indicate an attacker silencing audit trails.\n",
        "displayName": "UniFi Site Manager: System log shipping disabled",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Host",
            "fieldMappings": [
              {
                "columnName": "Id",
                "identifier": "HostName"
              },
              {
                "columnName": "SiteName",
                "identifier": "DnsDomain"
              }
            ]
          }
        ],
        "incidentConfiguration": {
          "createIncident": true,
          "groupingConfiguration": {
            "enabled": true,
            "lookbackDuration": "PT12H",
            "matchingMethod": "AllEntities",
            "reopenClosedIncident": false
          }
        },
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/UniFi%20Site%20Manager%20%28CCF%29/Analytic%20Rules/UniFiCloudSystemlogshippingdisabled.yaml",
        "query": "let prev = Unifi_SiteManager_Hosts_CL\n          | where TimeGenerated between (ago(30m) .. ago(15m))\n          | summarize arg_max(TimeGenerated, *) by Id\n          | project id_s = Id, prevState = tostring(ReportedState.cloudSystemLogState);\n      Unifi_SiteManager_Hosts_CL\n      | where TimeGenerated > ago(15m)\n      | summarize arg_max(TimeGenerated, *) by Id\n      | extend id_s = Id,\n               SiteName = tostring(ReportedState.name),\n               currentState = tostring(ReportedState.cloudSystemLogState)\n      | join kind=inner prev on id_s\n      | where currentState == 'disabled' and prevState == 'enabled'\n      | extend Activity = strcat('Cloud system log shipping was disabled on host ', SiteName, ' (', prevState, ' -> ', currentState, ')')\n      | project TimeGenerated, Id, SiteName, Activity, prevState, currentState\n",
        "queryFrequency": "PT15M",
        "queryPeriod": "PT45M",
        "severity": "High",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "DefenseEvasion"
        ],
        "techniques": [
          "T1562"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}