PwnedBytes0x1/PwnedAgent
GitHub: PwnedBytes0x1/PwnedAgent
PwnedAgent 是一个 AI 驱动的道德黑客认知架构框架,通过战术推理引擎和自动化攻击链构建实现自主化漏洞发现、利用与负责任披露。
Stars: 0 | Forks: 0

# PwnedAgent
## 自主化道德黑客 Agent
**PwnedAgent** 是一个全面的、AI 驱动的道德黑客与网络安全研究框架,专为 Bug Bounty 猎人、渗透测试人员、红队操作员和安全研究人员设计。它代表了一种完整的认知架构,用于自主化的漏洞发现、利用和负责任的漏洞披露。
本仓库不仅仅是一组脚本的集合 —— 它是一个**活的、具备推理能力的系统**,将数十年的攻击性安全知识封装到一个结构化的、可扩展的且智能的 Agent 架构中。
## PwnedAgent 的独特之处
| 特性 | 传统工具 | PwnedAgent |
|---------|------------------|------------|
| **推理能力** | 静态特征库 | 具备上下文感知的战术推理 |
| **适应能力** | 手动配置 | 通过反馈循环自我改进 |
| **范围安全** | 依赖人工 | 内核强制执行的硬边界 |
| **攻击链** | 独立测试 | 自动化的多步骤攻击链构建 |
| **绕过能力** | 基础轮换 | 对抗性反制措施智能 |
| **报告输出** | 手动汇总 | 自动生成 PoC + 影响可视化 |
## 仓库架构
```
PwnedAgent/
│
├── kernel/ # Safety, orchestration, and resource governance
│ ├── scope-guardian.md # Hard scope enforcement and boundary validation
│ ├── rate-limit-governor.md # Intelligent throttling to avoid disruption
│ ├── state-manager.md # Session state and context persistence
│ ├── audit-logger.md # Complete audit trail for all actions
│ ├── abort-conditions.md # Emergency stop and safety triggers
│ └── resource-scheduler.md # Computational resource optimization
│
├── memory/ # Multi-layer cognitive memory
│ ├── episodic/ # Session-specific context and findings
│ ├── semantic/ # Long-term security knowledge (CWEs, exploits, patterns)
│ └── procedural/ # Learned muscle memory and technique optimization
│
├── cognition/ # Real-time tactical reasoning engine
│ ├── core-loop/ # OODA loop implementation for hacking
│ ├── tactical-reasoning/ # Skill selection, pivot generation, chain optimization
│ └── attack-surface-pruning/ # Intelligent surface reduction
│
├── methodology/ # Complete testing methodologies
│ ├── phase-based/ # Structured by engagement phase
│ ├── target-type-specific/ # Tailored by application architecture
│ ├── time-boxed/ # Optimized for time constraints
│ ├── vulnerability-class/ # Deep-dive systematic hunting guides
│ ├── tactical-decision-trees/ # Conditional decision frameworks
│ └── platform-specific/ # Bug bounty platform optimization
│
├── skills/ # Granular exploitation capabilities
│ ├── reconnaissance/ # Information gathering techniques
│ ├── authentication-session/ # Auth bypass and session attacks
│ ├── input-validation-injection/ # All injection-class vulnerabilities
│ ├── unicode-parser-abuse/ # Unicode-based WAF bypass and parser attacks
│ ├── client-side-browser/ # XSS, CSRF, CORS, browser abuse
│ ├── api-service-layer/ # API testing, GraphQL, WebSocket
│ ├── business-logic-state/ # Logic flaws and workflow abuse
│ ├── cms-exploitation/ # CMS-specific exploitation guides
│ ├── modern-framework-abuse/ # Next.js, .NET, framework-specific attacks
│ ├── impact-escalation/ # Privilege escalation and impact maximization
│ ├── automation-intelligence/ # Fuzzing, CVE hunting, anomaly detection
│ └── ai-native-targets/ # LLM/AI application security testing
│
├── chains/ # Pre-constructed attack chains
│ ├── discovery/ # Surface mapping chains
│ ├── auth-chains/ # Authentication bypass chains
│ ├── injection-chains/ # Injection to RCE escalation
│ ├── client-side-chains/ # XSS-to-account-takeover chains
│ ├── logic-chains/ # Business logic abuse chains
│ ├── cross-domain-chains/ # Multi-domain impact chains
│ ├── cms-specific-chains/ # CMS exploit chains
│ └── xbow-grade-chains/ # High-impact crossbow-grade chains
│
├── tools/ # Tool abstractions and integrations
├── findings/ # Finding documentation and reporting
├── tradecraft/ # Operational security and evasion
├── countermeasures/ # WAF evasion and bot detection bypass
├── intelligence/ # Threat intelligence and target research
├── platform-ops/ # Bug bounty platform integrations
├── feedback/ # Triage feedback and learning loops
├── evolution/ # Self-improvement and skill evolution
├── swarm/ # Multi-agent coordination
└── meta/ # Self-monitoring and performance analytics
```
## 快速开始
### 1. 克隆并初始化
```
git clone https://github.com/PwnedBytes0x1/PwnedAgent.git
cd PwnedAgent
```
### 2. 阅读启动序列
```
cat BOOT_SEQUENCE.md
```
启动序列会在任何测试开始之前,初始化 Agent 的认知状态并验证所有安全约束条件。
### 3. 选择你的方法论
根据你的目标类型和时间限制,从 `methodology/` 中选择一种方法论:
| 场景 | 推荐方法论 |
|----------|------------------------|
| 快速侦察 | `methodology/time-boxed/2-hour-recon-sprint.md` |
| 专注漏洞挖掘 | `methodology/time-boxed/4-hour-focused-hunt.md` |
| 深度评估 | `methodology/phase-based/` |
| API 目标 | `methodology/target-type-specific/api-first-application.md` |
| AI/LLM 目标 | `methodology/target-type-specific/ai-llm-application.md` |
### 4. 加载相关技能
技能是模块化的 —— 仅加载你所需的部分:
```
# 示例: Load SQL injection hunting skills
cat skills/input-validation-injection/query-language/sqli.md
# 示例: Load authentication bypass skills
cat skills/authentication-session/auth-mechanisms/auth-testing.md
```
### 5. 执行攻击链
攻击链是预先构建的多步骤攻击:
```
# 示例: SQLi to RCE chain
cat chains/injection-chains/sqli-to-rce.md
# 示例: IDOR to full compromise
cat chains/auth-chains/idor-to-full-compromise.md
```
## 核心原则
### 1. 道德至上
PwnedAgent 专为**授权安全测试**而设计。每个组件都强制执行:
- 在执行任何操作前进行明确的范围验证
- 速率限制以防止服务中断
- 完整的审计日志以确保可追溯性
- 在违反范围时自动中止
### 2. 智能胜过蛮力
该框架优先考虑:
- 上下文推理而非盲目蛮力
- 精准定位而非广撒网式攻击
- 自适应绕过而非静态技术
- 攻击链构建而非孤立测试
### 3. 持续演进
PwnedAgent 从以下方面进行学习:
- 分流反馈和重复分析
- 历史漏洞利用模式
- 对抗性模拟结果
- 技术适合度评分
## 安全架构
```
┌─────────────────────────────────────────┐
│ SAFETY KERNEL LAYER │
├─────────────────────────────────────────┤
│ Scope Guardian ←→ Rate Limit Governor │
│ ↓ ↓ │
│ Audit Logger ←→ Abort Conditions │
│ ↓ │
│ Resource Scheduler │
└─────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ COGNITIVE ENGINE │
├─────────────────────────────────────────┤
│ Planner → Executor → Observer → │
│ Reflector → Skill Selector → │
│ Confidence Calibrator │
└─────────────────────────────────────────┘
```
每一个动作在执行前都会流经**安全内核**。绝无例外。
## 方法论覆盖范围
### OWASP Top 10 (2021) 覆盖范围
| OWASP 类别 | 覆盖状态 | 主要技能 |
|----------------|----------------|----------------|
| A01: Broken Access Control | 完整 | `skills/authentication-session/authorization/` |
| A02: Cryptographic Failures | 完整 | `skills/authentication-session/auth-mechanisms/` |
| A03: Injection | 完整 | `skills/input-validation-injection/` |
| A04: Insecure Design | 完整 | `skills/business-logic-state/` |
| A05: Security Misconfiguration | 完整 | `skills/authentication-session/protective-controls/` |
| A06: Vulnerable Components | 完整 | `skills/automation-intelligence/static-intel/` |
| A07: Auth Failures | 完整 | `skills/authentication-session/auth-mechanisms/` |
| A08: Software/Data Integrity | 完整 | `skills/input-validation-injection/object-stream/` |
| A09: Logging Failures | 部分 | `skills/authentication-session/protective-controls/` |
| A10: SSRF | 完整 | `skills/input-validation-injection/server-side-request/` |
### 覆盖的漏洞类别
- **注入:** SQLi、NoSQLi、SSTI、CSTI、命令注入、LDAP/XPath 注入
- **身份验证:** JWT 攻击、OAuth 流程滥用、SAML 绕过、MFA 绕过、会话劫持
- **授权:** IDOR、BAC、权限提升、强制浏览、路径遍历
- **客户端:** XSS(所有类型)、CSRF、CORS 错误配置、点击劫持、原型链污染
- **服务端:** SSRF、XXE、LFI/RFI、文件上传滥用、反序列化
- **逻辑:** 业务逻辑漏洞、竞态条件、支付篡改、工作流绕过
- **API:** GraphQL 滥用、REST 方法滥用、WebSocket/Socket.IO 测试、批量赋值
- **现代:** Unicode 解析器滥用、缓存投毒、HTTP 请求走私、Host 头注入
- **AI/LLM:** 提示词注入、训练数据提取、模型窃取、RAG 投毒
## 攻击链复杂度级别
| 级别 | 描述 | 示例 |
|-------|-------------|---------|
| **Bronze** | 单步骤漏洞 | 反射型 XSS |
| **Silver** | 两步攻击链 | IDOR → PII 泄露 |
| **Gold** | 多步骤权限提升 | SSRF → 元数据 → 云平台接管 |
| **Platinum** | 跨域高影响攻击 | 子域接管 → 会话窃取 → 管理员权限获取 |
| **Diamond (XBow)** | 完整渗透攻击链 | Unicode WAF 绕过 → SSTI → RCE → 容器逃逸 |
## 情报与研究
PwnedAgent 集成了多个情报来源:
- 用于基础设施追踪的**历史 DNS 缓存**
- 用于端点发现的**Wayback 模式挖掘**
- 用于快速漏洞利用开发的**CVE 到技能转换**
- 用于优化报告的**分流行为建模**
- 用于竞争情报的**猎人活动监控**
### 兴趣领域
- 新型攻击链构建
- 特定目标类型的方法论
- 绕过技术改进
- 原生 AI 目标测试能力
## 免责声明
**PwnedAgent 仅旨在用于授权的安全测试和研究。** 未经授权访问计算机系统是违法行为。本工具仅出于教育和专业安全评估目的提供。在测试您不拥有的任何系统之前,请务必获得明确的书面许可。
作者对因使用本工具不当或造成的损害不承担任何责任。使用 PwnedAgent 即表示您同意以负责任和道德的方式使用它。
## 致谢
- 感谢全球 Bug Bounty 社区分享知识
- 感谢 OWASP 提供全面的安全资源
- 感谢 CVE 和 NVD 提供漏洞情报
- 感谢所有负责任地发布其研究发现的安全研究人员
**以精确度构建。在数千次实战中打磨。为下一个目标做好准备。**
*— PwnedBytes0x1*
标签:AI智能体, Bug Bounty, CISA项目, IP 地址批量处理, Web报告查看器, Windows内核, 人工智能, 可自定义解析器, 子域名变形, 安全合规, 安全测试, 插件系统, 攻击性安全, 数据展示, 用户模式Hook绕过, 白帽子, 私有化部署, 红队, 网络代理, 网络安全, 网络安全审计, 自动化攻击链, 自动化漏洞挖掘, 认知架构, 防御加固, 防御规避, 隐私保护