Skip to main content

How AWS Neutralizes Compromised IAM Keys with Managed Policies Hunt Query

The quarantine mechanism leverages partner feeds like GitHub Secret Scanning, applying explicit Deny guardrails across IAM, EC2 compute, and Bedrock AI APIs.

// Microsoft Sentinel / Defender Hunting Query: Detect AWS IAM Compromised Key Quarantine Events in CloudTrail
AWSCloudTrail
| where EventName =~ "AttachUserPolicy"
| extend PolicyArn = tostring(parse_json(RequestParameters).policyArn)
| extend TargetUser = tostring(parse_json(RequestParameters).userName)
| where PolicyArn has "AWSCompromisedKeyQuarantine"
| project TimeGenerated, SourceIpAddress, UserIdentityArn, TargetUser, PolicyArn, SessionMfaAuthenticated, ResponseElements
| sort by TimeGenerated desc
Need to defang indicators or test triage logs?
Use our zero-telemetry client-side parser to extract, defang & format indicators.
Open SOC Defanger Workbench
Target Log Sources & Tables
DeviceProcessEvents

Ensure telemetry connector is actively ingesting this table into your Sentinel workspace or Defender XDR.

False Positives & Tuning Guidance

Legitimate administrative software deployment scripts, authorized security testing, or system maintenance tasks.

Source Incident Analysis

How AWS Neutralizes Compromised IAM Keys with Managed Policies

Disclosed: 2026-09-24

Read Attack Chain
DETECTION_ENGINEERING_FEEDBACK

Have tuning recommendations, encounter false positives in your environment, or want to contribute rule improvements?

Submit Feedback →