snailsploit/claude-red/offensive-cloud
Claude Code and agent skill by snailsploit/claude-red
- community
Checking that the SKILL.md file is still in the repository.
Cloud security attack methodology covering AWS, Azure, and GCP. Includes credential harvesting (IMDS, ~/.aws, env vars, leaked CI secrets, instance roles), enumeration with cloud-specific tools (pacu, ScoutSuite, Prowler, ROADtools, gcp_enum), privilege escalation paths (IAM PassRole, AssumeRole chains, Lambda/Functions privilege flips, Azure Owner-on-self, GCP serviceAccountTokenCreator), persistence techniques (IAM user/key creation, AAD app registration, GCP svc account key creation, EventBridge/Logic Apps backdoors), data exfiltration (S3/Blob/GCS, snapshot share, RDS/CosmosDB/Cloud SQL exfil), cloud-native lateral movement (cross-account assume, Azure AD multi-tenant, GCP project hierarchy), serverless attacks (Lambda env vars, layer hijack, Step Functions), Kubernetes-on-cloud (EKS/AKS/GKE-specific paths to node and AWS metadata), and CSPM evasion (CloudTrail blind spots, GuardDuty mute, Sentinel rule shaping). Use when the engagement scope is cloud accounts, when you've stolen cloud credentials, or when assessing cloud posture.
Install
npx vskill@latest install snailsploit/claude-red/offensive-cloudSKILL.md
The same SKILL.md was published earlier as snailsploit/claude-red/offensive-cloud.
Cloud (AWS / Azure / GCP) — Offensive Testing Methodology
Quick Workflow
- Identify the cloud and the identity context you have (user, role, service account, instance role)
- Enumerate without writes —
aws sts get-caller-identity,az account show,gcloud auth list - Map permissions to known privilege-escalation primitives (PassRole, Owner, etc.)
- Find the data and the persistence anchors before alarms fire
- Document the kill chain with timestamps, identities, and resources for the report
AWS
Identity Discovery
IMDS Credential Theft
From SSRF, IMDSv2 was historically reachable when the SSRF allowed setting custom headers. Modern AWS denies SSRF without Host: 169.254.169.254 and proper PUT-then-GET flow — SSRF in 2024+ rarely yields IMDSv2 unless the proxy reflects custom headers.
Privilege Escalation Paths
| Path | Required Permission | Outcome | |
|---|---|---|---|
iam:PassRole + lambda:CreateFunction | Pass any role to Lambda you create | Run code as that role | |
iam:PassRole + ec2:RunInstances | Pass any role to EC2 instance | IMDS → role creds | |
iam:CreatePolicyVersion + iam:SetDefaultPolicyVersion | Edit your own policy | Self-elevate | |
iam:UpdateAssumeRolePolicy | On a privileged role | Add yourself as principal | |
iam:CreateLoginProfile (on user without one) | Set console password | Console access | |
iam:CreateAccessKey (on another user) | Mint keys for someone else | Persistent access | |
sts:AssumeRole with sts:TagSession to ABAC role | If role trusts session tags | Tag-based escalation | |
cloudformation:CreateStack + permissive role | Run any service action | Indirect arbitrary perms | |
glue:UpdateDevEndpoint | Inject SSH key into Glue endpoint | Code exec as Glue role | |
ssm:SendCommand to any instance | RCE on instances + their roles | Lateral + escalation |
Cross-Account / Organization
Data Targets
Persistence
Detection Evasion
- CloudTrail to multi-region with log file validation — disable validation if you have perms
- GuardDuty findings can be muted via
update-findings-feedbackif you have the permission (rare in prod) - VPC Flow Logs only catch IP traffic; control-plane API calls are CloudTrail-only
Azure
Identity Discovery
IMDS
Privilege Escalation Paths
| Path | Required Role / Permission | Outcome | |
|---|---|---|---|
| User Access Administrator on self/sub | Grant self Owner | Subscription Owner | |
| App Registration owner | Add cert/secret, mint app-only tokens | App's permissions | |
| Virtual Machine Contributor + Reader on KV | Run command on VM with MSI → KV | Secrets | |
Custom role with */write on RBAC | Edit role assignments | Self-elevate | |
| Logic App contributor | Edit workflow → privileged action | Indirect any action | |
| Automation Account contributor | RunBook with Run-As account | Run as RunAs identity | |
AAD Application Administrator | Assign app to high-priv role | Cloud admin via app | |
AAD Cloud Application Administrator | Same minus on-prem | Cloud admin | |
AAD Directory Synchronization Account | DCSync via AAD Connect | All on-prem hashes | |
| Privileged Authentication Administrator | Reset MFA / passwords for Globals | Global Admin reset |
Data Targets
Persistence
Detection Evasion
- AAD Audit Log: tenant-level, can't be tampered with from below Global Admin
- Microsoft Sentinel: rule shaping if you have Workbook / Analytics Rule write
- Defender for Cloud: alert suppression rules
GCP
Identity Discovery
IMDS
Privilege Escalation Paths
| Path | Required Permission | Outcome | |
|---|---|---|---|
iam.serviceAccountTokenCreator on SA | Mint tokens as SA | SA's perms | |
iam.serviceAccountUser + compute.instances.create | Pass SA to new VM | Run as SA via IMDS | |
iam.serviceAccountKeyAdmin | Create JSON key for any SA | Persistent SA creds | |
cloudbuild.builds.create | Build runs as Cloud Build SA (often Editor) | Editor on project | |
deploymentmanager.deployments.create | Runs as DM SA (often Owner) | Owner | |
cloudfunctions.functions.create + actAs | Pass any SA to function | Run as that SA | |
dataflow.jobs.create + actAs | Same pattern | SA's perms | |
iam.roles.update (custom roles) | Add permissions to a role you have | Self-elevate | |
resourcemanager.projects.setIamPolicy | Grant self any role | Owner |
Data Targets
Cross-Project / Folder Pivot
Cross-Cloud Patterns
CI/CD as the Pivot
Most cloud takeovers in 2024-2025 start with CI tokens:
- GitHub Actions OIDC misconfigured → assume any AWS role with weak
subclaim - GitLab CI pushed to wrong branch → gains prod role
- Jenkins agent with cloud credentials in env
Test the OIDC trust policy claims carefully:
Snapshot Sideways (works on all 3)
Take a snapshot of a victim VM/disk → share or mount it under a controlled account → extract data offline. Bypasses host-level guardrails.
Secrets-in-Logs
CloudTrail / Activity Log / Cloud Audit Logs sometimes log request bodies. Look for SaaS integrations that POST API keys — they may end up in audit logs.
Container Registry Poisoning
ECR/ACR/Artifact Registry — if you have push perms on a tag in use by production, replace the image. Tag mutability is the bug.
Tooling Matrix
| Tool | AWS | Azure | GCP | Use | |
|---|---|---|---|---|---|
| ScoutSuite | ✓ | ✓ | ✓ | Posture audit | |
| Prowler | ✓ | ✓ | ✓ | CIS/PCI checks | |
| Pacu | ✓ | Offensive framework | |||
| CloudGoat | ✓ | Vulnerable lab | |||
| BloodHound + AzureHound | ✓ | Graph-based escalation | |||
| ROADtools | ✓ | AAD recon + offline analysis | |||
| MicroBurst | ✓ | PS-based offensive | |||
| Stormspotter | ✓ | MS' own offensive enum | |||
| gcp_scanner | ✓ | Token-based recon | |||
| GCPBucketBrute | ✓ | GCS bucket discovery |
Engagement Cheatsheet
Key References
- AWS IAM permissions reference (boto3 docs)
- Azure RBAC built-in roles + actions list
- GCP IAM permissions reference
- HackTricks Cloud — ongoing reference for newest paths
- "Pacu" framework docs — pacu.aws.cloud
- MITRE ATT&CK Cloud Matrix
- Source: https://github.com/SnailSploit/offensive-checklist/blob/main/cloud.md
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/cloud/offensive-cloud/SKILL.md
Popularity
- Repository stars
- 1,288
- Repository forks
- 221
- 7-day trend score
- 36
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 May 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/snailsploit/claude-red/offensive-cloud)