detecting-aws-iam-privilege-escalation
Detect AWS IAM privilege escalation paths using boto3 and Cloudsplaining policy analysis to identify overly permissive policies, dangerous permission combinations, and least-privilege violations
How do I install this agent skill?
npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill detecting-aws-iam-privilege-escalationIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill is a security analysis tool designed to identify privilege escalation paths in AWS IAM configurations using boto3 and policy analysis techniques. It uses legitimate libraries and provides documentation for standard security tools. A minor risk of indirect prompt injection is present because the skill processes external IAM policy data that is not sanitized for malicious instructions.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Detecting AWS IAM Privilege Escalation
Overview
This skill uses boto3 and Cloudsplaining-style analysis to identify IAM privilege escalation paths in AWS accounts. It downloads the account authorization details, analyzes each policy for dangerous permission combinations (iam:PassRole + lambda:CreateFunction, iam:CreatePolicyVersion, sts:AssumeRole), and flags policies that violate least-privilege principles.
When to Use
- When investigating security incidents that require detecting aws iam privilege escalation
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- Python 3.8+ with boto3 library
- AWS credentials with IAM read-only access (iam:GetAccountAuthorizationDetails)
- Optional: cloudsplaining Python package for HTML report generation
Steps
- Download IAM Authorization Details — Call iam:GetAccountAuthorizationDetails to retrieve all users, groups, roles, and policies
- Analyze Policies for Privilege Escalation — Check each policy for known escalation permission combinations
- Identify Wildcard Resource Policies — Flag policies using Resource: "*" with dangerous actions
- Map Principal-to-Policy Relationships — Build a graph of which principals can access which escalation paths
- Score and Prioritize Findings — Rank findings by severity based on escalation vector type
- Generate Report — Produce structured JSON report with remediation guidance
Expected Output
- JSON report of privilege escalation findings with severity scores
- List of dangerous permission combinations per principal
- Wildcard resource policy audit results
- Remediation recommendations for each finding
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/mukul975/anthropic-cybersecurity-skills/detecting-aws-iam-privilege-escalation">View detecting-aws-iam-privilege-escalation on skillZs</a>