Detection rules › Panther

Anomalous AccessDenied Requests

Source
github.com/panther-labs/panther-analysis

ARNs with a high Access Denied error rate could indicate an error or compromised credentials attempting to perform reconnaissance.

Rule body yaml

AnalysisType: scheduled_query
Description: ARNs with a high Access Denied error rate could indicate an error or compromised credentials attempting to perform reconnaissance.
Enabled: false
Query: |
  SELECT
    userIdentity:arn as arn,
    count(DISTINCT eventName) as distinctEventNames
  FROM
    panther_logs.public.aws_cloudtrail
  WHERE
    errorCode = 'AccessDenied'
    and p_occurs_since('1 day')
  GROUP BY userIdentity:arn
  HAVING count(DISTINCT eventName) > 10
QueryName: "Anomalous AccessDenied Requests"
Schedule:
  RateMinutes: 1440
  TimeoutMinutes: 5

Detection logic

Stage 1: source

panther_logs.public.aws_cloudtrail

Stage 2: filter

errorCode eq "AccessDenied"

Stage 3: having

Threshold
gt 10
Cardinality
eventName

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.

FieldKindValues
errorCodeeq
  • AccessDenied

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.

FieldSource
arnuserIdentity:arn
distinctEventNamescount ( DISTINCT eventName )