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

Ubiquiti - connection to non-corporate DNS server

Back
Idfe232837-9bdc-4e2b-8c08-cdac2610eed3
RulenameUbiquiti - connection to non-corporate DNS server
DescriptionDetects connections to non-corporate DNS servers.
SeverityMedium
TacticsCommandAndControl
Exfiltration
TechniquesT1572
T1041
Required data connectorsCustomLogsAma
UbiquitiUnifi
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Ubiquiti UniFi/Analytic Rules/UbiquitiNonCorpDns.yaml
Version1.0.1
Arm templatefe232837-9bdc-4e2b-8c08-cdac2610eed3.json
Deploy To Azure
let corp_dns = dynamic(['127.0.0.2']);
UbiquitiAuditEvent
| where DstPortNumber == '53'
| where DstIpAddr !in (corp_dns)
| extend IPCustomEntity = SrcIpAddr
relevantTechniques:
- T1572
- T1041
name: Ubiquiti - connection to non-corporate DNS server
requiredDataConnectors:
- dataTypes:
  - UbiquitiAuditEvent
  connectorId: UbiquitiUnifi
- dataTypes:
  - Ubiquiti_CL
  connectorId: CustomLogsAma
entityMappings:
- fieldMappings:
  - identifier: Address
    columnName: IPCustomEntity
  entityType: IP
triggerThreshold: 0
id: fe232837-9bdc-4e2b-8c08-cdac2610eed3
tactics:
- CommandAndControl
- Exfiltration
version: 1.0.1
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Ubiquiti UniFi/Analytic Rules/UbiquitiNonCorpDns.yaml
queryPeriod: 1h
kind: Scheduled
queryFrequency: 1h
severity: Medium
status: Available
description: |
    'Detects connections to non-corporate DNS servers.'
query: |
  let corp_dns = dynamic(['127.0.0.2']);
  UbiquitiAuditEvent
  | where DstPortNumber == '53'
  | where DstIpAddr !in (corp_dns)
  | 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/fe232837-9bdc-4e2b-8c08-cdac2610eed3')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/fe232837-9bdc-4e2b-8c08-cdac2610eed3')]",
      "properties": {
        "alertRuleTemplateName": "fe232837-9bdc-4e2b-8c08-cdac2610eed3",
        "customDetails": null,
        "description": "'Detects connections to non-corporate DNS servers.'\n",
        "displayName": "Ubiquiti - connection to non-corporate DNS server",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "IPCustomEntity",
                "identifier": "Address"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Ubiquiti UniFi/Analytic Rules/UbiquitiNonCorpDns.yaml",
        "query": "let corp_dns = dynamic(['127.0.0.2']);\nUbiquitiAuditEvent\n| where DstPortNumber == '53'\n| where DstIpAddr !in (corp_dns)\n| extend IPCustomEntity = SrcIpAddr\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "CommandAndControl",
          "Exfiltration"
        ],
        "techniques": [
          "T1041",
          "T1572"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}