sickn33/antigravity-awesome-skills/aws-penetration-testing
Claude Code and agent skill by sickn33/antigravity-awesome-skills
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install sickn33/antigravity-awesome-skills/aws-penetration-testingSKILL.md
⚠️ AUTHORIZED USE ONLYThis skill is for educational purposes or authorized security assessments only.You must have explicit, written permission from the system owner before using this tool.Misuse of this tool is illegal and strictly prohibited.
Mandatory confirmation gateBefore running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:1. Ask the user to state the exact target URL, IP, account, or resource.2. Ask the user to confirm written authorization and the permitted scope.3. Show the exact command(s) and explain their expected effect.4. Wait for explicit confirmation in the current conversation.Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.
AUTHORIZED USE ONLY: Use this skill only for authorized security assessments, defensive validation, or controlled educational environments.
AWS Penetration Testing
Purpose
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.
Inputs/Prerequisites
- AWS CLI configured with credentials
- Valid AWS credentials (even low-privilege)
- Understanding of AWS IAM model
- Python 3, boto3 library
- Tools: Pacu, Prowler, ScoutSuite, SkyArk
Outputs/Deliverables
- IAM privilege escalation paths
- Extracted credentials and secrets
- Compromised EC2/Lambda/S3 resources
- Persistence mechanisms
- Security audit findings
Essential Tools
| 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 |
Core Workflow
Step 1: Initial Enumeration
Identify the compromised identity and permissions:
Step 2: IAM Enumeration
Step 3: Metadata SSRF (EC2)
Exploit SSRF to access metadata endpoint (IMDSv1):
For IMDSv2 (token required):
Fargate Container Credentials:
Privilege Escalation Techniques
Shadow Admin Permissions
These permissions can enable escalation only when their allowed resources, conditions and effective policies permit the chain. They are not inherently administrator-equivalent:
| 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 |
Create Access Key for Another User
Attach Admin Policy
Add Inline Admin Policy
Lambda Privilege Escalation
S3 Bucket Exploitation
Bucket Discovery
Bucket Enumeration
Public Bucket Search
Lambda Exploitation
SSM Command Execution
Systems Manager allows command execution on EC2 instances:
EC2 Exploitation
Mount EBS Volume
Shadow Copy Attack (Windows DC)
Console Access from API Keys
Convert CLI credentials to console access:
Logging-control validation in a disposable lab
Preserve audit evidence
Do not change user agents or disable logging to evade detection. A user agent alone does not establish whether GuardDuty alerts will fire; validate detections with the monitoring owner. The commands above are destructive configuration examples for a separately approved disposable lab, not cleanup steps.
Quick Reference
| Task | Command | |
|---|---|---|
| Get identity | aws sts get-caller-identity | |
| List users | aws iam list-users | |
| List roles | aws iam list-roles | |
| List buckets | aws s3 ls | |
| List EC2 | aws ec2 describe-instances | |
| List Lambda | aws lambda list-functions | |
| Get metadata | curl http://169.254.169.254/latest/meta-data/ |
Constraints
Must:
- Obtain written authorization before testing
- Document all actions for audit trail
- Test in scope resources only
Must Not:
- Modify production data without approval
- Leave persistent backdoors without documentation
- Disable security controls permanently
Should:
- Check for IMDSv2 before attempting metadata attacks
- Enumerate thoroughly before exploitation
- Clean up test resources after engagement
Examples
Example 1: SSRF to Admin
Troubleshooting
| Issue | Solution | |
|---|---|---|
| Access Denied on all commands | Enumerate permissions with enumerate-iam | |
| Metadata endpoint blocked | Check for IMDSv2, try container metadata | |
| GuardDuty alerts | Coordinate expected test alerts and preserve evidence with the monitoring owner | |
| Expired credentials | Re-fetch from metadata (temp creds rotate) | |
| CloudTrail logging actions | Preserve logging and review test events with the monitoring owner |
Additional Resources
For advanced techniques including Lambda/API Gateway exploitation, Secrets Manager & KMS, Container security (ECS/EKS/ECR), RDS/DynamoDB exploitation, VPC lateral movement, and security checklists, see references/advanced-aws-pentesting.md.
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Effective-access and evidence limits
Inventory commands are not proof of exploitability. Account for explicit denies, SCPs/RCPs, boundaries, session policies, resource policies, conditions and service prerequisites. Updating Lambda code uses its execution role only when the code is actually invoked; iam:PassRole needs a compatible trusted service and a usable role. IMDSv2 requires the SSRF primitive to support the token PUT and required headers; the local curl example does not establish a remote bypass. A role name such as AdminRole proves no permission level.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/aws-penetration-testing/SKILL.md
Popularity
- Repository stars
- 35,120
- Repository forks
- 5,784
- Repository npm downloads, 7 days
- 8,241
- 7-day trend score
- 74
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 26 Apr 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sickn33/antigravity-awesome-skills/aws-penetration-testing)