Query Details
// https://salsa.debian.org/pkg-security-team/dnsrecon/-/blob/debian/master/dnsrecon/cli.py#L196
// dnsrecon command might check a NXDOMAIN hijack and uses a specific domain name in this test
DnsEvents
| where Name matches regex @"^[a-zA-Z0-9]{20}\.com$" and Name matches regex "[A-Z]" and QueryType in ("A", "AAAA")
| project
TimeGenerated,
Computer,
EventId,
SubType,
ClientIP,
Name,
QueryType,
ResultCode
This KQL (Kusto Query Language) query is designed to analyze DNS events to identify potential NXDOMAIN hijacking attempts. Here's a simple breakdown of what the query does:
Data Source: It starts by looking at a dataset called DnsEvents, which contains information about DNS queries.
Filtering Criteria:
Name) that match a specific pattern:
Projection:
TimeGenerated: The time the event was generated.Computer: The computer where the event was logged.EventId: The ID of the event.SubType: The subtype of the event.ClientIP: The IP address of the client making the DNS query.Name: The DNS name that was queried.QueryType: The type of DNS query (either "A" or "AAAA").ResultCode: The result code of the DNS query.In summary, this query is used to identify and examine specific DNS queries that might indicate NXDOMAIN hijacking, focusing on queries for domain names that fit a particular pattern and are of specific query types.

Jose Sebastián Canós
Released: November 14, 2024
Tables
Keywords
Operators