Skip to main content
UNIFIED SOC INCIDENT RESPONSE BLUEPRINT

How AWS Neutralizes Compromised IAM Keys with Managed Policies

Unit 42 explores how AWS automatically neutralizes publicly exposed IAM credentials within minutes through its AWSCompromisedKeyQuarantine managed policy.

Detection & Hunting Detectors (1)

[T1552.001] How AWS Neutralizes Compromised IAM Keys with Managed Policies Hunt QueryStandalone Rule
// 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

Verified Indicators of Compromise (3)

Indicators of Compromise (IOCs)
3 Identified
CLOUDTRAIL-EVENTAttachUserPolicy
POLICY-ARNarn:aws:iam::aws:policy/AWSCompromisedKeyQuarantineV2
POLICY-ARNarn:aws:iam::aws:policy/AWSCompromisedKeyQuarantine