Kalp1774/akira
GitHub: Kalp1774/akira
一个阶段化、证据驱动的 AI 渗透测试协作者,解决自动化安全测试中的幻觉与阶段断裂问题。
Stars: 7 | Forks: 1

[](https://github.com/Kalp1774/akira)
[](https://github.com/Kalp1774/akira/stargazers)
[](https://github.com/Kalp1774/akira/network/members)
[](https://github.com/Kalp1774/akira/issues)
[](https://github.com/Kalp1774/akira/commits/main)
[](LICENSE)
[](#skills)
[](CONTRIBUTING.md)
**[Install in 30 seconds](#install) - [See Real Findings](#proof-it-works) - [Compare vs Competitors](#why-not-pentestgpt) - [Roadmap](#roadmap)**

## 什么是 Akira?
Akira 是一个完整的进攻性安全技能套件,**原生运行在你的 AI 编码环境中**。
- 无需服务器。
- 无需预装 40 个工具的混乱环境。
- 无幻觉的检测结果。
**六个阶段。一条链路。一个可交付的报告。**
```
/plan-engagement -> /recon -> /secrets -> /exploit -> /zerodayhunt -> /triage -> /report
```
每个阶段读取前一阶段的**结构化输出**,并为下一阶段写入数据。
每个发现都需要**直接的 HTTP 证据**。没有证据 = 没有发现。永远如此。
## 为何不是 PentestGPT?
PentestGPT 拥有 12k 星标,但存在**文档化的幻觉问题**。
HexStrike 有工具覆盖,但**缺少阶段间交接**。
Trail of Bits 有 CI/CD 覆盖,但**缺少完整的参与生命周期**。
**Akira 具备所有能力,且没有它们的弱点。**
| Capability | PentestGPT | HexStrike | Trail of Bits | **Akira** |
|---|:---:|:---:|:---:|:---:|
| Full 6-phase engagement lifecycle | Partial | - | - | **YES** |
| Phase artifact handoffs (session.json) | - | - | - | **YES** |
| Anti-hallucination evidence gate | - | - | - | **YES** |
| Confidence scoring per finding (0-100) | - | - | - | **YES** |
| False positive verification gate | - | - | Partial | **YES** |
| Active Directory full chain (BloodHound -> DCSync) | - | Partial | - | **YES** |
| OAuth/OIDC exploitation suite | - | - | - | **YES** |
| Race conditions (single-packet attack) | - | - | - | **YES** |
| Cloud audit (AWS + GCP + Azure + K8s) | - | Partial | - | **YES** |
| CI/CD GitHub Actions attack vectors | - | - | **YES** | Coming Month 2 |
| CTF mode (HackTheBox, TryHackMe) | **YES** | - | - | **YES** |
| Native in Claude Code, Gemini, Cursor | Partial | - | - | **YES** |
| One-command tool bootstrap | - | - | - | **YES** |
| Real bug bounty proof (updated weekly) | - | - | - | **YES** |
| Free + MIT | **YES** | Partial | **YES** | **YES** |
## 安装
**选项 1 — 克隆并安装技能(推荐):**
```
git clone https://github.com/Kalp1774/akira
cd akira && bash install.sh
```
**选项 2 — 同时安装工具(nuclei、dalfox、subfinder 等):**
```
git clone https://github.com/Kalp1774/akira
cd akira && bash install.sh && bash bootstrap.sh
```
仅此而已。打开 Claude Code(或你的 AI 环境),输入 `/plan-engagement target.com`,然后开始执行。
**验证安装:**
```
/plan-engagement example.com
```
你应该能看到参与计划以及已初始化的 session.json。
## 平台支持
| Platform | Install | Skill Syntax |
|---|---|---|
| **Claude Code** | `install.sh` copies to `~/.claude/skills/` | `/plan-engagement`, `/recon`, etc. |
| **Gemini CLI** | Add `platform-adapters/GEMINI.md` to skills path | `activate_skill plan-engagement` |
| **Cursor** | Copy `platform-adapters/.cursor/rules/akira.mdc` | Cursor rules auto-activate |
| **Codex (OpenAI)** | See `platform-adapters/.codex/INSTALL.md` | Reference via AGENTS.md |
| **GitHub Copilot CLI** | AGENTS.md pattern | Natural language trigger |
| **Any agent** | AGENTS.md in repo root | Plain text skill invocation |
## 技能
### 核心 7 阶段生命周期
| Skill | Phase | What It Does |
|---|---|---|
| `/plan-engagement` | 0 | 范围定义、PTT 生成、session.json 初始化 |
| `/recon` | 1 | 子域名、存活主机、端口、URL、技术栈指纹识别 |
| `/secrets` | 2 | API 密钥、令牌、凭据(JS/源码/Git/Postman) |
| `/exploit` | 3 | XSS(dalfox)、SQLi(sqlmap)、nuclei 扫描、反序列化、SSTI、XXE、NoSQLi |
| `/zerodayhunt` | 3+ | 链式攻击、JWT 混淆、SSRF→IAM、WAF 绕过、类型混淆 |
| `/triage` | 4 | 严重性聚类、置信度评分、假阳性验证、去重 |
| `/report` | 5 | 生成渗透测试报告或 HackerOne/Bugcrowd 提交格式 |
### 专项攻击模块
| Skill | What It Does |
|---|---|
| `/ad-attacks` | BloodHound 路径分析、Kerberoasting、AS-REP、DCSync、金票/银票、ADCS ESC1-8 |
| `/oauth-attacks` | 重定向 URI 绕过、OAuth 的 CSRF、PKCE 降级、JWT 混淆、隐式流令牌窃取 |
| `/race-conditions` | HTTP/2 单包攻击、优惠券重复使用、双重支付、OTP 绕过、TOCTOU |
| `/cloud-audit` | AWS SSRF→IAM、S3 枚举、IAM 权限提升、GCP 服务账号、Azure RBAC、K8s API |
| `/ctf` | HackTheBox/TryHackMe,Web/Crypto/Pwn/RE/Forensics/OSINT/Stego 方法论 |
## 阶段链如何工作
每个技能读取前一阶段的**结构化输出**。阶段之间不会丢失智能。
```
plan-engagement
writes -> session.json (target, scope, tech stack, attack priority tree)
recon
reads -> session.json
writes -> interesting_recon.md (live hosts, ports, URLs, headers)
secrets
reads -> interesting_recon.md
writes -> interesting_secrets.md (verified API keys, tokens, credentials)
exploit
reads -> interesting_recon.md + interesting_secrets.md
writes -> interesting_exploit.md (confirmed vulns with HTTP evidence)
zerodayhunt
reads -> ALL prior outputs
writes -> interesting_zerodayhunt.md (chains, zero-days, critical paths)
triage
reads -> ALL interesting_*.md files
writes -> triage.md (severity-clustered, confidence-scored, FP-verified)
report
reads -> triage.md + session.json
writes -> report-YYYY-MM-DD.md (final deliverable)
```
## 反幻觉系统
Akira 最大的技术差异化。**每个发现必须通过证据门控才能进入报告。**
**证据要求(每个技能强制执行):**
- 每个**已确认**的发现必须引用**确切的 HTTP 响应体**作为证明
- 空 200 响应体 = WAF 兜底 = **不是发现**
- `{"status":403}` 在 200 响应中 = WAF 拦截 = **不是发现**
- 仅存在头部并不意味着该头部可被利用
**置信度评分(0-100):**
| 分数 | 含义 |
|---|---|
| 90100 | 可重现、完整数据泄露或已证明的 RCE |
| 70-89 | 证据充分,但尚未完全串联 |
| 50-69 | 行为指标,无数据证明 |
| < 50 | 推测性 — 自动排除在报告之外 |
低于 70 的发现会被自动降级为 **POTENTIAL**,并从最终报告中排除。
## 证明它有效
使用 Akira 发现的真实匿名化结果。**每周更新。**
| # | Type | Severity | Platform | Bounty | Skill Chain |
|---|---|---|---|---|---|
| 1 | SSRF -> AWS IAM Credential Extraction | Critical | HackerOne | $2,500 | `/recon` -> `/exploit` -> `/cloud-audit` |
| 2 | OAuth Open Redirect -> Authorization Code Interception | Critical | Bugcrowd | $1,800 | `/recon` -> `/oauth-attacks` |
| 3 | Race Condition: Coupon Applied 7x Simultaneously | High | Private | $800 | `/race-conditions` |
| 4 | Strapi SSRF Bypass + MIME Fail-Open (CVE filed) | Critical | CVE | - | `/zerodayhunt` |
| 5 | JWT RS256->HS256 Algorithm Confusion -> Admin Access | Critical | HackerOne | $1,500 | `/zerodayhunt` |
## 路线图
Akira 每月发布新技能。以下是即将推出的内容:
**第 1 个月 — 已发布 (v1.0.0)**
- [x] 核心 7 阶段生命周期
- [x] ad-attacks(BloodHound -> DCSync 完整链路)
- [x] oauth-attacks(开放重定向 -> ATO 链)
- [x] race-conditions(HTTP/2 单包攻击)
- [x] cloud-audit(AWS/GCP/Azure/K8s)
- [x] ctf(HTB/THM/PicoCTF)
- [x] 阶段交接系统(session.json)
- [x] 反幻觉证据门控
**第 2 个月 — 即将发布**
- [ ] `graphql` — 内省滥用、批量请求、字段级授权绕过
- [ ] `deserialization` — Java/PHP/Python/.NET 工具链(ysoserial、PHPGGC)
- [ ] `prototype-pollution` — Node.js 客户端 + 服务器 RCE 链
- [ ] `supply-chain` — 依赖混淆、命名空间抢占、拼写劫持
- [ ] `ci-cd-audit` — 9 个 GitHub Actions 攻击向量(Trail of Bits 方法论 + 扩展)
**第 3 个月 — 即将发布**
- [ ] Akira Context Engine — 自动为检测到的堆栈拉取 CVE 并关联 HackerOne 披露报告
- [ ] `cache-attacks` — 缓存中毒 + 缓存欺骗统一剧本
- [ ] `csp-bypass` — CSP 逃逸链、JSONP、Nonce 重用
**第 4 个月 — 即将发布**
- [ ] `mobile` — Android APK 分析、Firebase 配置错误、iOS IPA、Frida 证书 pinning 绕过
- [ ] `burp-integration` — 原生 Burp Suite MCP 集成(Repeater、Intruder、代理历史)
**第 6 个月 — 即将发布**
- [ ] Akira Brain — 跨会话的持久化攻击树、交叉会话记忆
- [ ] `postmap-recon` — PostmapDB 集成(泄露的 Postman 集合 -> 实时密钥)
- [ ] `red-team` — 完整 MITRE ATT&CK 模拟
## 底层引擎架构 — 技能之下的基础设施
以下四项基础设施升级将把 Akira 从优秀的技能套件升级为不可战胜的自主进攻引擎。它们不是新技能,而是基础重构。
### 1. Hacker-in-a-Box(Docker 化环境)
不再要求用户安装 50 个工具,Akira 以**单个容器**分发:
```
docker pull ghcr.io/kalp1774/akira-engine
docker run -it akira-engine /plan-engagement target.com
```
所有工具(nuclei、nmap、sqlmap、subfinder、dalfox、httpx、katana、trufflehog)均已预装、路径配置并版本锁定。AI 清楚自己拥有什么,用户无需安装任何内容。
**为何重要:** 当前的“安装 + 引导”模型在 Windows、WSL 和加固 macOS 上会失败。容器消除了整类“环境损坏”故障。它也让 CI/CD 安全测试变得简单——只需拉取并运行。
### 2. 本地信号过滤器(Token 节省器)
一个轻量级 Python 解析器在本地运行,**在输出到达 AI 之前提取仅含信号的数据**:
```
Raw nmap output: 5,000 lines → Parser → 12 lines sent to AI
Open 80 (Apache 2.4.49)
Open 443 (nginx/1.18)
CVE-2021-41773 detected
```
**为何重要:** API 成本降低约 90%。AI 的上下文窗口保持干净——没有 4,990 行关闭端口和时序噪音。更智能的决策,更低的账单。这是 $1 扫描与 $10 扫描在规模上的区别。
### 3. 隐身 Governor(WAF 智能反馈环)
一个实时监控器位于终端与 AI 之间。如果检测到连续 3 次 `403 Forbidden` 或 `429 Too Many Requests` 响应,它会自动暂停当前阶段并注入决策:
```
[STEALTH GOVERNOR] 3x 403 detected on api.target.com
Switching to residential proxy. Adding 5s delay. Resuming with --rate-limit 10.
```
**为何重要:** 目前 Akira 会持续运行直到被封禁。Governor 将其变为耐心的猎手——实时学习目标的 WAF 指纹、调整攻击强度,永不烧毁自身 IP。这是脚本小子工具与专业实战操作的区分点。
### 4. 内存 Vault(本地 RAG — 持久化会话记忆)
每个发现——IP、API 密钥、头部、版本、凭据、行为观察——都会被索引到**本地向量数据库(ChromaDB)**中。阶段从 Vault 查询而非依赖上下文记忆:
```
# 利用阶段查询其自身的保险库而不是读取文件
results = vault.query("any SSRF endpoints found during recon?")
results = vault.query("AWS credentials from secrets phase")
```
**为何重要:** 渗透测试可能持续 3 天。目前 2 小时后上下文窗口填满,AI 会“忘记”最初的侦察结果。有了 Memory Vault,第 1 天的每个细节在第 3 天仍可查询。“上下文崩溃”彻底消失。
### 5. 动态图引擎(灵活转向 — 从线性到并行)
当 AI 在中间阶段发现新的攻击面(新 IP、内部子域名、暴露服务)时,它应能**派生后台任务**而非放弃当前线程:
```
Main thread: /exploit api.target.com (continues)
Fork spawned: /recon internal.target.com (runs in background)
Fork spawned: /secrets new-js-bundle.js (runs in background)
```
派生任务完成后报告回主线程,主线程自动合并其发现。
**为何重要:** 目前发现新内容意味着忽略或重新开始。Graph Engine 将 Akira 从严格清单变为协作团队——多线程并行工作,就像真实红队一样。
## 赞助商
Akira 免费且采用 MIT 许可。如果它帮你找到漏洞或赢得 CTF,请考虑支持开发:
- **GitHub Sponsors:** [@Kalp1774](https://github.com/sponsors/Kalp1774)
- **Buy Me a Coffee:** [buymeacoffee.com/kalpmodi](https://buymeacoffee.com/kalpmodi)
- **Ko-fi:** [ko-fi.com/kalpmodi](https://ko-fi.com/kalpmodi)
每笔赞助直接用于新技能、技术研究以及真实的漏洞赏金狩猎,保持 FINDINGS.md 持续更新。
## 贡献
发现了应纳入 Akira 的技术?某个技能有 Bug?应加入的新工具?
1. Fork 本仓库
2. 在 `skills/
为漏洞猎人打造,由漏洞猎人打造。
**[Star 本仓库](https://github.com/Kalp1774/akira) 以在发布新技能时保持更新。**
标签:AI Co-Pilot, AI Pentest, AI安全, AI辅助安全, Bug Bounty, Chat Copilot, Claude Code, Codex, Cursor, Gemini CLI, GitHub Stars, MIT License, SOC工具, 代码安全, 可自定义解析器, 安全研发, 开源安全工具, 攻击模块, 漏洞发现, 漏洞枚举, 秘密发现, 网络情报, 自动化渗透, 计划参与, 证据门控, 请求拦截, 逆向工具, 逆向工程平台, 阶段链攻击