Cloud Security logo

Cloud Security

Community
hypnguyen1209
cloud-security

Use when attacking AWS/Azure/GCP cloud — IAM/identity privilege escalation, IMDS/metadata SSRF, Entra device-code & PRT theft, GCP impersonation chains, Kubernetes/container escape, IaC/CI-CD federation abuse

Overview

Publisherhypnguyen1209
Repositoryoffensive-claude
Skill namecloud-security
Stars
396
Forks
71
Bundled files
12
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 12 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by hypnguyen1209 on GitHub. Read the source before you install it.

Installation

Install the Cloud Security AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/hypnguyen1209/offensive-claude/tree/main/skills/cloud-security
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hypnguyen1209/offensive-claude.git /tmp/offensive-claude
mkdir -p .claude/skills
cp -r /tmp/offensive-claude/skills/cloud-security .claude/skills/cloud-security
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cloud Security in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cloud Security on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cloud Security is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Cloud Security & Attack

When to Activate

  • Cloud penetration test / red team against AWS, Azure (Entra ID), or GCP
  • IAM / identity privilege escalation and cross-account or cross-tenant pivoting
  • Compromised web app or SSRF reachable from cloud compute — harvest metadata credentials
  • Kubernetes / container assessment, node breakout, cluster takeover
  • CI/CD and IaC review: Terraform state, OIDC federation trust policies, pipeline secrets
  • Post-exploitation: secret extraction, lateral movement, persistence in cloud control plane

Technique Map

TechniqueATT&CKCWEReferenceScript
AWS IAM privesc (CreatePolicyVersion, PassRole, AttachPolicy)T1098.001CWE-269references/aws-iam-privesc.mdscripts/aws_privesc_enum.py
AWS sts:AssumeRoot member-account escalationT1078.004CWE-269references/aws-iam-privesc.mdscripts/aws_privesc_enum.py
Cross-account confused deputy / missing ExternalIdT1078.004CWE-441references/aws-iam-privesc.mdscripts/oidc_trust_auditor.py
IMDS / metadata SSRF credential theft (AWS/Azure/GCP)T1552.005CWE-918references/imds-metadata-ssrf.mdscripts/imds_harvester.py
EKS node creds → IRSA / Pod Identity pivotT1552.007CWE-668references/imds-metadata-ssrf.mdscripts/imds_harvester.py
Entra device-code phishing → PRT / device joinT1528CWE-287references/azure-entra-attacks.mdscripts/entra_device_code_phish.py
FOCI refresh-token family abuseT1550.001CWE-613references/azure-entra-attacks.mdscripts/entra_device_code_phish.py
Azure Managed Identity / App-Admin → SP escalationT1098.001CWE-269references/azure-entra-attacks.mdscripts/imds_harvester.py
GCP actAs + resource create impersonation chainT1078.004CWE-269references/gcp-attacks.mdscripts/gcp_impersonation_mapper.py
GCP serviceAccountTokenCreator token chainsT1528CWE-269references/gcp-attacks.mdscripts/gcp_impersonation_mapper.py
Vertex AI P4SA / Ray head-node escalationT1078.004CWE-732references/gcp-attacks.mdscripts/gcp_impersonation_mapper.py
Container escape (runc Leaky Vessels CVE-2024-21626)T1611CWE-668references/kubernetes-container-escape.md-
IngressNightmare (CVE-2025-1974) cluster takeoverT1190CWE-94references/kubernetes-container-escape.mdscripts/k8s_can_i_abuse.py
K8s RBAC privesc (pods/exec, token mount, node proxy)T1078CWE-269references/kubernetes-container-escape.mdscripts/k8s_can_i_abuse.py
Terraform state secret extractionT1552.001CWE-312references/iac-secrets-ci-cd.mdscripts/oidc_trust_auditor.py
OIDC federation trust-policy abuse (GitHub/TF Cloud)T1199CWE-441references/iac-secrets-ci-cd.mdscripts/oidc_trust_auditor.py

Quick Start

bash
# --- 0. Identify where you are ---
aws sts get-caller-identity                       # AWS
az account show && az ad signed-in-user show      # Azure
gcloud auth list && gcloud config get-value project  # GCP

# --- 1. AWS: enumerate then map privesc paths ---
python3 scripts/aws_privesc_enum.py --profile compromised --json paths.json
cloudfox aws --profile compromised all-checks      # alt: broad inventory
pacu  # > run iam__enum_permissions ; run iam__privesc_scan

# --- 2. SSRF / metadata: harvest creds from a reachable compute target ---
python3 scripts/imds_harvester.py --ssrf "https://app/fetch?url=" --provider aws
python3 scripts/imds_harvester.py --local --provider azure --resource https://vault.azure.net/

# --- 3. Azure Entra: device-code phish for tokens (authorized phishing only) ---
python3 scripts/entra_device_code_phish.py --resource https://graph.microsoft.com \
    --client-id 29d9ed98-a469-4536-ade2-f981bc1d605e   # Auth Broker -> PRT path

# --- 4. GCP: build the service-account impersonation graph ---
python3 scripts/gcp_impersonation_mapper.py --project TARGET --out gcp_graph.json

# --- 5. Kubernetes: what can this token do, and can we break out? ---
python3 scripts/k8s_can_i_abuse.py --kubeconfig ./kubeconfig
kubectl auth can-i --list ; peirates

# --- 6. CI/CD + IaC: audit federation trust + dump state secrets ---
python3 scripts/oidc_trust_auditor.py --profile compromised
aws s3 cp s3://tf-state/prod/terraform.tfstate - | jq '.. | .password? // empty'

OPSEC & Detection (summary)

TechniqueTelemetry / IOCDetection (Sigma / EDR / cloud)OPSEC note
IAM privesc API callsCloudTrail CreatePolicyVersion, AttachUserPolicy, CreateLoginProfileAlert on IAM write by non-IAM-admin principal; GuardDuty PrivilegeEscalation:IAMUser/*Use existing admin sessions; avoid bulk enum that trips anomaly detection
sts:AssumeRootCloudTrail AssumeRoot (regional only)Elastic "AssumeRoot by Rare User and Member Account" (new-terms rule)Rare-event detection fires on first use per (principal, member account)
IMDS SSRFVPC flow to 169.254.169.254 from web tier; STS use from new ASNGuardDuty UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration* (creds used off-instance)Use creds from same egress IP where possible; creds expire — refresh fast
Entra device-code phishSign-in logs authenticationProtocol=deviceCode; Auth Broker client 29d9ed98-...; new device registrationSentinel device-code anomaly; CA "block device code flow"Tokens valid even after password reset; device-join = MFA-resistant persistence
GCP impersonationGenerateAccessToken / generateAccessToken in Admin Activity + Data Access logsAlert on impersonation by principal lacking a documented chainRequires Data Access (DATA_READ) audit logs enabled to see token minting
Container escape (runc)New process from /proc/self/fd/* cwd; host binary writes; nsenter in containerFalco Container escape/Drop and execute new binary; runc ≤1.1.11 inventoryOverwrites host runc → noisy; prefer read-only host FS read for stealth
IngressNightmareNGINX ingress pod loads .so from /proc; outbound from controllerFalco/Sysdig "IngressNightmare" shared-lib load; ingress-nginx < 1.11.5/1.12.1Exploit hits admission webhook (often internal-only) — low external noise
OIDC trust abuseCloudTrail AssumeRoleWithWebIdentity from unexpected sub/repoAlert on web-identity assume with mismatched aud/sub; RCP blockWildcard sub (org:foo*) still exploitable; no creds needed

Deep Dives

  • references/aws-iam-privesc.md — Classic + 2024 IAM escalation chains, sts:AssumeRoot, cross-account confused deputy / ExternalId, Cognito, secrets harvesting; detection per API.
  • references/imds-metadata-ssrf.md — IMDSv1/v2 mechanics, SSRF bypasses, Azure & GCP metadata token theft, EKS node-cred → IRSA/Pod Identity lateral movement.
  • references/azure-entra-attacks.md — Storm-2372 device-code → PRT → device-join chain, FOCI token families, Managed Identity abuse, Application Administrator → service principal → Global Admin.
  • references/gcp-attacks.md — actAs + resource-create impersonation, serviceAccountTokenCreator chains, Cloud Functions takeover, Vertex AI ModeLeak/P4SA/Ray escalation.
  • references/kubernetes-container-escape.md — runc Leaky Vessels (CVE-2024-21626), privileged/hostPID/Docker-socket escapes, IngressNightmare (CVE-2025-1974), RBAC primitives, kubelet/etcd.
  • references/iac-secrets-ci-cd.md — Terraform state secret extraction, OIDC federation trust-policy abuse (GitHub Actions / Terraform Cloud), pipeline secret theft, RCP/SCP defenses.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Cloud Security AI skill do?

Use when attacking AWS/Azure/GCP cloud — IAM/identity privilege escalation, IMDS/metadata SSRF, Entra device-code & PRT theft, GCP impersonation chains, Kubernetes/container escape, IaC/CI-CD federation abuse

Why use Cloud Security on TypingMind?

Because you install it once and use it with any model. Cloud Security is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cloud Security in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hypnguyen1209/offensive-claude/tree/main/skills/cloud-security. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Cloud Security?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cloud Security?

As many as you like. As long as a model supports skills, you can use Cloud Security with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cloud Security AI skill free?

Yes. It is published on GitHub by hypnguyen1209 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇