NeuroSploit一人工智能自动化渗透测试平台

admin 2026-03-03 06:32:50 网络安全文章 来源:ZONE.CI 全球网 0 阅读模式

文章总结: NeuroSploitv3是一个AI驱动的自动化渗透测试平台,将自主代理与100种漏洞类型检测、独立Kali容器沙箱、误报加固和漏洞利用链技术相结合。其核心特点包括三流并行测试架构、抗幻觉验证流程、WAF检测绕过及多LLM提供商支持,旨在提升安全评估的自动化程度与结果可靠性。 综合评分: 78 文章分类: 渗透测试,AI安全,安全工具,漏洞分析,解决方案


cover_image

NeuroSploit 一人工智能自动化渗透测试平台

网络安全民工

2026年2月24日 20:58 天津

以下文章来源于蓝星安全 ,作者蓝星安全

蓝星安全 .

感谢关注蓝星安全,专注分享网络安全、数据安全、人工智能安全等知识,在星球可以获取最新的标准规范、培训课件、解决方案、攻防工具、白皮书、指导手册等,星球资料每天都会进行更新

人工智能驱动的自主渗透测试平台

NeuroSploit v3 是一个高级安全评估平台,它将 AI 驱动的自主代理与 100 种漏洞类型、每次扫描隔离的 Kali Linux 容器、误报加固、漏洞利用链以及具有实时监控功能的现代 React Web 界面相结合。


平台特点

  • 涵盖 10 个类别、100 种漏洞类型,并提供 AI 驱动的测试提示
  • 自主代理– 三流并行渗透测试(侦察 + 初级测试员 + 工具运行器)
  • 每个扫描都使用独立的 Kali 容器——每次扫描都在其自身隔离的 Docker 容器中运行。
  • 抗幻觉流程——阴性对照、执行证明、置信度评分
  • 漏洞利用链引擎– 自动将发现的漏洞关联起来(SSRF->内部漏洞,SQLi->数据库特定漏洞等)
  • WAF检测与绕过– 16种WAF特征码,12种绕过技术
  • 智能策略调整——死端检测、收益递减、优先级重新计算
  • 多提供商 LLM – Claude、GPT、Gemini、Ollama、LMStudio、OpenRouter
  • 实时仪表盘– 基于 WebSocket 的实时扫描进度、结果和报告
  • 沙箱仪表盘– 实时监控正在运行的 Kali 容器、工具和健康状况

目录

  • 快速入门
  • 建筑学
  • 自主代理
  • 100 种漏洞类型
  • Kali 沙箱系统
  • 抗幻觉与验证
  • Web 图形用户界面
  • API 参考
  • 配置
  • 发展
  • 安全通知

快速入门

选项 1:Docker(推荐)

# Clone repositorygit clone https://github.com/CyberSecurityUP/NeuroSploit/cd NeuroSploitv2# Copy environment file and add your API keyscp .env.example .env nano .env  # Add ANTHROPIC_API_KEY, OPENAI_API_KEY, or GEMINI_API_KEY# Build the Kali sandbox image (first time only, ~5 min)./scripts/build-kali.sh# Start backenduvicorn backend.main:app --host 0.0.0.0 --port 8000

选项 2:手动设置

# Backendpip install -r requirements.txt uvicorn backend.main:app --host 0.0.0.0 --port 8000 --reload# Frontend (new terminal)cd frontend npm install npm run dev

构建 Kali 沙箱镜像

# Normal build (uses Docker cache)./scripts/build-kali.sh# Full rebuild (no cache)./scripts/build-kali.sh --fresh# Build + run health check./scripts/build-kali.sh --test# Or via docker-composedocker compose -f docker/docker-compose.kali.yml build

可通过http://localhost:8000(生产版本)或http://localhost:5173(开发模式)访问 Web 界面。


平台结构

NeuroSploitv3/
├── backend/                         # FastAPI Backend
│   ├── api/v1/                      # REST API (13 routers)
│   │   ├── scans.py                 # Scan CRUD + pause/resume/stop
│   │   ├── agent.py                 # AI Agent control
│   │   ├── agent_tasks.py           # Scan task tracking
│   │   ├── dashboard.py             # Stats + activity feed
│   │   ├── reports.py               # Report generation (HTML/PDF/JSON)
│   │   ├── scheduler.py             # Cron/interval scheduling
│   │   ├── vuln_lab.py              # Per-type vulnerability lab
│   │   ├── terminal.py              # Terminal agent (10 endpoints)
│   │   ├── sandbox.py               # Sandbox container monitoring
│   │   ├── targets.py               # Target validation
│   │   ├── prompts.py               # Preset prompts
│   │   ├── vulnerabilities.py       # Vulnerability management
│   │   └── settings.py              # Runtime settings
│   ├── core/
│   │   ├── autonomous_agent.py      # Main AI agent (~7000 lines)
│   │   ├── vuln_engine/             # 100-type vulnerability engine
│   │   │   ├── registry.py          # 100 VULNERABILITY_INFO entries
│   │   │   ├── payload_generator.py # 526 payloads across 95 libraries
│   │   │   ├── ai_prompts.py        # Per-vuln AI decision prompts
│   │   │   ├── system_prompts.py    # 12 anti-hallucination prompts
│   │   │   └── testers/             # 10 category tester modules
│   │   ├── validation/              # False-positive hardening
│   │   │   ├── negative_control.py  # Benign request control engine
│   │   │   ├── proof_of_execution.py # Per-type proof checks (25+ methods)
│   │   │   ├── confidence_scorer.py # Numeric 0-100 scoring
│   │   │   └── validation_judge.py  # Sole authority for finding approval
│   │   ├── request_engine.py        # Retry, rate limit, circuit breaker
│   │   ├── waf_detector.py          # 16 WAF signatures + bypass
│   │   ├── strategy_adapter.py      # Mid-scan strategy adaptation
│   │   ├── chain_engine.py          # 10 exploit chain rules
│   │   ├── auth_manager.py          # Multi-user auth management
│   │   ├── xss_context_analyzer.py  # 8-context XSS analysis
│   │   ├── poc_generator.py         # 20+ per-type PoC generators
│   │   ├── execution_history.py     # Cross-scan learning
│   │   ├── access_control_learner.py # Adaptive BOLA/BFLA/IDOR learning
│   │   ├── response_verifier.py     # 4-signal response verification
│   │   ├── agent_memory.py          # Bounded dedup agent memory
│   │   └── report_engine/           # OHVR report generator
│   ├── models/                      # SQLAlchemy ORM models
│   ├── db/                          # Database layer
│   ├── config.py                    # Pydantic settings
│   └── main.py                      # FastAPI app entry
│
├── core/                            # Shared core modules
│   ├── llm_manager.py               # Multi-provider LLM routing
│   ├── sandbox_manager.py           # BaseSandbox ABC + legacy shared sandbox
│   ├── kali_sandbox.py              # Per-scan Kali container manager
│   ├── container_pool.py            # Global container pool coordinator
│   ├── tool_registry.py             # 56 tool install recipes for Kali
│   ├── mcp_server.py                # MCP server (12 tools, stdio)
│   ├── scheduler.py                 # APScheduler scan scheduling
│   └── browser_validator.py         # Playwright browser validation
│
├── frontend/                        # React + TypeScript Frontend
│   ├── src/
│   │   ├── pages/
│   │   │   ├── HomePage.tsx             # Dashboard with stats
│   │   │   ├── AutoPentestPage.tsx      # 3-stream auto pentest
│   │   │   ├── VulnLabPage.tsx          # Per-type vulnerability lab
│   │   │   ├── TerminalAgentPage.tsx    # AI terminal chat
│   │   │   ├── SandboxDashboardPage.tsx # Container monitoring
│   │   │   ├── ScanDetailsPage.tsx      # Findings + validation
│   │   │   ├── SchedulerPage.tsx        # Cron/interval scheduling
│   │   │   ├── SettingsPage.tsx         # Configuration
│   │   │   └── ReportsPage.tsx          # Report management
│   │   ├── components/              # Reusable UI components
│   │   ├── services/api.ts          # API client layer
│   │   └── types/index.ts           # TypeScript interfaces
│   └── package.json
│
├── docker/
│   ├── Dockerfile.kali              # Multi-stage Kali sandbox (11 Go tools)
│   ├── Dockerfile.sandbox           # Legacy Debian sandbox
│   ├── Dockerfile.backend           # Backend container
│   ├── Dockerfile.frontend          # Frontend container
│   ├── docker-compose.kali.yml      # Kali sandbox build
│   └── docker-compose.sandbox.yml   # Legacy sandbox
│
├── config/config.json               # Profiles, tools, sandbox, MCP
├── data/
│   ├── vuln_knowledge_base.json     # 100 vuln type definitions
│   ├── execution_history.json       # Cross-scan learning data
│   └── access_control_learning.json # BOLA/BFLA adaptive data
│
├── scripts/
│   └── build-kali.sh               # Build/rebuild Kali image
├── tools/
│   └── benchmark_runner.py          # 104 CTF challenges
├── agents/base_agent.py             # BaseAgent class
├── neurosploit.py                   # CLI entry point
└── requirements.txt

自主代理

AI代理(autonomous_agent.py)自主地协调整个渗透测试。

并行架构

                    ┌─────────────────────┐
                    │   Auto Pentest      │
                    │   Target URL(s)     │
                    └────────┬────────────┘
                             │
              ┌──────────────┼──────────────┐
              ▼              ▼              ▼
   ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
   │  Stream 1    │ │  Stream 2    │ │  Stream 3    │
   │  Recon       │ │  Junior Test │ │  Tool Runner │
   │  ─────────── │ │  ─────────── │ │  ─────────── │
   │  Crawl pages │ │  Test target │ │  Nuclei scan │
   │  Find params │ │  AI-priority │ │  Naabu ports │
   │  Tech detect │ │  3 payloads  │ │  AI decides  │
   │  WAF detect  │ │  per endpoint│ │  extra tools │
   └──────┬───────┘ └──────┬───────┘ └──────┬───────┘
          │                │                │
          └────────────────┼────────────────┘
                           ▼
              ┌─────────────────────┐
              │  Deep Analysis      │
              │  100 vuln types     │
              │  Full payload sets  │
              │  Chain exploitation │
              └─────────┬───────────┘
                        ▼
              ┌─────────────────────┐
              │  Report Generation  │
              │  AI executive brief │
              │  PoC code per find  │
              └─────────────────────┘

代理自主模块

| 模块 | 描述 | | — | — | | 请求引擎 | 重试退避、主机级速率限制、熔断器、自适应超时 | | WAF检测器 | 16 种 WAF 签名(Cloudflare、AWS、Akamai、Imperva 等),12 种绕过技术 | | 策略适配器 | 死端检测、收益递减、403 绕过、优先级重新计算 | | 链式发动机 | 10 条链式规则(SSRF->内部,SQLi->数据库特定,LFI->配置,IDOR模式转移) | | 身份验证管理器 | 多用户上下文(user_a、user_b、admin)、登录表单检测、会话管理 |

扫描功能

  • 暂停/恢复/停止(带检查点)
  • 人工验证– 确认或拒绝人工智能的发现
  • 已确认结果的屏幕截图(剧作家)
  • 交叉扫描学习——历史成功率影响未来优先事项
  • CVE 测试– 正则表达式检测 + AI 生成的有效载荷

100 种漏洞类型

类别

| 类别 | 类型 | 示例 | | — | — | — | | 注射 | 38 | XSS(反射型/存储型/DOM)、SQL注入、NoSQL注入、命令注入、SSTI、LDAP、XPath、CRLF、标头注入、日志注入、GraphQL注入 | | 检查 | 21 | 安全标头、CORS、点击劫持、信息泄露、调试端点、错误泄露、源代码暴露 | | 人工智能驱动 | 41 | BOLA、BFLA、IDOR、竞态条件、业务逻辑、JWT 操纵、OAuth 缺陷、原型污染、WebSocket 劫持、缓存投毒、HTTP 请求走私 | | 验证 | 8 | 身份验证绕过、会话固定、凭据填充、密码重置漏洞、多因素身份验证绕过、默认凭据 | | 授权 | 6 | BOLA、BFLA、IDOR、权限提升、强制浏览、功能级访问控制 | | 文件访问 | 5 | LFI、RFI、路径遍历、文件上传、XXE | | 请求伪造 | 4 | SSRF、CSRF、云元数据、DNS 重绑定 | | 客户端 | 8 | CORS、点击劫持、开放重定向、DOM 覆盖、原型污染、PostMessage、CSS 注入 | | 基础设施 | 6 | SSL/TLS、HTTP 方法、子域名劫持、主机头、CNAME 劫持 | | 云/供应 | 4 | 云元数据、S3存储桶配置错误、依赖关系混乱、第三方脚本 |

有效载荷引擎

  • 95 个库中共有526 个有效载荷
  • 73 个 XSS 存储有效载荷+ 5 个特定于上下文的集合
  • 针对不同类型人工智能决策的提示,并带有防幻觉指令
  • WAF自适应有效载荷转换(12种技术)

Kali 沙箱系统

每次扫描都在其独立的 Kali Linux Docker 容器中运行,提供以下功能:

  • 完全隔离——同时进行的扫描之间互不干扰
  • 按需工具– 56 种工具,仅在需要时安装
  • 自动清理– 扫描完成后销毁容器
  • 资源限制– 每个容器的内存(2GB)和 CPU(2 核)限制

预装工具(28)

| 类别 | 工具 | | — | — | | 扫描仪 | 核、naabu、httpx、nmap、nikto、masscan、whatweb | | 发现 | subfinder、katana、dnsx、uncover、ffuf、gobuster、waybackurls | | 开发 | dalfox,sqlmap | | 系统 | curl、wget、git、python3、pip3、go、jq、dig、whois、openssl、netcat、bash |

按需工具(还有 28 种)

首次请求时自动安装在容器内:

  • APT:wpscan、dirb、hydra、john、hashcat、testssl、sslscan、enum4linux、dnsrecon、amass、medusa、crackmapexec 等。
  • Go:gau、gitleaks、anew、httprobe
  • Pip:dirsearch、wfuzz、arjun、wafw00f、sslyze、commix、trufflehog、退休

容器池

ContainerPool (global coordinator, max 5 concurrent)
  ├── KaliSandbox(scan_id="abc") → docker: neurosploit-abc
  ├── KaliSandbox(scan_id="def") → docker: neurosploit-def
  └── KaliSandbox(scan_id="ghi") → docker: neurosploit-ghi
  • TTL强制执行– 容器在60分钟后自动销毁
  • 孤立容器清理– 服务器启动时移除过时的容器
  • 优雅回退– 如果 Docker 不可用,则回退到共享容器

抗幻觉与验证

NeuroSploit 使用多层验证流程来消除误报:

验证流程

Finding Candidate
    │
    ▼
┌─────────────────────┐
│ Negative Controls    │  Send benign/empty requests as controls
│ Same behavior = FP   │  -60 confidence if same response
└─────────┬───────────┘
          ▼
┌─────────────────────┐
│ Proof of Execution   │  25+ per-vuln-type proof methods
│ XSS: context check   │  SSRF: metadata markers
│ SQLi: DB errors       │  BOLA: data comparison
└─────────┬───────────┘
          ▼
┌─────────────────────┐
│ AI Interpretation    │  LLM with anti-hallucination prompts
│ Per-type system msgs │  12 composable prompt templates
└─────────┬───────────┘
          ▼
┌─────────────────────┐
│ Confidence Scorer    │  0-100 numeric score
│ ≥90 = confirmed      │  +proof, +impact, +controls
│ ≥60 = likely          │  -baseline_only, -same_behavior
│ <60 = rejected &nbsp; &nbsp; &nbsp; &nbsp;│ &nbsp;Breakdown visible in UI
└─────────┬───────────┘
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ▼
┌─────────────────────┐
│ Validation Judge &nbsp; &nbsp; │ &nbsp;Final verdict authority
│ approve / reject &nbsp; &nbsp; │ &nbsp;Records for adaptive learning
└─────────────────────┘

抗幻觉系统提示

12 个可组合的提示,适用于 7 个任务场景:

  • anti_hallucination– 核心诚实准则
  • proof_of_execution需要确凿证据
  • negative_controls– 与良性请求进行比较
  • anti_severity_inflation– 准确的严重程度评级
  • access_control_intelligence– BOLA/BFLA 数据比较方法

访问控制自适应学习

  • 记录 BOLA/BFLA/IDOR 各领域的 TP/FP 结果
  • 9 种默认响应模式,6 种已知的 FP 模式(WSO2、Keycloak 等)
  • 历史假阳性率会影响未来的置信度评分

Web 图形用户界面

| 首页 | 路线 | 描述 | | — | — | — | | 仪表板 | / | 统计概览、严重程度分布、近期活动动态 | | 自动渗透测试 | /auto | 一键式自主渗透测试,支持三路实时显示 | | 漏洞实验室 | /vuln-lab | 按类型进行漏洞测试(100 种类型,11 个类别) | | 终端代理 | /terminal | 人工智能驱动的交互式安全聊天 + 工具执行 | | 沙盒 | /sandboxes | 实时 Docker 容器监控与管理 | | 人工智能代理 | /scan/new | 手动创建扫描并提示选择 | | 扫描详情 | /scan/:id | 带有置信度徽章的调查结果,暂停/恢复/停止 | | 调度程序 | /scheduler | 定时/间隔自动扫描计划 | | 报告 | /reports | 生成和查看 HTML/PDF/JSON 报告 | | 设置 | /settings | LLM提供商、模型路由、功能开关 |

沙盒仪表盘

对每次扫描的 Kali 容器进行实时监控:

  • 池统计信息– 活动/最大容器数、Docker 状态、TTL
  • 容量条– 可视化利用率指示器
  • 每个容器的卡片– 名称、扫描链接、运行时间、已安装工具、状态
  • 操作– 健康检查、销毁(需确认)、清理过期/孤立文件
  • 5 秒自动轮询,实现实时更新

API 参考

基本 URL

http://localhost:8000/api/v1

终点

扫描

| 方法 | 端点 | 描述 | | — | — | — | | POST | /scans | 创建新扫描 | | GET | /scans | 列出所有扫描结果 | | GET | /scans/{id} | 获取扫描详情 | | POST | /scans/{id}/start | 开始扫描 | | POST | /scans/{id}/stop | 停止扫描 | | POST | /scans/{id}/pause | 暂停扫描 | | POST | /scans/{id}/resume | 恢复扫描 | | DELETE | /scans/{id} | 删除扫描 |

人工智能代理

| 方法 | 端点 | 描述 | | — | — | — | | POST | /agent/run | 启动自主代理 | | GET | /agent/status/{id} | 获取代理状态和调查结果 | | GET | /agent/by-scan/{scan_id} | 扫描ID获取代理 | | POST | /agent/stop/{id} | 停止代理 | | POST | /agent/pause/{id} | 暂停代理 | | POST | /agent/resume/{id} | 简历代理 | | GET | /agent/findings/{id} | 获取详细信息 | | GET | /agent/logs/{id} | 获取代理日志 |

沙盒

| 方法 | 端点 | 描述 | | — | — | — | | GET | /sandbox | 列出容器和池状态 | | GET | /sandbox/{scan_id} | 健康检查容器 | | DELETE | /sandbox/{scan_id} | 销毁容器 | | POST | /sandbox/cleanup | 移除过期容器 | | POST | /sandbox/cleanup-orphans | 移除孤立容器 |

调度程序

| 方法 | 端点 | 描述 | | — | — | — | | GET | /scheduler | 列出已安排的作业 | | POST | /scheduler | 创建计划作业 | | DELETE | /scheduler/{id} | 删除职位 | | POST | /scheduler/{id}/pause | 暂停作业 | | POST | /scheduler/{id}/resume | 简历工作 |

漏洞实验室

| 方法 | 端点 | 描述 | | — | — | — | | GET | /vuln-lab/types | 按类别列出 100 种漏洞类型 | | POST | /vuln-lab/run | 运行按类型漏洞测试 | | GET | /vuln-lab/challenges | 列表挑战运行 | | GET | /vuln-lab/stats | 检测率统计数据 |

报告和仪表盘

| 方法 | 端点 | 描述 | | — | — | — | | POST | /reports | 生成报告 | | POST | /reports/ai-generate | 人工智能驱动的报告 | | GET | /reports/{id}/view | 查看 HTML 报告 | | GET | /dashboard/stats | 仪表盘统计信息 | | GET | /dashboard/activity-feed | 近期活动 |

WebSocket

ws://localhost:8000/ws/scan/{scan_id}

事件:scan_started,,,,progress_update``finding_discovered``scan_completed``scan_error

API 文档

交互式文档可在以下网址获取:

  • Swagger UI:http://localhost:8000/api/docs
  • ReDoc:http://localhost:8000/api/redoc

配置

环境变量

#&nbsp;LLM API Keys (at least one required)ANTHROPIC_API_KEY=your-key OPENAI_API_KEY=your-key GEMINI_API_KEY=your-key#&nbsp;Local LLM (optional)OLLAMA_BASE_URL=http://localhost:11434 LMSTUDIO_BASE_URL=http://localhost:1234 OPENROUTER_API_KEY=your-key#&nbsp;DatabaseDATABASE_URL=sqlite+aiosqlite:///./data/neurosploit.db#&nbsp;ServerHOST=0.0.0.0 PORT=8000 DEBUG=false

config/config.json

{ &nbsp;"llm": { &nbsp; &nbsp;"default_profile":&nbsp;"gemini_pro_default", &nbsp; &nbsp;"profiles": {&nbsp;...&nbsp;} &nbsp; }, &nbsp;"agent_roles": { &nbsp; &nbsp;"pentest_generalist": {&nbsp;"vuln_coverage":&nbsp;100&nbsp;}, &nbsp; &nbsp;"bug_bounty_hunter": {&nbsp;"vuln_coverage":&nbsp;100&nbsp;} &nbsp; }, &nbsp;"sandbox": { &nbsp; &nbsp;"mode":&nbsp;"per_scan", &nbsp; &nbsp;"kali": { &nbsp; &nbsp; &nbsp;"enabled":&nbsp;true, &nbsp; &nbsp; &nbsp;"image":&nbsp;"neurosploit-kali:latest", &nbsp; &nbsp; &nbsp;"max_concurrent":&nbsp;5, &nbsp; &nbsp; &nbsp;"container_ttl_minutes":&nbsp;60&nbsp; &nbsp; &nbsp;} &nbsp; }, &nbsp;"mcp_servers": { &nbsp; &nbsp;"neurosploit_tools": { &nbsp; &nbsp; &nbsp;"transport":&nbsp;"stdio", &nbsp; &nbsp; &nbsp;"command":&nbsp;"python3", &nbsp; &nbsp; &nbsp;"args": ["-m",&nbsp;"core.mcp_server"] &nbsp; &nbsp; } &nbsp; } }

发展

后端

pip install -r requirements.txt uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000#&nbsp;API docs: http://localhost:8000/api/docs

前端

cd&nbsp;frontend npm install npm run dev &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp;Dev server at http://localhost:5173npm run build &nbsp; &nbsp; &nbsp;#&nbsp;Production build

构建 Kali 沙盒

./scripts/build-kali.sh --test &nbsp; &nbsp;#&nbsp;Build + health check

MCP 服务器

python3 -m core.mcp_server &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp;Starts stdio MCP server (12 tools)

项目地址:

https://github.com/CyberSecurityUP/NeuroSploit

一个专注网络数据安全的知识星球,星球提供以下资料:网络数据安全标准规范、制度体系、培训课件、攻防工具教程、解决方案、行业报告等人工智能安全标准规范、研究报告、培训材料等,每天都会更新


免责声明:

本文所载程序、技术方法仅面向合法合规的安全研究与教学场景,旨在提升网络安全防护能力,具有明确的技术研究属性。

任何单位或个人未经授权,将本文内容用于攻击、破坏等非法用途的,由此引发的全部法律责任、民事赔偿及连带责任,均由行为人独立承担,本站不承担任何连带责任。

本站内容均为技术交流与知识分享目的发布,若存在版权侵权或其他异议,请通过邮件联系处理,具体联系方式可点击页面上方的联系我

本文转载自:网络安全民工 《NeuroSploit 一人工智能自动化渗透测试平台》

大模型蒸馏攻击 网络安全文章

大模型蒸馏攻击

文章总结: 大模型蒸馏攻击通过黑盒API批量查询窃取模型能力,无需入侵即可低成本克隆模型。文章详述攻击流程与Gemini、Claude真实案例,指出其窃取知识产
评论:0   参与:  0