zyron-security/agentshield

GitHub: zyron-security/agentshield

一款集成 AI 推理的主动 DAST 与渗透测试框架,帮助安全团队发现并验证 Web 应用中的真实漏洞。

Stars: 2 | Forks: 0

``` █████╗ ██████╗ ███████╗███╗ ██╗████████╗███████╗██╗ ██╗██╗███████╗██╗ ██████╗ ██╔══██╗██╔════╝ ██╔════╝████╗ ██║╚══██╔══╝██╔════╝██║ ██║██║██╔════╝██║ ██╔══██╗ ███████║██║ ███╗█████╗ ██╔██╗ ██║ ██║ ███████╗███████║██║█████╗ ██║ ██║ ██║ ██╔══██║██║ ██║██╔══╝ ██║╚██╗██║ ██║ ╚════██║██╔══██║██║██╔══╝ ██║ ██║ ██║ ██║ ██║╚██████╔╝███████╗██║ ╚████║ ██║ ███████║██║ ██║██║███████╗███████╗██████╔╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝╚══════╝╚══════╝╚═════╝ ``` **专业 DAST 与渗透测试框架 —— 从被动姿态扫描到主动 AI 驱动的攻击模拟。** [![Python](https://img.shields.io/badge/Python-3.11%2B-3776AB?style=for-the-badge&logo=python&logoColor=white)](https://python.org) [![License](https://img.shields.io/badge/License-MIT-22c55e?style=for-the-badge)](LICENSE) [![Status](https://img.shields.io/badge/Status-Beta-f59e0b?style=for-the-badge)](https://github.com/zyron-security/agentshield) [![Made by](https://img.shields.io/badge/Made%20by-Zyron%20Security-6366f1?style=for-the-badge)](https://zyron.security) [![AI Powered](https://img.shields.io/badge/AI-Claude%20%2B%20CrewAI-e11d48?style=for-the-badge&logo=anthropic&logoColor=white)](https://anthropic.com) [![DAST](https://img.shields.io/badge/Type-DAST%20%2F%20Pentest-0ea5e9?style=for-the-badge)](https://github.com/zyron-security/agentshield)
## 🛡️ 什么是 AgentShield? AgentShield 是一个 **专业的动态应用安全测试(DAST)与渗透测试框架**,由 Zyron Security 自主研发。与传统扫描器在头部审计和签名匹配处止步不同,AgentShield 主动攻击你的应用程序——使用超过 160 种真实攻击向量,对 SQL 注入、跨站脚本、命令注入、路径遍历以及高级逻辑漏洞进行探测。它不仅报告“可能存在的问题”,还会确认“实际可被利用”的漏洞。 面向 **安全专业人员、渗透测试人员与 DevSecOps 团队**,AgentShield 弥合了点击式 Web 扫描器与手动利用流程之间的差距。它集成了完整深度爬虫(包括 Playwright 驱动的 SPA 遍历与 Swagger/GraphQL 端点发现)、分层被动分析、主动模糊测试引擎,以及由 CrewAI 和 Anthropic Claude 驱动的 AI 推理层——使其成为唯一能够规模化推理业务逻辑漏洞、IDOR 链与 BOLA 漏洞的开源 DAST 工具。 AgentShield 区别于竞争对手的核心在于其 **AI 优先设计哲学**。误报是自动化安全工具最大的失败模式——它们侵蚀信任、浪费分诊时间并掩盖真实发现。AgentShield 的 AI 层充当资深 AppSec 分析员:交叉关联发现结果、理解应用上下文、过滤噪声、通过推理对象引用模式识别 IDOR 候选,并生成具备完整修复指导的执行级报告。结果是一款直接与 Burp Suite Professional、Invicti 和 Acunetix 竞争、且零许可成本的开源工具。 ## ⚡ 功能矩阵 | Feature | AgentShield | Burp Suite Pro | Acunetix | OWASP ZAP | |---|:---:|:---:|:---:|:---:| | Passive Header Scan | ✅ | ✅ | ✅ | ✅ | | Cookie Security Flags | ✅ | ✅ | ✅ | ✅ | | TLS/SSL Analysis | ✅ | ✅ | ✅ | ✅ | | Active SQL Injection | ✅ | ✅ | ✅ | ✅ | | XSS Detection | ✅ | ✅ | ✅ | ✅ | | Command Injection | ✅ | ✅ | ✅ | ⚠️ | | Path Traversal | ✅ | ✅ | ✅ | ✅ | | **AI False Positive Reduction** | ✅ | ❌ | ❌ | ❌ | | **Business Logic IDOR** | ✅ AI | ⚠️ Manual | ❌ | ❌ | | **BOLA / Privilege Escalation** | ✅ AI | ⚠️ Manual | ❌ | ❌ | | WAF Evasion Testing | ✅ | ✅ | ✅ | ⚠️ | | Playwright SPA Crawler | ✅ | ✅ | ✅ | ⚠️ | | Swagger / GraphQL Discovery | ✅ | ✅ | ✅ | ⚠️ | | **CI/CD Pipeline Breaker** | ✅ | ❌ | ❌ | ✅ | | **Jira Auto-Tickets** | ✅ | ❌ | ✅ | ❌ | | **Historical Diff Tracking** | ✅ | ❌ | ✅ | ❌ | | HTML + PDF Reports | ✅ | ✅ | ✅ | ✅ | | **Executive AI Summary** | ✅ | ❌ | ❌ | ❌ | | Open Source | ✅ | ❌ | ❌ | ✅ | | **Cost** | **Free** | $449/yr | $$$$ | Free | ## 🏗️ 架构 AgentShield 以五根支柱组织,映射专业渗透测试的阶段:发现、被动分析、主动利用、AI 推理与报告。 ### 五根支柱 **1. 被动扫描器** — 审计 HTTP 安全头(CSP、HSTS、X-Frame-Options、X-Content-Type-Options、Referrer-Policy、Permissions-Policy、X-XSS-Protection)以及 Cookie 安全属性(Secure、HttpOnly、SameSite)、CORS 配置错误、TLS/SSL 密码与证书问题、响应头与错误页面中的信息泄露。不会发送可能触发应用状态变更的流量。 **2. 主动攻击引擎** — 使用 160+ 类分类负载执行受控模糊测试,涵盖 SQL 注入(50+ 向量,含时间型盲注与带外)、XSS(50+ 向量,含 DOM 式与泛型)、OS 命令注入(30+ 向量)、路径遍历(20+ 向量)以及 WAF 绕过变体(编码、分片、大小写变异、Unicode 标准化)。通过响应分析、时延检测与带外回调验证确认发现。 **3. 深度爬虫** — 在扫描开始前发现完整攻击面。解析 `sitemap.xml`、`robots.txt` 与 HTML 链接图。启动无头 Playwright 浏览器以执行 JavaScript 密集型 SPA 并捕获动态路由。探测常见的 Swagger UI 与 OpenAPI 路径。解析 GraphQL Schema。发现并分类 HTML 表单、API 端点与文件上传面。 **4. AI 推理层** — 基于 CrewAI 与 Anthropic Claude 构建的多代理流水线。AppSec 代理审查原始发现并利用应用上下文过滤误报。IDOR 检测器识别数值与 UUID 形式的对象引用模式,跨所有端点自动测试并确认可利用性。权限提升代理探测角色敏感参数。报告代理将所有确认发现综合为带 CVSS 分数与优先修复步骤的执行摘要。 **5. DevSecOps 集成** — 设计用于 CI/CD 流水线中。当发现超过可配置严重度阈值时以非零退出码中断流水线。自动为确认漏洞创建 Jira 工单并附完整复现步骤。将扫描结果持久化至磁盘并计算连续扫描间的差异以暴露新发现与跟踪修复进度。 ### 系统图 ``` ┌─────────────────────────────────────────────────────────────────┐ │ AgentShield v1.0 │ │ Zyron Security Platform │ └─────────────────────────────────────────────────────────────────┘ │ ▼ ┌──────────────────────────────────────────────────────────┐ │ CRAWL PHASE │ │ │ │ Sitemap XML • robots.txt • HTML Link Graph │ │ Playwright SPA Spider • Swagger / OpenAPI Probe │ │ GraphQL Introspection • Form & Input Discovery │ └──────────────────────────────────────────────────────────┘ │ ┌──────────────┴──────────────┐ ▼ ▼ ┌──────────────────────┐ ┌──────────────────────────────┐ │ PASSIVE PHASE │ │ ACTIVE PHASE │ │ │ │ │ │ • 7 Security Headers│ │ • SQLi (50+ payloads) │ │ • Cookie Flags │ │ • XSS (50+ payloads) │ │ • CORS Policy │ │ • CMDi (30+ payloads) │ │ • TLS / SSL Audit │ │ • Path Traversal (20+) │ │ • Info Disclosure │ │ • WAF Evasion Variants │ │ • HTTP Methods │ │ • Open Redirect │ │ • Error Disclosure │ │ • SSRF Probes │ └──────────────────────┘ └──────────────────────────────┘ │ │ └──────────────┬──────────────┘ ▼ ┌──────────────────────────────┐ │ AI ANALYSIS LAYER │ │ │ │ AppSec Agent (Claude) │ │ ├─ False Positive Filter │ │ ├─ CVSS Scoring │ │ └─ Remediation Guidance │ │ │ │ IDOR / BOLA Detector │ │ ├─ Object Ref Enumeration │ │ ├─ Cross-User Validation │ │ └─ Privilege Escalation │ │ │ │ Reporting Agent │ │ └─ Executive Summary │ └──────────────────────────────┘ │ ▼ ┌──────────────────────────────────────────────────────────┐ │ OUTPUT & INTEGRATIONS │ │ │ │ HTML Report (dark) PDF Report JSON (raw) │ │ Jira Auto-Tickets GitHub Actions (exit codes) │ │ Historical Diff Slack Webhook (optional) │ └──────────────────────────────────────────────────────────┘ ``` ## 📦 安装 ### 先决条件 - Python 3.11 或更高版本 - pip / virtualenv - (可选)Playwright Chromium — SPA 爬取必需 - (可选)Anthropic API 密钥 — AI 功能必需 ### 基础安装(仅被动扫描) ``` # 克隆仓库 git clone https://github.com/zyron-security/agentshield.git cd agentshield # 创建并激活虚拟环境(推荐) python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate # 以可编辑模式安装 — 被动扫描器 + 主动模糊器 pip install -e . ``` ### 完整安装(AI + 浏览器 + 全部功能) ``` # 安装所有可选依赖项 pip install -e ".[full]" # 安装 Playwright 的 Chromium 浏览器 playwright install chromium # 复制并配置文件 cp .env.example .env ``` 编辑 `.env` 并填写你的凭证: ``` # AI 功能所需 ANTHROPIC_API_KEY=sk-ant-... # 可选:Jira 集成 JIRA_URL=https://yourcompany.atlassian.net JIRA_EMAIL=security@yourcompany.com JIRA_API_TOKEN=... JIRA_PROJECT_KEY=SEC # 可选:Slack Webhook 用于通知 SLACK_WEBHOOK_URL=https://hooks.slack.com/services/... ``` ### Docker(推荐用于 CI/CD) ``` docker pull zyron/agentshield:latest docker run --rm \ -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \ -v $(pwd)/reports:/app/reports \ zyron/agentshield:latest \ scan https://target.com --format both ``` ## 🚀 快速开始 ``` # 仅被动扫描 — 对任何授权目标安全(不进行主动攻击) agentshield scan https://target.com --passive-only # 完整扫描 — 被动分析 + 主动模糊 agentshield scan https://target.com # 完整扫描并带 AI 分析 + 双格式报告(HTML + PDF) agentshield scan https://target.com --format both # 使用身份验证扫描(JWT 承载令牌) agentshield scan https://target.com --auth-token "Bearer eyJhbGci..." # 使用基于 Cookie 的身份验证扫描 agentshield scan https://target.com \ --auth-cookie "session=abc123; csrftoken=xyz456" # 使用 Jira 集成扫描(自动为发现项创建工单) agentshield scan https://target.com \ --jira-url https://company.atlassian.net \ --jira-token YOUR_JIRA_API_TOKEN \ --jira-project SEC # 将当前扫描结果与上一个扫描结果进行比较 agentshield diff https://target.com # 查看目标的历史扫描记录 agentshield history https://target.com # 从之前的原始 JSON 结果生成报告 agentshield report results/scan_20260411_143022.json --format html ``` ## 📖 CLI 参考 ### `agentshield scan` | 选项 | 类型 | 默认值 | 描述 | |---|---|---|---| | `TARGET` | `str` | 必需 | 待扫描的目标 URL(必须包含协议) | | `--passive-only` | flag | `False` | 仅运行被动分析,跳过主动模糊测试 | | `--format` | `html\|pdf\|json\|both` | `html` | 输出报告格式 | | `--output-dir` | `path` | `./reports` | 报告输出目录 | | `--auth-token` | `str` | — | 授权头值(例如 `Bearer `) | | `--auth-cookie` | `str` | — | 认证扫描用的 Cookie 字符串 | | `--depth` | `int` | `3` | 最大爬虫深度 | | `--threads` | `int` | `10` | 并发请求线程数 | | `--timeout` | `int` | `10` | HTTP 请求超时(秒) | | `--user-agent` | `str` | AgentShield1.0 | 自定义 User-Agent 字符串 | | `--rate-limit` | `int` | `50` | 每秒最大请求数 | | `--no-ai` | flag | `False` | 禁用 AI 分析(更快、无 API 成本) | | `--no-crawler` | flag | `False` | 跳过爬虫,仅扫描提供的 URL | | `--playwright` | flag | `False` | 启用 Playwright SPA 爬虫 | | `--jira-url` | `str` | — | Jira 实例基础 URL | | `--jira-token` | `str` | — | Jira API 令牌 | | `--jira-project` | `str` | — | 用于创建工单的 Jira 项目键 | | `--fail-on` | `low\|medium\|high\|critical` | `critical` | 若发现达到或超过此严重度的结果则退出码为 1 | | `--exclude` | `str` | — | 逗号分隔的需排除 URL 模式 | | `--headers` | `str` | — | 额外请求头,格式为 `Key:Value,Key:Value` | | `--proxy` | `str` | — | HTTP 代理 URL(例如 `http://127.0.0.1:8080`) | | `--verbose` | flag | `False` | 打印详细扫描进度 | ### `agentshield diff` ``` agentshield diff TARGET [--since SCAN_ID] [--format html|json] ``` 对比最新扫描与同一目标的先前扫描,输出新增发现、已解决发现与严重度变更。 ### `agentshield history` ``` agentshield history TARGET [--limit 10] ``` 列出目标的所有历史扫描结果,包含时间戳、发现数量与风险评分。 ### `agentshield report` ``` agentshield report SCAN_JSON [--format html|pdf|both] [--output-dir PATH] ``` 从原始 JSON 扫描结果文件重新生成报告。 ## 🔍 扫描模块 ### 1. 被动扫描器 被动扫描器在不修改应用状态的情况下审计 HTTP 响应的安全姿态。它对 0 到 100 的风险评分,并标记与 OWASP 及行业最佳实践的偏差。 **分析的标头:** | 标头 | 期望值 | 缺失风险 | |---|---|---| | `Content-Security-Policy` | 限制性策略 | 高 | | `Strict-Transport-Security` | `max-age≥31536000; includeSubDomains` | 高 | | `X-Frame-Options` | `DENY` 或 `SAMEORIGIN` | 中 | | `X-Content-Type-Options` | `nosniff` | 中 | | `Referrer-Policy` | `strict-origin-when-cross-origin` | 低 | | `Permissions-Policy` | 限制性权限 | 低 | | `X-XSS-Protection` | 已废弃 — 若存在 `1; mode=block` 则标记为信息 | 信息 | **检查的 Cookie 标志:** - `Secure` — Cookie 不得通过 HTTP 传输 - `HttpOnly` — Cookie 不得通过 JavaScript 访问 - `SameSite` — 值必须为 `Strict` 或 `Lax` **被动输出示例:** ``` [PASSIVE] Content-Security-Policy MISSING +10 pts HIGH [PASSIVE] Strict-Transport-Security PRESENT +0 pts OK [PASSIVE] CORS Policy OPEN (*) +30 pts CRITICAL [PASSIVE] session cookie Missing HttpOnly +15 pts HIGH [PASSIVE] Server header "Apache/2.4.51" +5 pts INFO Passive Score: 60/100 — ALTO ``` ### 2. 主动模糊测试引擎 主动模糊测试引擎向所有发现的输入向量注入负载:GET/POST 参数、JSON 字段、HTTP 头、路径段与文件上传端点。 **负载类别:** | 类别 | 向量 | 检测方法 | |---|---|---| | SQL 注入(错误型) | 20+ | 错误字符串匹配 | | SQL 注入(布尔盲注) | 15+ | 响应长度差异 | | SQL 注入(时间型) | 10+ | 响应时延 ≥ 5s | | SQL 注入(带外) | 5+ | DNS 回调(若配置) | | 反射型 XSS | 25+ | 负载在响应中回显 | | DOM 型 XSS | 15+ | Playwright DOM 检查 | | 存储型 XSS | 10+ | 后续 GET 响应检查 | | OS 命令注入 | 30+ | 时延 + 输出匹配 | | 路径遍历 | 20+ | 文件内容特征匹配 | | 开放重定向 | 15+ | Location 头分析 | | SSRF | 10+ | 内网 IP / 回调匹配 | | WAF 绕过 | 20+ | 每类变体绕过 | **WAF 绕过技术:** - URL 编码、双重编码、Unicode 标准化 - 大小写变异(`sElEcT`、`SeLeCt`) - 注释注入(`SEL/**/ECT`) - 空字节插入(`%00`) - HTTP 参数污染 - 分块传输编码滥用 - 头注入变体 ### 3. AI IDOR 检测 IDOR 检测器是 AgentShield 最具特色的功能。它推理对象引用模式并自动测试未授权访问。 **工作原理:** 1. 爬虫收集所有包含数值 ID 或 UUID 的端点。 2. AI 识别可能的资源所有者关系(例如 `/api/invoices/1024` 可能属于认证用户)。 3. 生成相邻 ID(`1023`、`1025`)与 UUID 列表的测试请求。 4. 若应用返回 200 且响应体非空(与原始响应不同),则标记为已确认 IDOR。 5. 对于配置了第二测试账户(`--auth-token-b`)的 API,通过交叉验证确认用户 B 的令牌能否访问用户 A 的资源。 **IDOR 发现示例:** ``` [AI-IDOR] Endpoint: GET /api/faturas/{id} Tested: /api/faturas/1024 → 200 OK (your invoice) Probed: /api/faturas/1025 → 200 OK (another user's invoice) Verdict: CONFIRMED IDOR — object reference not validated server-side CVSS: 7.5 HIGH Fix: Validate that the authenticated user owns the requested resource before returning data. Use opaque, non-sequential identifiers. ``` ### 4. 业务逻辑测试 权限提升代理检查请求/响应周期中的角色敏感参数,并尝试通过修改它们来提升权限。 **技术:** - JSON 体变异:`{"role": "user"}` → `{"role": "admin"}` - 参数篡改:`?is_admin=false` → `?is_admin=true` - JWT 声明修改(带与不带签名绕过) - 在 PUT/PATCH 端点上的 Mass Assignment 探测 - 强制浏览管理员前缀路由 **发现示例:** ``` [AI-PRIV] Endpoint: PUT /api/users/profile Original body: {"name": "Alice", "role": "user"} Modified body: {"name": "Alice", "role": "admin"} Response: 200 OK — role field accepted without validation Verdict: CONFIRMED Privilege Escalation via Mass Assignment CVSS: 9.1 CRITICAL ``` ### 5. CI/CD 流水线破坏者 AgentShield 设计用于在 CI/CD 流水线中快速失败。当安全回归发生时,通过 `--fail-on` 配置最低严重度阈值以中断流水线。 **退出码:** | 码 | 含义 | |---|---| | `0` | 扫描完成,未发现达到或超过阈值的发现 | | `1` | 扫描完成,发现达到或超过 `--fail-on` 严重度的结果 | | `2` | 因目标不可达或配置错误导致扫描失败 | ## 📊 报告示例 ### HTML 报告(深色主题) HTML 报告是一个自包含的单文件文档,带有深色安全仪表盘风格。它包含: - 整体风险评分与等级的首页卡片 - 按严重度分布的环形图 - 按严重度分组的发现卡片,包含完整请求/响应复现 - CVSS 分数、CWE 参考与 OWASP Top 10 映射 - 每个发现的 AI 生成修复建议 - 原始证据的技术细节章节 ### PDF 报告 PDF 报告与 HTML 布局一致,格式适合打印与客户交付。包含目标信息、扫描元数据与签名块。通过 WeasyPrint 生成。 ### JSON 输出 原始 JSON 输出包含每个请求/响应对、使用的负载、检测方法、AI 分析输出与 CVSS 计算。它是 `agentshield diff` 与 `agentshield report` 的输入格式。 ## 🔗 DevSecOps 集成 ### GitHub Actions 将 AgentShield 添加到部署流水线以阻止引入安全回归的发布: ``` # .github/workflows/security-scan.yml name: Security Scan on: push: branches: [main, develop] pull_request: branches: [main] schedule: - cron: '0 2 * * *' # Nightly full scan jobs: agentshield: name: AgentShield DAST runs-on: ubuntu-latest permissions: contents: read security-events: write steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.11' - name: Install AgentShield run: | pip install agentshield[full] playwright install chromium --with-deps - name: Run DAST Scan env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} run: | agentshield scan ${{ vars.TARGET_URL }} \ --format both \ --output-dir reports/ \ --fail-on high \ --auth-token "${{ secrets.SCAN_AUTH_TOKEN }}" \ --playwright \ --verbose - name: Upload Security Report uses: actions/upload-artifact@v4 if: always() with: name: security-report-${{ github.run_number }} path: reports/ retention-days: 90 - name: Comment PR with Summary if: github.event_name == 'pull_request' && always() uses: actions/github-script@v7 with: script: | const fs = require('fs'); const summary = JSON.parse( fs.readFileSync('reports/summary.json', 'utf8') ); github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, body: `## 🛡️ AgentShield Security Scan\n\n` + `**Risk Score:** ${summary.score}/100 — ${summary.grade}\n` + `**Critical:** ${summary.critical} | **High:** ${summary.high} ` + `| **Medium:** ${summary.medium} | **Low:** ${summary.low}\n\n` + `[Full Report](${summary.report_url})` }); ``` ### Jira 集成 当提供 `--jira-url`、`--jira-token` 与 `--jira-project` 时,AgentShield 会自动为所有中高严重度及以上确认发现创建 Jira 工单。 每个工单包含: - **标题:** `[Shield] {严重度} — {发现类型} 在 {端点}` - **描述:** 完整技术细节、请求/响应证据、CVSS 分数、CWE 参考、OWASP 分类 - **标签:** `security`、`agentshield`、`{严重度}`、`{发现类型}` - **优先级:** 映射自 CVSS 分数(Critical → Highest,High → High 等) - **组件:** `Security`(如不存在则自动创建) 内置重复抑制——AgentShield 在创建新工单前会检查是否存在相同端点与发现类型的未关闭工单。 ### 历史差异追踪 AgentShield 将扫描结果持久化至 `~/.agentshield/history/`(或 `--output-dir`),按目标主机名与时间戳索引。`diff` 命令计算最近两次扫描的差异: ``` agentshield diff https://target.com ``` **差异输出示例:** ``` AgentShield Diff — target.com Compared: 2026-04-11 14:30 vs 2026-04-10 09:15 NEW FINDINGS (2): + CRITICAL SQLi confirmed on POST /api/search (param: q) + HIGH Missing CSP header on /admin RESOLVED FINDINGS (1): - MEDIUM Insecure cookie (session) — HttpOnly now set UNCHANGED FINDINGS (4): ● HIGH CORS open policy on /api/* ● MEDIUM Server version disclosure ● MEDIUM Missing Referrer-Policy on 3 endpoints ● LOW Deprecated X-XSS-Protection header Net change: +1 severity point (score: 58 → 59) ``` ## 🎯 评分系统 AgentShield 为每个目标生成 0–100 的风险评分。评分可累加——每个发现贡献其权重,上限为 100。 ### 严重度等级 | 分数范围 | 等级 | 颜色 | 含义 | |---|---|---|---| | 0 – 19 | **BAIXO** | 🟢 Green | 低风险,良好的安全姿态 | | 20 – 39 | **MÉDIO** | 🟡 Yellow | 中等风险,需要部分改进 | | 40 – 69 | **ALTO** | 🟠 Orange | 高风险,存在显著漏洞 | | 70 – 100 | **CRÍTICO** | 🔴 Red | 关键风险,需立即修复 | ### 评分权重表 | 发现类型 | 权重 | |---|---| | 缺失安全标头 | 每项 +10 分 | | 不安全的 Cookie 标志(每项缺失) | 每项 +15 分 | | 信息泄露(标头中) | 每项 +5 分 | | HTTP 方法配置错误 | +10 分 | | CORS 策略开放(`*`) | +30 分 | | TLS/SSL 弱密码或配置错误 | +20 分 | | 到期或自签名证书 | +25 分 | | 确认的主动 SQL 注入 | +40 分 | | 确认的主动 XSS(反射型) | +35 分 | | 确认的主动 XSS(存储型) | +45 分 | | 确认的 OS 命令注入 | +50 分 | | 确认的路径遍历 | +35 分 | | 确认的开放重定向 | +20 分 | | 确认的 SSRF | +45 分 | | 确认的 IDOR | +45 分 | | 确认的权限提升 | +50 分 | | 确认的 Mass Assignment | +40 分 | ## 🔒 模块与负载参考 ### SQL 注入负载(示例) ``` ' OR '1'='1 ' OR 1=1-- '; DROP TABLE users;-- ' UNION SELECT NULL,NULL-- ' AND SLEEP(5)-- '; WAITFOR DELAY '0:0:5'-- ' AND 1=CONVERT(int,(SELECT TOP 1 table_name FROM information_schema.tables))-- ``` ### XSS 负载(示例) ``` "> javascript:alert(document.cookie) ';alert(String.fromCharCode(88,83,83))//
``` ### WAF 绕过(示例) ``` sElEcT 1,2,3 SE/**/LECT 1,2,3 %53%45%4c%45%43%54 1,2,3 ' /*!50000OR*/ '1'='1 ``` ## ⚠️ 法律声明 ``` ╔══════════════════════════════════════════════════════════════════════╗ ║ LEGAL NOTICE — MANDATORY READ BEFORE USE ║ ╠══════════════════════════════════════════════════════════════════════╣ ║ ║ ║ AgentShield includes active attack capabilities including SQL ║ ║ injection fuzzing, XSS injection, command injection probing, ║ ║ path traversal testing, IDOR enumeration, and privilege escalation ║ ║ simulation. ║ ║ ║ ║ USE ONLY on systems you own or have EXPLICIT WRITTEN AUTHORIZATION ║ ║ to test. Verbal authorization is insufficient. ║ ║ ║ ║ Unauthorized use against systems you do not own may violate: ║ ║ ║ ║ 🇧🇷 Brazil: Lei Nº 12.737/2012 (Lei Carolina Dieckmann) ║ ║ 🇺🇸 USA: Computer Fraud and Abuse Act (CFAA) 18 U.S.C. ║ ║ § 1030 ║ ║ 🇪🇺 European Union: Directive 2013/40/EU on attacks against ║ ║ information systems ║ ║ 🌍 International: Budapest Convention on Cybercrime ║ ║ (ETS No. 185) ║ ║ ║ ║ Zyron Security assumes NO LIABILITY for unauthorized or illegal ║ ║ use of this tool. Users are solely responsible for ensuring they ║ ║ have proper authorization before initiating any scan. ║ ║ ║ ║ This tool is intended for: ║ ║ • Security professionals testing systems they are authorized to test║ ║ • Organizations scanning their own infrastructure ║ ║ • Penetration testers with signed scope-of-work agreements ║ ║ • Security researchers operating within responsible disclosure ║ ║ ║ ╚══════════════════════════════════════════════════════════════════════╝ ``` ## 🤝 贡献 欢迎并鼓励贡献。AgentShield 是一个社区项目——社区贡献的负载变体、检测技术与集成模块越多,功能就越强大。 ### 如何贡献 1. **Fork** 仓库并从 `develop` 分支创建特性分支。 2. **在打开新问题前搜索现有问题** — 你的 Bug 可能已被追踪。 3. **遵循现有代码风格** — 函数不超过 50 行,文件不超过 800 行,不使用硬编码值。 4. **编写测试** — 所有新模块需要单元测试,新代码覆盖率至少 80%。 5. **向 `develop` 分支提交 Pull Request**,并清晰描述变更内容与原因。 ### 优先贡献领域 - 新的负载向量(SQLi、XSS、SSTI、XXE、反序列化) - 框架特定检测签名(Spring Boot、Django、Laravel、Rails) - 认证方案支持(OAuth2、SAML、mTLS) - 额外的 CI/CD 集成(GitLab CI、Azure DevOps、CircleCI、Jenkins) - 输出格式模块(SARIF、CycloneDX、DefectDojo) - 误报减少改进 ### 行为准则 所有贡献者应保持专业与尊重。安全工具承载伦理责任——不得贡献旨在造成不可逆破坏、数据销毁或拒绝生产系统服务的负载或技术。 ### 报告安全漏洞 若发现 AgentShield 本身的安全漏洞,请**不要**公开提交问题。发送邮件至 `security@zyron.security` 并提供完整细节。我们遵循 90 天协同披露政策。 ## 📝 许可证 ``` MIT License Copyright (c) 2026 Zyron Security Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` ## 🏢 关于 Zyron Security Zyron Security 是一家巴西网络安全公司,专注于应用安全、渗透测试与 AI 驱动的安全工具——构建开源框架与商业解决方案,为安全团队提供企业级能力且无需企业级价格标签。
**由 [Zyron Security](https://zyron.security) 精心打造** [![GitHub Stars](https://img.shields.io/github/stars/zyron-security/agentshield?style=social)](https://github.com/zyron-security/agentshield) [![GitHub Issues](https://img.shields.io/github/issues/zyron-security/agentshield?color=red)](https://github.com/zyron-security/agentshield/issues) [![GitHub PRs](https://img.shields.io/github/issues-pr/zyron-security/agentshield?color=6366f1)](https://github.com/zyron-security/agentshield/pulls) *安全不是产品,而是一个过程。*
标签:AI 驱动, DAST, DevSecOps, IDOR 检测, Python, Python 3.11+, Web 安全, Web 应用程序安全, Zyron Security, 上游代理, 主动模糊测试, 企业安全, 动态应用安全测试, 后利用, 安全扫描, 安全框架工具, 应用安全测试, 开源框架, 恶意软件分析, 持续集成, 攻击模拟, 无后门, 时序注入, 特征检测, 管道破坏, 网络安全, 网络资产管理, 逆向工具, 隐私保护, 驱动签名利用