Zum Inhalt springen
Skillpedia
Sicherheit35k · #8191

performing-aws-privilege-escalation-assessment

Was er macht

Dieses Tool hilft dir zu prüfen, ob ein Benutzer oder eine 'Rolle' in einem Amazon-Web-Services-Konto (AWS) mehr Rechte hat, als gut ist. Es sucht nach Fehlkonfigurationen, über die sich jemand mehr Rechte verschaffen kann, als vorgesehen sind.

Wann du ihn nutzt

  • ✓Wenn du die Berechtigungen in einem AWS-Konto testest (mit Genehmigung).
  • ✓Wenn du prüfst, ob Berechtigungen dem Prinzip der minimalen Rechte folgen.
  • ✓Wenn du das Risiko eines kompromittierten AWS-Kontos einschätzt.

Link zum Skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-aws-privilege-escalation-assessment/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-aws-privilege-escalation-assessment/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Prüfe mein AWS-Konto auf zu weitreichende Berechtigungen.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Es nutzt Tools wie Pacu, CloudFox und Principal Mapper, um die Berechtigungseinstellungen in AWS zu analysieren. Diese Tools suchen nach bekannten Wegen, über die ein Benutzer oder eine Rolle sich mehr Rechte verschaffen kann, als sie haben sollten.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Performing AWS Privilege Escalation Assessment

When to Use

  • When conducting authorized penetration testing of AWS IAM configurations
  • When validating that IAM policies follow the principle of least privilege
  • When assessing the blast radius of a compromised AWS credential
  • When building security reviews for IAM role and policy changes in CI/CD pipelines
  • When evaluating cross-account trust relationships for privilege escalation risks

Do not use for unauthorized testing against AWS accounts, for assessing non-IAM attack vectors (SSRF, application vulnerabilities), or as a substitute for comprehensive cloud penetration testing. Always obtain written authorization before testing.

Prerequisites

  • Written authorization for privilege escalation testing in the target AWS account
  • Test IAM user or role with limited permissions as the starting point
  • Pacu installed (pip install pacu)
  • CloudFox installed (go install github.com/BishopFox/cloudfox@latest)
  • PMapper (Principal Mapper) installed (pip install principalmapper)
  • AWS CLI configured with test credentials and CloudTrail logging enabled for audit trail

Workflow

Step 1: Enumerate Starting Permissions

Establish the baseline permissions of the test principal before attempting escalation.

# Get current identity
aws sts get-caller-identity

# Enumerate inline and attached policies for the current user
aws iam list-user-policies --user-name test-user
aws iam list-attached-user-policies --user-name test-user

# Get group memberships and group policies
aws iam list-groups-for-user --user-name test-user
for group in $(aws iam list-groups-for-user --user-name test-user --query 'Groups[*].GroupName' --output text); do
  echo "=== Group: $group ==="
  aws iam list-group-policies --group-name "$group"
  aws iam list-attached-group-policies --group-name "$group"
done

# Simulate specific API calls to map effective permissions
aws iam simulate-principal-policy \
  --policy-source-arn arn:aws:iam::ACCOUNT:user/test-user \
  --action-names iam:CreateUser iam:AttachUserPolicy iam:PassRole \
    lambda:CreateFunction ec2:RunInstances sts:AssumeRole \
  --query 'EvaluationResults[*].[EvalActionName,EvalDecision]' --output table

Step 2: Scan for Privilege Escalation Paths with Pacu

Use Pacu's privilege escalation scanner to identify known IAM escalation techniques.

# Start Pacu session
pacu

# Create session and set credentials
Pacu (new:session) > set_keys --key-alias privesc-test

# Enumerate IAM configuration
Pacu > run iam__enum_users_roles_policies_groups
Pacu > run iam__enum_permissions

# Run privilege escalation scanner
Pacu > run iam__privesc_scan

# The scanner checks for 21+ known escalation methods including:
# - iam:CreatePolicyVersion (create admin policy version)
# - iam:SetDefaultPolicyVersion (revert to permissive older version)
# - iam:AttachUserPolicy / iam:AttachRolePolicy (attach admin policy)
# - iam:PutUserPolicy / iam:PutRolePolicy (create inline admin policy)
# - iam:PassRole + lambda:CreateFunction (Lambda with admin role)
# - iam:PassRole + ec2:RunInstances (EC2 with admin instance profile)
# - iam:CreateLoginProfile / iam:UpdateLoginProfile (set console password)
# - iam:CreateAccessKey (create keys for other users)
# - sts:AssumeRole (assume more privileged roles)
# - glue:CreateDevEndpoint + iam:PassRole (Glue with admin role)

Step 3: Map Privilege Escalation Graphs with PMapper

Use Principal Mapper to build a graph of all IAM principals and identify escalation edges.

# Collect IAM data for graph construction
pmapper graph create --account ACCOUNT_ID

# Query for paths to admin
pmapper query 'who can do iam:AttachUserPolicy with * on *'
pmapper query 'who can do sts:AssumeRole with arn:aws:iam::ACCOUNT:role/AdminRole'

# Find all principals that can escalate to admin
pmapper analysis

# Visualize the privilege escalation graph
pmapper visualize --filetype png

# Check specific escalation paths
pmapper query 'can arn:aws:iam::ACCOUNT:user/test-user do iam:CreatePolicyVersion with *'
pmapper query 'can arn:aws:iam::ACCOUNT:user/test-user do sts:AssumeRole with arn:aws:iam::ACCOUNT:role/*'

Step 4: Test Cross-Account Role Assumption

Evaluate cross-account trust policies for misconfigured role assumptions that allow unauthorized escalation.

# List all roles and their trust policies

…
Häufige Fragen

Was ist „Privilege Escalation“?

Damit ist gemeint, dass ein Benutzer oder Programm mit eingeschränkten Rechten höhere Rechte erlangt, etwa die eines Administrators.

Brauche ich eine Erlaubnis, um dieses Tool zu nutzen?

Ja, du brauchst unbedingt eine schriftliche Genehmigung, bevor du ein AWS-Konto auf Sicherheitslücken testest.

Welche Tools kommen zum Einsatz?

Die wichtigsten Tools sind Pacu, CloudFox und Principal Mapper, zusammen mit AWS-CLI-Befehlen.

Details

Originalbeschreibung des Autors

Performing authorized privilege escalation assessments in AWS environments to identify IAM misconfigurations that allow users or roles to elevate their permissions using Pacu, CloudFox, Principal Mapper, and manual IAM policy analysis techniques. '

repo: mukul975/Anthropic-Cybersecurity-Skills

Beliebtheit

GitHub-Sterne
35k
Platz im Ranking
#8191
Lizenz
Apache-2.0
Aktualisiert
31.8.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills