|
| 1 | +--- |
| 2 | +name: pacu-aws-exploitation |
| 3 | +description: AWS exploitation and post-compromise validation with Pacu. Use when an authorized web test yields AWS credentials, cloud metadata access, SSRF-to-AWS impact, exposed AWS keys, or an explicit request to assess an AWS account with Pacu. |
| 4 | +allowed-tools: bash |
| 5 | +--- |
| 6 | + |
| 7 | +# Pacu -- AWS Exploitation Framework |
| 8 | + |
| 9 | +Pacu is an AWS exploitation framework for authorized cloud security testing. Use it only when the engagement scope explicitly includes the AWS account or when a confirmed web vulnerability produces AWS credentials or metadata access that must be validated for impact. |
| 10 | + |
| 11 | +## When to Use |
| 12 | + |
| 13 | +- SSRF confirms access to AWS metadata and yields temporary credentials. |
| 14 | +- Source, logs, CI output, client bundles, or config files expose AWS access keys. |
| 15 | +- A target owner provides AWS credentials for an authorized cloud assessment. |
| 16 | +- You need to prove concrete AWS impact after a web finding, such as IAM privilege escalation paths, Lambda exposure, S3 access, or current principal identity. |
| 17 | + |
| 18 | +## When Not to Use |
| 19 | + |
| 20 | +- The target scope excludes cloud infrastructure or AWS account testing. |
| 21 | +- You only have a public AWS account ID, ARN, bucket name, or hostname without authorization or credentials. |
| 22 | +- You can prove the web vulnerability impact without touching AWS APIs. |
| 23 | + |
| 24 | +## Setup |
| 25 | + |
| 26 | +Pacu is installed as the `pacu` CLI. It stores sessions locally. Use a descriptive session name tied to the engagement or finding ID. |
| 27 | + |
| 28 | +```bash |
| 29 | +pacu --help |
| 30 | +pacu --session target-ssrf-l003 --pacu-help |
| 31 | +``` |
| 32 | + |
| 33 | +If you have temporary credentials, set them inside Pacu with `set_keys`, including the session token. Do not print secrets in the transcript; use existing credential storage or environment variables where possible. |
| 34 | + |
| 35 | +## Core Commands |
| 36 | + |
| 37 | +| Command | Purpose | |
| 38 | +|---------|---------| |
| 39 | +| `pacu --list-modules` | List modules without requiring a session | |
| 40 | +| `pacu --session <name> --whoami` | Identify the active AWS principal | |
| 41 | +| `pacu --session <name> --module-name <module> --module-info` | Inspect module behavior before running it | |
| 42 | +| `pacu --session <name> --module-name <module> --exec` | Execute a module | |
| 43 | +| `pacu --session <name> --data all` | Review locally collected data | |
| 44 | + |
| 45 | +## Safe Workflow |
| 46 | + |
| 47 | +1. Confirm scope before making AWS API calls. |
| 48 | +2. Identify the principal first with `--whoami`. |
| 49 | +3. Inspect module docs with `--module-info` before execution. |
| 50 | +4. Prefer read-only enumeration modules before exploit or mutation modules. |
| 51 | +5. Record the exact module, region set, and output that proves impact. |
| 52 | + |
| 53 | +## Patterns |
| 54 | + |
| 55 | +```bash |
| 56 | +# List modules. |
| 57 | +pacu --list-modules |
| 58 | + |
| 59 | +# Identify the active principal for a named session. |
| 60 | +pacu --session target-ssrf-l003 --whoami |
| 61 | + |
| 62 | +# Inspect a module before running it. |
| 63 | +pacu --session target-ssrf-l003 \ |
| 64 | + --module-name iam__enum_permissions \ |
| 65 | + --module-info |
| 66 | + |
| 67 | +# Run a scoped module after confirming it is appropriate. |
| 68 | +pacu --session target-ssrf-l003 \ |
| 69 | + --module-name iam__enum_permissions \ |
| 70 | + --exec |
| 71 | +``` |
| 72 | + |
| 73 | +## Evidence Standard |
| 74 | + |
| 75 | +For a web-security report, Pacu output is supporting evidence for the original web finding. Tie the AWS result back to the web primitive: which request exposed credentials, which Pacu principal was authenticated, and which AWS permission or data access proves impact. |
0 commit comments