Detection rules › Kusto
Ubiquiti - connection to non-corporate DNS server
'Detects connections to non-corporate DNS servers.'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Command & Control | T1572 Protocol Tunneling |
| Exfiltration | T1041 Exfiltration Over C2 Channel |
Rule body kusto
id: fe232837-9bdc-4e2b-8c08-cdac2610eed3
name: Ubiquiti - connection to non-corporate DNS server
description: |
'Detects connections to non-corporate DNS servers.'
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: CustomLogsAma
dataTypes:
- Ubiquiti_CL
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
- CommandAndControl
- Exfiltration
relevantTechniques:
- T1572
- T1041
query: |
let corp_dns = dynamic(['127.0.0.2']);
UbiquitiAuditEvent
| where DstPortNumber == '53'
| where DstIpAddr !in (corp_dns)
| extend IPCustomEntity = SrcIpAddr
entityMappings:
- entityType: IP
fieldMappings:
- identifier: Address
columnName: IPCustomEntity
version: 1.0.2
kind: Scheduled
Stages and Predicates
Parameters
let corp_dns = dynamic(['127.0.0.2']);
Stage 1: source
UbiquitiAuditEvent
Stage 2: where
| where DstPortNumber == '53'
Stage 3: where
| where DstIpAddr !in (corp_dns)
Stage 4: extend
| extend IPCustomEntity = SrcIpAddr
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
DstIpAddr | eq | corp_dns |
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
DstPortNumber | eq |
|
Output fields
Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.
| Field | Source |
|---|---|
IPCustomEntity | extend |