Detection rules › Panther
Query.VPC.DNS.Tunneling
Detect activity similar to DNS tunneling traffic in AWS VPC Logs
Rule body yaml
AnalysisType: scheduled_query
QueryName: "Query.VPC.DNS.Tunneling"
Enabled: false
Description: >
Detect activity similar to DNS tunneling traffic in AWS VPC Logs
Query: |
SELECT
account_id,
region,
vpc_id,
srcAddr, -- outside
srcIds:instance as instance, -- inside
COUNT(1) as message_count,
ARRAY_AGG(DISTINCT query_name) as query_names
FROM
panther_logs.public.aws_vpcdns
WHERE
p_occurs_since(3600) -- 1 hour in seconds
AND
-- simple allowlisting
query_name NOT LIKE '%amazonaws.com'
GROUP BY
1,2,3,4,5
HAVING
message_count >= 1000 -- decent amount of activity in an hour
AND
ARRAY_SIZE(query_names) <= 2 -- only a small number of distinct domains (not likely a real dns server!)
Schedule:
RateMinutes: 60
TimeoutMinutes: 1
Detection logic
Stage 1: source
panther_logs.public.aws_vpcdns
Stage 2: filter
query_name not wildcard "*amazonaws.com"
Stage 3: having
message_count ge "1000"
This rule also runs imperative logic the parser cannot express as a filter; the conditions above are the structured part it could extract.
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
query_name | ends_with | amazonaws.com |
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 |
|---|---|---|
message_count | ge |
|
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 |
|---|---|
account_id | |
region | |
vpc_id | |
srcAddr | |
instance | srcIds:instance |
message_count | COUNT ( 1 ) |
query_names | ARRAY_AGG ( DISTINCT query_name ) |