exploiting-aws-with-pacu
Lets your agent perform security tests in AWS environments, simulating attacks to find weaknesses. Helps assess the impact of compromised credentials and improve security.
What it does
This tool helps test the security of AWS cloud accounts. It looks for ways to gain more permissions (privilege escalation) and can create secret access points for you to return later (persistence).
When to use it
- ✓When conducting an authorized security test on an AWS account.
- ✓To see what an attacker could do with a stolen credential.
- ✓To demonstrate how to better protect accounts against unauthorized access.
Example of what to ask your AI
“Run a full security test on my AWS account and tell me if there are any weaknesses.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool connects to your AWS account using your credentials and checks all permissions. It looks for known paths to gain more access and can create new access keys or permissions to maintain access.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill exploiting-aws-with-pacuOr download just the file:
curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/exploiting-aws-with-pacu/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Exploiting AWS with Pacu
Legal Notice: This skill is for authorized penetration testing and educational purposes only. Pacu performs active enumeration, privilege escalation, persistence, and backdooring against live AWS accounts. Run it ONLY against accounts you own or have explicit written authorization (scope/Rules of Engagement) to test. Many modules create durable changes (new IAM users, access keys, policies); track and remove everything. Unauthorized use is illegal under the CFAA and equivalent laws.
Overview
Pacu is the open-source AWS exploitation framework from Rhino Security Labs. It is the cloud-pentest analogue of Metasploit: a modular Python console that manages target sessions, enumerates an AWS account, identifies privilege-escalation paths, and executes persistence/backdooring/exfiltration modules — all backed by a local SQLite database that records every enumerated resource so modules can chain off one another's findings.
A Pacu engagement follows a consistent arc. You create a named session, load AWS keys (with set_keys or by importing from ~/.aws/credentials), confirm the identity with whoami, then enumerate IAM and the rest of the account. The flagship workflow is iam__enum_permissions followed by iam__privesc_scan, which checks the compromised principal against ~20 known AWS IAM privilege-escalation primitives (e.g. iam:CreatePolicyVersion, iam:AttachUserPolicy, iam:PassRole + lambda:CreateFunction, sts:AssumeRole) and can auto-exploit them. Persistence modules such as iam__backdoor_users_keys mint a second access key on an existing user, and iam__backdoor_assume_role adds a trust to a role so the attacker can assume it later.
This skill covers installing Pacu, session and credential management, IAM enumeration, automated privilege-escalation scanning and exploitation, persistence/backdooring, and data access — every command and module name verified against the Rhino Security Labs project. Source: github.com/RhinoSecurityLabs/pacu.
When to Use
- Conducting an authorized AWS cloud penetration test or red-team engagement
- Assessing the blast radius of a single compromised IAM credential (privesc scanning)
- Demonstrating persistence/backdoor techniques to drive remediation
- Generating realistic attacker telemetry to test cloud detections (purple team)
- Mapping an unfamiliar AWS account's IAM, EC2, S3, and Lambda exposure
Prerequisites
- Pacu installed:
python3 -m pip install -U pip python3 -m pip install -U pacu # then run: pacu # or, preferred on Kali, with pipx: pipx install git+https://github.com/RhinoSecurityLabs/pacu.git # or Docker: docker run -it rhinosecuritylabs/pacu:latest - AWS access key/secret (and optional session token) for the in-scope target principal
- A signed authorization / Rules of Engagement document defining scope
- Python 3.9+ and outbound HTTPS to AWS API endpoints
- AWS CLI installed for verification (
aws sts get-caller-identity)
Objectives
- Install Pacu and create an isolated engagement session
- Load and validate target AWS credentials
- Enumerate IAM permissions for the compromised principal
- Identify and (where authorized) exploit privilege-escalation paths
- Establish persistence via backdoor access keys and role trusts
- Enumerate and access data in EC2, S3, and Secrets Manager
- Export findings for reporting and ensure all artifacts are removed
MITRE ATT&CK Mapping
| ID | Name | Use in this skill |
|---|---|---|
| T1078.004 | Valid Accounts: Cloud Accounts | Pacu operates as a valid AWS principal and abuses its permissions |
| T1098.001 | Account Manipulation: Additional Cloud Credentials | iam__backdoor_users_keys mints a second access key |
| T1098.003 | Account Manipulation: Additional Cloud Roles | iam__backdoor_assume_role / privesc via role policy changes |
| T1580 | Cloud Infrastructure Discovery | ec2__enum, iam__enum_users_roles_policies_groups |
| T1530 | Data from Cloud Storage | s3__download_bucket retrieves S3 objects |
| T1552.005 | Unsecured Credentials: Cloud Instance Metadata API | EC2 IMDS credential abuse |
Workflow
1. Launch Pacu and create a session
pacu
# In the Pacu console:
Pacu> set_keys
# key alias : engagement-target
# access key : AKIA...
# secret key : ...
# session tok: (optional)
2. Confirm the identity you are operating as
Pacu> whoami
…
FAQ
Do I need permission to use this tool?
Yes, you should only use this tool on AWS accounts that you own or have explicit written authorization to test. Using it without permission is illegal.
What is 'privilege escalation'?
It's when a user or program with limited access manages to gain more permissions than they should, like an ordinary employee getting access to the director's files.
What does 'persistence' mean in this context?
It means creating a way to maintain access to the AWS account even if the original credential is discovered or revoked, like leaving a 'backdoor' open.
Details
Original description by the author
Runs the Pacu AWS exploitation framework end-to-end — session and credential setup, IAM enumeration, automated privilege-escalation scanning via iam__privesc_scan, and persistence/backdooring modules like iam__backdoor_users_keys. Use for authorized AWS penetration tests or red-team engagements, assessing blast radius from a compromised IAM credential, or generating attacker telemetry for purple-t
Popularity
- GitHub stars
- 35k
- Ranking position
- #5676
- License
- Apache-2.0
- Updated
- 8/31/2026
Comments
- …
More skills from this repository
abusing-dpapi-for-credential-access
Gives your AI agent ready-made instructions for a specific task, so it does it better and faster.
mukul975/Anthropic-Cybersecurity-Skills
abusing-shadow-credentials-for-privesc
Teaches your AI agent to write clear, well-structured text.
mukul975/Anthropic-Cybersecurity-Skills
achieving-cmmc-level-2-compliance
Helps your agent prepare an environment for CMMC Level 2 compliance. It implements security requirements and manages necessary documentation.
mukul975/Anthropic-Cybersecurity-Skills
acquiring-disk-image-with-dd-and-dcfldd
Helps your agent create exact copies of hard drives. This is useful for ensuring no information is lost or altered during investigations.
mukul975/Anthropic-Cybersecurity-Skills
Similar skills
benchmark-optimization-loop
Has your agent improve something's speed in a measured way. It tests multiple versions and chooses the fastest one that still works correctly.
affaan-m/ECC
change-impact
Helps your agent analyze the impact of code changes before making them. It compares the planned vs. actual results afterward, covering paths, data, tests, and documentation. Useful for risky or system-wide changes.
affaan-m/ECC
click-path-audit
Lets your agent trace all user buttons and interactions to find bugs. It finds issues where functions seem to work alone but fail together. Useful when bugs persist even after debugging.
affaan-m/ECC