HyperSecurityLabs/oxide-communityedtion-v8.3.1
GitHub: HyperSecurityLabs/oxide-communityedtion-v8.3.1
一款基于Rust、利用AI/ML进行增强的下一代Web漏洞扫描器,专注于通过零日检测与自动化分析提升攻击性安全评估的深度和效率。
Stars: 3 | Forks: 0
# ommunity edition" is not a proper noun but a descriptor; I can translate it. However, the original has "communityedtion" which might be a typo, but I should stick to the original text. To be safe, I'll keep "oxide-communityedtion-v8.3.1" mostly in English, but translate "community edition" if it's part of the name. Let's assume "oxide" is the project name, so keep it. For translation: "oxide 社区版 v8.3.1" or something similar. But the example shows that for 'Kubernetes Setup', it's 'Kubernetes 设置', so "Kubernetes" is kept in English, "Setup" is translated. Here, "oxide" should be kept, "community edition" can be translated, and "v8.3.1" kept as is. So, perhaps "oxide 社区版 v8.3.1".
开放式可扩展智能与检测引擎 — 一款采用 Rust 编写、AI 增强的 Web 漏洞扫描器,具备机器学习驱动的零日漏洞检测、加密测试数据库和跨平台支持。
## ⚡ 功能亮点
### 🔍 漏洞扫描模块
| 模块 | 描述 |
|--------|-------------|
| `sqli` | SQL 注入 — 基于错误、盲注、基于时间 |
| `blind-sqli` | 带有计时分析的盲注 SQL 注入 |
| `xss` | 跨站脚本 — 反射型、存储型、DOM 型 |
| `lfi` | 带有路径遍历链的本地文件包含 |
| `path-traversal` | 跨操作系统变体的目录遍历 |
| `cmd-injection` | 操作系统命令注入检测 |
| `cors` | CORS 错误配置评估 |
| `tls` | 完整的 TLS/SSL 安全审计 |
| `creds` | 默认凭据暴力破解(6000+ 种组合) |
| `common` | 类似 Nikto 的常见应用检查(2790+ 项测试) |
| `db-fingerprint` | 数据库引擎指纹识别 |
| `insta` | Instagram 开源情报 — 粉丝数、私密状态、头像 |
| `session` | 会话劫持测试 — Cookie 标志、固定化、可预测性 |
| `train` | 机器学习分类器训练器 — 从实时扫描结果中学习 |
### 🤖 AI / 机器学习引擎
- **零日检测** — 使用 `smartcore` (随机森林、支持向量机) 和 `linfa` 聚类进行统计异常检测
- **模式学习器** — 基于响应模式的自适应载荷变异
- **漏洞利用分析器** — AI 驱动的漏洞利用链分析
- **响应分析器** — HTTP 响应的行为指纹识别
- **载荷变异器** — 机器学习引导的载荷进化
### 🕷️ 爬取与发现
- 异步多线程网络爬虫,可配置深度和 URL 限制
- JavaScript 感知爬取 (`crawler_js`)
- 自动发现所有爬取 URL 的参数
- 表单输入提取和端点映射
### 🛡️ 高级功能
| 功能 | 详情 |
|---------|---------|
| **API 模糊器** | REST/GraphQL 端点模糊测试 |
| **WebSocket 扫描器** | WS/WSS 协议漏洞测试 |
| **规避引擎** | 内置 WAF 绕过技术 |
| **会话管理器** | Cookie/令牌感知扫描 |
| **速率限制器** | 通过 `governor` 进行可配置的请求节流 |
| **集群模式** | 跨节点的分布式扫描 |
| **插件系统** | 通过 `libloading` 动态加载插件 |
| **机器学习检测器** | 基于异常的检测层 |
| **代理库** | 共享库代理中间件 (`liboxide_proxy.{so,dll}`) |
| **Instagram 开源情报** | 粉丝数、私密检测、头像下载 |
| **会话劫持测试** | Cookie 标志、固定化、令牌可预测性 |
| **加密测试数据库** | 2623 项测试存储在 XOR 加密的 SQLite 中,运行时加载 |
| **东京之夜主题** | 通过 `oxide_build.sh --tokyo-night` 切换终端调色板 |
### 📊 报告
- 输出格式:**JSON**, **HTML**, **CSV**, **XML**
- 按严重性分类的发现结果:严重 / 高 / 中 / 低 / 信息
- 自动下载发现的敏感文件 (`--download`)
- 详细模式,提供完整证据和修复指南
## 🚀 安装说明
### 前置条件
- [Rust](https://rustup.rs/) 1.75+ (2021 版)
- Cargo (与 Rust 捆绑)
- **Linux** (主要目标) / **Windows** / **macOS**
### 从源代码构建
```
git clone https://github.com/hypersecuritylabs/oxide-communityedition-v8.3.1
cd oxide-communityedition-v8.3.1
# 2. "Quick build (default debug)" – Translate "Quick build" to "快速构建", and "default debug" to "默认调试". So, "快速构建 (默认调试)".
cargo build
# 3. "Release build" – "Release build" is common in software development, so translate to "发布构建".
cargo build --release
# 4. "Or use the build script with theme customization" – "Or" is "或者", "use the build script" is "使用构建脚本", "with theme customization" is "带有主题定制". So, "或者使用构建脚本进行主题定制".
./oxide_build.sh --release --tokyo-night
```
二进制文件将位于 `./target/release/oxide` 或 `./target/debug/oxide`。
### ⚙️ 代理共享库
OXIDE 需要一个代理动态库 —— `liboxide_proxy.so` (Linux) 或 `liboxide_proxy.dll` (Windows) —— 提供代理路由、认证、URL 混淆和轮换逻辑。二进制文件**没有它将拒绝运行**。
**构建它:**
```
cd oxide-proxy
cargo build --release
```
**安装它** (选择其一):
```
# 5. "Next to the binary (auto-detected)" – "Next to the binary" means placing something adjacent to the binary file, so "在二进制文件旁", "(auto-detected)" is "(自动检测)". So, "在二进制文件旁 (自动检测)".
cp oxide-proxy/target/release/liboxide_proxy.so target/release/
# 6. "System-wide (Linux)" – "System-wide" means for the entire system, so "系统范围 (Linux)". "Linux" is a proper noun, keep in English.
sudo cp oxide-proxy/target/release/liboxide_proxy.so /usr/lib/
# 7. "Custom path (Linux)" – "Custom path" is "自定义路径", so "自定义路径 (Linux)".
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/liboxide_proxy.so
```
在 **Windows** 上,文件是 `liboxide_proxy.dll`;将其放在 `oxide.exe` 同一目录下或设置 `PATH`。
### 🔒 加密测试数据库
OXIDE 附带一个预先构建的加密 SQLite 数据库 (`cgi_database/oxide_tests.db.enc`),其中包含跨越 32 个类别的 2623 项漏洞测试。若需从源 CSV(私有,不在仓库中)重新构建:
```
# 8. "Requires the CSV source files (you must obtain them separately)" – "Requires" is "需要", "the CSV source files" is "CSV 源文件", "(you must obtain them separately)" is "(必须单独获取)". So, "需要 CSV 源文件 (必须单独获取)".
python3 tools/build_db.py
```
### 构建脚本
使用 `oxide_build.sh` 进行主题定制和数据库管理:
```
# 9. "Default debug build, Gruvbox theme" – "Default debug build" is "默认调试构建", "Gruvbox theme" – "Gruvbox" is likely a theme name, so keep in English. So, "默认调试构建,Gruvbox 主题".
./oxide_build.sh
# 10. "Tokyo Night theme + release mode" – "Tokyo Night theme" is "Tokyo Night 主题", "+ release mode" is "+ 发布模式". So, "Tokyo Night 主题 + 发布模式".
./oxide_build.sh --tokyo-night --release
# 11. "Revert to Gruvbox" – "Revert to" is "恢复到", "Gruvbox" keep in English. So, "恢复到 Gruvbox".
./oxide_build.sh --revert-theme
# 12. "Rebuild encrypted DB from CSVs" – "Rebuild" is "重建", "encrypted DB" is "加密数据库", "from CSVs" is "从 CSVs". "CSVs" might be kept as is or translated, but since it's a file format, keep in English. So, "从 CSVs 重建加密数据库".
./oxide_build.sh --build-db
```
### 优化发布构建
发布配置已预先配置以获得最佳性能:
```
opt-level = 3
lto = "thin"
codegen-units = 1
```
## 🪟 Windows 兼容性
OXIDE 使用纯 Rust 构建,并通过 `x86_64-pc-windows-gnu` (MinGW) 和 `x86_64-pc-windows-msvc` (MSVC) **交叉编译到 Windows**。
| 组件 | Windows 状态 |
|-----------|---------------|
| 核心扫描器 | ✅ 完全支持 |
| 命令行界面与显示 | ✅ 完全支持 (彩色输出) |
| SQLite 数据库 | ✅ `rusqlite` 附带捆绑的 SQLite |
| HTTP 客户端 | ✅ reqwest 使用 native-tls 或 rustls |
| 代理库 | ✅ 构建为 `liboxide_proxy.dll` (cdylib) |
| Instagram 开源情报 | ✅ 纯 HTTP 请求 |
| 会话劫持 | ✅ 纯 HTTP 请求 |
| 机器学习引擎 | ✅ smartcore / linfa / ndarray |
| 速率限制器 | ✅ governor |
| DNS 解析器 | ✅ trust-dns-resolver |
| `pnet` (原始数据包) | ⚠️ 有限 — 使用 `--no-default-features` 禁用 |
**为 Windows 构建 (从 Linux 交叉编译):**
```
# 13. "GNU toolchain (recommended — no MSVC linker required)" – "GNU toolchain" – "GNU" is a proper noun, keep in English, "toolchain" translate to "工具链". So, "GNU 工具链 (推荐 — 无需 MSVC 链接器)". "MSVC" is a proper noun, keep in English, "linker" is "链接器".
rustup target add x86_64-pc-windows-gnu
cargo build --release --target x86_64-pc-windows-gnu
# 14. "MSVC toolchain (requires mingw-w64 or native MSVC)" – "MSVC toolchain" is "MSVC 工具链", "(requires mingw-w64 or native MSVC)" – "requires" is "需要", "mingw-w64" keep in English, "or native MSVC" is "或原生 MSVC". So, "MSVC 工具链 (需要 mingw-w64 或原生 MSVC)".
rustup target add x86_64-pc-windows-msvc
cargo build --release --target x86_64-pc-windows-msvc
```
**或在 Windows 上本地构建:**
```
cargo build --release
# 15. "Place liboxide_proxy.dll next to oxide.exe" – "Place" is "放置", "liboxide_proxy.dll" and "oxide.exe" are file names, keep in English, "next to" is "旁边". So, "将 liboxide_proxy.dll 放置在 oxide.exe 旁边".
```
**环境变量** (Windows): `set OXIDE_DB_DIR=C:\path\to\cgi_database`
## 🧩 代理库系统
### 工作原理
代理系统分为两部分:
**1. `oxide-proxy/` (cdylib → `liboxide_proxy.so`)**
一个独立的 Rust 库,编译为 C 兼容的动态库 (`cdylib`),导出 7 个 `extern "C"` 函数:
| 导出 | 签名 | 目的 |
|--------|-----------|---------|
| `proxy_ping` | `() -> u32` | 健康检查 — 返回版本字符串长度 |
| `proxy_route` | `(target, *mut Config) -> i32` | 根据目标 URL 选择代理类型 (HTTP/HTTPS/SOCKS5) |
| `proxy_auth` | `(username, password) -> i32` | 验证并进行 Base64 编码代理凭据 |
| `proxy_obfuscate` | `(input, *mut buf, max_len) -> i32` | XOR (0xAA) 混淆代理 URL |
| `proxy_deobfuscate` | `(input, *mut buf, max_len) -> i32` | 逆转混淆 |
| `proxy_rotation_seed` | `() -> u64` | 基于时间的代理轮换池种子 |
| `proxy_validate` | `(*const Config) -> i32` | 验证代理配置结构 (主机, 端口) |
.so 文件使用 `opt-level = "z"`, `lto = "fat"`, `panic = "abort"` 构建并进行剥离 —— 产生 **278KB** 的二进制体积。
**2. `src/http/proxy_loader.rs` (加载器)**
启动时通过 `libloading` 加载。流程:
```
main() → ensure_proxy_library()
│
├─ Finds .so (CWD → /usr/lib/ → /usr/local/lib/ → /opt/oxide/lib/ → LD_LIBRARY_PATH)
├─ Opens via libloading::Library
├─ Verifies all 7 symbols exist
├─ Stores Arc in OnceLock global
└─ Prints version on success, exits on failure
```
加载后,安全的 Rust 包装器 (`proxy_route()`, `proxy_auth()` 等) 使用正确的 `CString` 编组调用 C ABI 函数。全局的 `OnceLock` 确保库在启动时加载**一次** —— 后续调用是无锁读取。
### 为什么使用共享库?
- **运行时强制** — 二进制文件没有它就拒绝运行;防止独立二进制文件滥用
- **可独立更新** — 替换 .so 而无需重新编译扫描器
- **FFI 沙箱** — 代理逻辑在单独的编译单元中运行,使用 `panic=abort`
- **混淆隔离** — XOR 密钥存在于 .so 中,而非主二进制文件
## 🎯 使用方法
```
oxide --url [OPTIONS]
```
### 基本扫描
```
oxide --url https://target.example.com
```
### 全模块扫描
```
oxide --url https://target.example.com --modules all --threads 20 --verbose
```
### 目标模块扫描
```
oxide --url https://target.example.com --modules sqli,xss,cors,tls
```
### 保存报告
```
oxide --url https://target.example.com --output report.html --format html
```
### 零日检测模式
```
oxide --url https://target.example.com --zeroday --verbose
```
### 隐蔽 / 速率限制扫描
```
oxide --url https://target.example.com --rate-limit 5 --silent-mode
```
### 带认证扫描
```
oxide --url https://target.example.com \
--cookie "session=abc123" \
--header "Authorization: Bearer "
```
## 🧰 命令行参考
| 标志 | 默认值 | 描述 |
|------|---------|-------------|
| `-u, --url` | 必需 | 目标 URL |
| `-t, --threads` | `10` | 并发工作线程 |
| `-T, --timeout` | `30` | 请求超时时间 (秒) |
| `-o, --output` | — | 输出文件路径 |
| `-f, --format` | `json` | 报告格式:`json`, `html`, `csv`, `xml` |
| `--modules` | `all` | 逗号分隔的模块列表 |
| `--exclude` | — | 要跳过的模块 |
| `--exploitation-level` | `50` | 攻击性级别 (1–100) |
| `--payload-limit` | `50` | 每端点最大载荷数 |
| `--crawl-depth` | `3` | 爬虫递归深度 |
| `--max-urls` | `100` | 最大爬取 URL 数 |
| `--rate-limit` | — | 每秒请求上限 |
| `--proxy` | — | HTTP/HTTPS 代理 URL |
| `--user-agent` | — | 自定义 User-Agent 字符串 |
| `--cookie` | — | 会话 Cookie |
| `--header` | — | 额外的请求头 (可重复) |
| `--follow-redirects` | false | 跟随 HTTP 重定向 |
| `--insecure` | false | 禁用 TLS 验证 |
| `--download` | false | 自动保存发现的敏感文件 |
| `--zeroday` | false | 启用零日机器学习检测 |
| `--train` | false | 从实时扫描结果训练机器学习分类器 |
| `--insta` | false | 启用 Instagram 开源情报模块 |
| `--session` | false | 启用会话劫持测试模块 |
| `--silent-mode` | false | 抑制非必要输出 |
| `-v, --verbose` | false | 完整的详细输出 |
### 可用模块
```
all · engine · static · agent · body · fingerprint · tls · common
cors · creds · sqli · xss · lfi · path-traversal · cmd-injection
blind-sqli · db-fingerprint · parameter-discovery · fuzz · insta
session · zeroday · train
```
## 🏗️ 架构
```
OxideCommunityEdtionv8.3/
├── src/
│ ├── main.rs # Entry point & banner (Gruvbox + Rosé Pine)
│ ├── hybrid.rs # HybridScanner orchestrator (12-phase scan pipeline)
│ ├── agent.rs # AgentPool — parallel agent-based scanning
│ ├── crawls.rs # Async web crawler
│ ├── recon.rs # Reconnaissance module
│ ├── db.rs # Encrypted SQLite DB loader (XOR decrypt + rusqlite)
│ ├── filter.rs # False-positive filter
│ ├── lib.rs # Crate root — all `pub mod` declarations
│ │
│ ├── insta/ # Instagram OSINT
│ │ └── mod.rs # follower_count, is_private, download_profile_pic
│ ├── session_hijack/ # Session hijack testing
│ │ └── mod.rs # cookie flags, fixation, predictability
│ │
│ ├── core/ # Scan engine core
│ │ ├── engine.rs # ScanEngine
│ │ ├── scanner.rs # Scanner primitives
│ │ ├── worker.rs # ParallelScanner + WorkerPool
│ │ ├── coordinator.rs # Progress tracking
│ │ └── dispatcher.rs # Parallel HTTP dispatcher
│ │
│ ├── scanner/ # Vulnerability-specific scanners
│ │ ├── sqli_scanner.rs
│ │ ├── blind_sqli_scanner.rs
│ │ ├── xss_scanner.rs
│ │ ├── lfi_scanner.rs
│ │ ├── path_traversal_scanner.rs
│ │ ├── cmd_injection_scanner.rs
│ │ ├── cors_scanner.rs
│ │ ├── tls_scanner.rs
│ │ ├── default_creds_scanner.rs
│ │ ├── common_app_scanner.rs
│ │ ├── db_fingerprinter.rs
│ │ └── precision.rs
│ │
│ ├── ai/ # AI-powered analysis
│ │ ├── exploit_analyzer.rs
│ │ ├── response_analyzer.rs
│ │ ├── payload_mutator.rs
│ │ └── pattern_learner.rs
│ │
│ ├── zero_DAY/ # Zero-day ML detection
│ │ ├── engine.rs # ZeroDayEngine
│ │ ├── classifier.rs # ML classifier (Random Forest / SVM)
│ │ ├── baseline.rs # Behavioral baseline builder
│ │ ├── anomaly.rs # Anomaly scoring
│ │ ├── features.rs # Feature extraction
│ │ └── trainer.rs # ML trainer — auto-index scanners → train → export model
│ │
│ ├── advanced/ # Advanced offensive features
│ │ ├── api_fuzzer.rs
│ │ ├── evasion.rs
│ │ ├── websocket.rs
│ │ ├── cluster.rs
│ │ ├── session.rs
│ │ ├── ml_detector.rs
│ │ ├── crawler_js.rs
│ │ ├── rate_limiter.rs
│ │ ├── cache.rs
│ │ └── plugin.rs
│ │
│ ├── payload/ # Payload generation & mutation
│ │ ├── generator.rs
│ │ ├── mutator.rs
│ │ ├── fuzzer.rs
│ │ ├── encoder.rs
│ │ ├── sql_injection.rs
│ │ ├── xss.rs
│ │ ├── lfi.rs
│ │ ├── command_injection.rs
│ │ └── path_traversal.rs
│ │
│ ├── detection/ # Detection & analysis
│ │ ├── analyzer.rs # Finding + Severity types
│ │ ├── signatures.rs # Vulnerability signature DB
│ │ ├── behavior.rs # Behavioral analysis
│ │ ├── timing.rs # Time-based detection
│ │ ├── confirm.rs # Vulnerability confirmation
│ │ └── matcher.rs
│ │
│ ├── http/ # HTTP layer
│ │ ├── client.rs # Async HTTP client (reqwest)
│ │ ├── request.rs
│ │ ├── response.rs
│ │ ├── headers.rs
│ │ ├── cookies.rs
│ │ ├── redirect.rs
│ │ ├── tls.rs
│ │ ├── useragents.rs
│ │ └── proxy_loader.rs # Dynamic library loader (FFI wrappers)
│ │
│ ├── report/ # Report generation
│ │ ├── generator.rs
│ │ ├── json.rs
│ │ ├── html.rs
│ │ ├── csv.rs
│ │ └── xml.rs
│ │
│ ├── cli/ # CLI interface
│ │ ├── args.rs # Clap argument definitions
│ │ ├── display.rs # Terminal display engine (Gruvbox / Tokyo Night)
│ │ ├── output.rs
│ │ ├── progress.rs
│ │ ├── spinner.rs
│ │ ├── colors.rs
│ │ ├── config.rs
│ │ └── parser.rs
│ │
│ └── utils/ # Utilities
│ ├── url.rs
│ ├── encoding.rs # Base64, hex, URL, HTML, unicode
│ ├── time.rs
│ └── downloader.rs
│
├── oxide-proxy/ # Proxy shared library (cdylib)
│ ├── Cargo.toml
│ └── src/
│ └── lib.rs # 7 extern "C" exports
│
├── cgi_database/
│ └── oxide_tests.db.enc # Encrypted SQLite test database (2623 tests)
│
└── tools/
└── build_db.py # Rebuild encrypted DB from CSV source files
```
## 📋 更新日志 — v8.3.1
### 新功能
- **加密 SQLite 测试数据库** — 2623 项测试,跨越 32 个类别,存储在单个 XOR 加密的 `.db.enc` 文件中;通过 `rusqlite` 及捆绑的 SQLite 在运行时加载
- **Instagram 开源情报模块** (`--insta`) — 抓取公开资料以获取粉丝数、私密/认证状态、简介、头像下载
- **会话劫持测试** (`--session`) — OWASP 最佳实践 Cookie 标志检查 (HttpOnly, Secure, SameSite, Path, 过期时间)、会话固定、令牌可预测性
- **机器学习分类器训练器** (`--train`) — 对实时目标运行 TLS/CORS/CommonApp/Creds 扫描器,收集 `(ResponseFeatures, is_vulnerable)` 配对,训练随机森林,导出 `zero_day_model.bin` + `.json`
- **东京之夜主题** — 通过 `./oxide_build.sh --tokyo-night` 切换终端调色板 (默认:Gruvbox Dark + Rosé Pine 强调色)
### 改进
- **Windows 交叉编译** — 完全支持 `x86_64-pc-windows-gnu` 和 `x86_64-pc-windows-msvc`;代理库构建为 `liboxide_proxy.dll`
- **代理加载器 — 平台感知** — 自动检测 `.so` (Linux) 与 `.dll` (Windows);相应地搜索 `LD_LIBRARY_PATH` 或 `PATH`
- **主动侦察 — 仅限 Linux** — `pnet` 原始 TCP 套接字模块被 `#[cfg(target_os = "linux")]` 控制;被动 HTTP 侦察在所有平台运行
- **显示大修** — 所有输出使用 Gruvbox Dark 颜色常量 + Rosé Pine 强调色;框式严重性徽章、全宽完成横幅、树形风格阶段标题
- **构建脚本** (`oxide_build.sh`) — `--tokyo-night`, `--revert-theme`, `--release`, `--build-db`, `--help`
- **数据库路径** — `src/db.rs` 中单个 `DB_DIR` 常量;可通过 `OXIDE_DB_DIR` 环境变量配置
### 清理
- **零 Rust 警告** — 消除了所有 109 个 `dead_code` 警告;移除了未使用的结构体字段、方法、常量和死代码模块;零 `#[allow(dead_code)]`
- **孤立代码已移除** — 从 `main.rs` 中删除了重复的 `print_scan_info` 函数体
- **横幅简化** — 块状艺术横幅替换为来自 `banner` 文件的 ASCII 艺术;添加了 `/evergreen okay` 标语
- **CSV 回退已移除** — `common_app_scanner.rs` 不再加载单个 CSV 文件;加密数据库是唯一数据源
- **未使用的导入已清理** — 从死代码路径中移除了 `GB_FG`, `GB_RED_B`, `GB_AQU_B`, `GB_GRY_B`, `GB_PUR_B`, `RP_GOLD`, `RP_ROSE`, `Progress`
### 安全
- **XOR 加密** — 数据库静态加密,密钥与版本绑定 (`OXIDE::v8.3.1::HyperSecurityOffensiveLabs`)
- **SQLite 魔术头验证** — 解密临时文件在打开前进行验证
- **临时文件清理** — 解密后的数据库在加载后立即删除
## 🧪 测试数据库
OXIDE 附带一个预先构建的**加密 SQLite 数据库** (`cgi_database/oxide_tests.db.enc`),包含 **2623 项漏洞测试**,跨越 **32 个类别**:
- Web API 与微服务
- 云 (AWS, GCP, Azure, Kubernetes)
- 基础设施与数据库
- DevOps / CI-CD 管道
- AI/ML 端点
- Web3 与区块链
- 无服务器函数
- 遗留系统与管理面板
- 移动端后端
- 供应链端点
- 网络基础设施
- 拒绝服务与隐蔽测试
- 泄露数据暴露
- 配置与密钥暴露
- 备份与日志文件
- ……等等
数据库在运行时加载,XOR 解密到内存,并通过 SQLite 查询。源 CSV 文件保密;仅分发 `.enc` 文件。
## 🔬 技术栈
| 包 | 目的 |
|-------|---------|
| `tokio` | 异步运行时 |
| `reqwest` | HTTP 客户端 (gzip, brotli, cookies) |
| `clap` | 命令行参数解析 |
| `scraper` | HTML 解析与爬取 |
| `smartcore` | 机器学习算法 (随机森林, 支持向量机) |
| `linfa` | 机器学习聚类与预处理 |
| `ndarray` | 机器学习用的 N 维数组 |
| `statrs` | 统计分布 |
| `rustls` | TLS 实现 |
| `trust-dns-resolver` | DNS 解析 |
| `governor` | 速率限制 |
| `libloading` | 动态库加载 (代理 .so, 插件) |
| `base64` | 代理凭据编码 |
| `serde` / `serde_json` | 序列化 |
| `colored` | 终端彩色输出 |
| `regex` | 模式匹配 |
| `sha2` / `sha1` / `md5` | 加密哈希 |
| `uuid` | 唯一扫描标识符 |
| `chrono` | 时间戳与持续时间 |
| `rusqlite` | 嵌入式 SQLite 数据库引擎 (捆绑) |
| `csv` | CSV 解析 (遗留回退) |
## 👤 作者
```
____ _ __ ________ ______
/ __ \ |/ // _/ __ \/ ____/
/ / / / / / // / / / __/
/ /_/ / |_/ // /_/ / /___
\____/_/|_/___/_____/_____/
```
### **开放式可扩展智能与检测引擎**
#### *基于 🦀 Rust 构建 · 由 AI/ML 驱动 · 专为攻击性安全设计*
## 🧬 什么是 OXIDE?
**OXIDE** (开放式可扩展智能与检测引擎) 是一款完全采用 **Rust** 编写的下一代、AI 增强的 Web 漏洞扫描器。它结合了系统级编程的原始性能和机器学习驱动的检测能力,以发现传统扫描器所遗漏的问题。
从经典的 SQL 注入和 XSS,到使用真实机器学习模型的零日异常检测 —— OXIDE 是为现代攻击性安全专业人员构建的。
## ⚡ 功能亮点
### 🔍 漏洞扫描模块
| 模块 | 描述 |
|--------|-------------|
| `sqli` | SQL 注入 — 基于错误、盲注、基于时间 |
| `blind-sqli` | 带有计时分析的盲注 SQL 注入 |
| `xss` | 跨站脚本 — 反射型、存储型、DOM 型 |
| `lfi` | 带有路径遍历链的本地文件包含 |
| `path-traversal` | 跨操作系统变体的目录遍历 |
| `cmd-injection` | 操作系统命令注入检测 |
| `cors` | CORS 错误配置评估 |
| `tls` | 完整的 TLS/SSL 安全审计 |
| `creds` | 默认凭据暴力破解(6000+ 种组合) |
| `common` | 类似 Nikto 的常见应用检查(2790+ 项测试) |
| `db-fingerprint` | 数据库引擎指纹识别 |
| `insta` | Instagram 开源情报 — 粉丝数、私密状态、头像 |
| `session` | 会话劫持测试 — Cookie 标志、固定化、可预测性 |
| `train` | 机器学习分类器训练器 — 从实时扫描结果中学习 |
### 🤖 AI / 机器学习引擎
- **零日检测** — 使用 `smartcore` (随机森林、支持向量机) 和 `linfa` 聚类进行统计异常检测
- **模式学习器** — 基于响应模式的自适应载荷变异
- **漏洞利用分析器** — AI 驱动的漏洞利用链分析
- **响应分析器** — HTTP 响应的行为指纹识别
- **载荷变异器** — 机器学习引导的载荷进化
### 🕷️ 爬取与发现
- 异步多线程网络爬虫,可配置深度和 URL 限制
- JavaScript 感知爬取 (`crawler_js`)
- 自动发现所有爬取 URL 的参数
- 表单输入提取和端点映射
### 🛡️ 高级功能
| 功能 | 详情 |
|---------|---------|
| **API 模糊器** | REST/GraphQL 端点模糊测试 |
| **WebSocket 扫描器** | WS/WSS 协议漏洞测试 |
| **规避引擎** | 内置 WAF 绕过技术 |
| **会话管理器** | Cookie/令牌感知扫描 |
| **速率限制器** | 通过 `governor` 进行可配置的请求节流 |
| **集群模式** | 跨节点的分布式扫描 |
| **插件系统** | 通过 `libloading` 动态加载插件 |
| **机器学习检测器** | 基于异常的检测层 |
| **代理库** | 共享库代理中间件 (`liboxide_proxy.{so,dll}`) |
| **Instagram 开源情报** | 粉丝数、私密检测、头像下载 |
| **会话劫持测试** | Cookie 标志、固定化、令牌可预测性 |
| **加密测试数据库** | 2623 项测试存储在 XOR 加密的 SQLite 中,运行时加载 |
| **东京之夜主题** | 通过 `oxide_build.sh --tokyo-night` 切换终端调色板 |
### 📊 报告
- 输出格式:**JSON**, **HTML**, **CSV**, **XML**
- 按严重性分类的发现结果:严重 / 高 / 中 / 低 / 信息
- 自动下载发现的敏感文件 (`--download`)
- 详细模式,提供完整证据和修复指南
## 🚀 安装说明
### 前置条件
- [Rust](https://rustup.rs/) 1.75+ (2021 版)
- Cargo (与 Rust 捆绑)
- **Linux** (主要目标) / **Windows** / **macOS**
### 从源代码构建
```
git clone https://github.com/hypersecuritylabs/oxide-communityedition-v8.3.1
cd oxide-communityedition-v8.3.1
# 2. "Quick build (default debug)" – Translate "Quick build" to "快速构建", and "default debug" to "默认调试". So, "快速构建 (默认调试)".
cargo build
# 3. "Release build" – "Release build" is common in software development, so translate to "发布构建".
cargo build --release
# 4. "Or use the build script with theme customization" – "Or" is "或者", "use the build script" is "使用构建脚本", "with theme customization" is "带有主题定制". So, "或者使用构建脚本进行主题定制".
./oxide_build.sh --release --tokyo-night
```
二进制文件将位于 `./target/release/oxide` 或 `./target/debug/oxide`。
### ⚙️ 代理共享库
OXIDE 需要一个代理动态库 —— `liboxide_proxy.so` (Linux) 或 `liboxide_proxy.dll` (Windows) —— 提供代理路由、认证、URL 混淆和轮换逻辑。二进制文件**没有它将拒绝运行**。
**构建它:**
```
cd oxide-proxy
cargo build --release
```
**安装它** (选择其一):
```
# 5. "Next to the binary (auto-detected)" – "Next to the binary" means placing something adjacent to the binary file, so "在二进制文件旁", "(auto-detected)" is "(自动检测)". So, "在二进制文件旁 (自动检测)".
cp oxide-proxy/target/release/liboxide_proxy.so target/release/
# 6. "System-wide (Linux)" – "System-wide" means for the entire system, so "系统范围 (Linux)". "Linux" is a proper noun, keep in English.
sudo cp oxide-proxy/target/release/liboxide_proxy.so /usr/lib/
# 7. "Custom path (Linux)" – "Custom path" is "自定义路径", so "自定义路径 (Linux)".
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/liboxide_proxy.so
```
在 **Windows** 上,文件是 `liboxide_proxy.dll`;将其放在 `oxide.exe` 同一目录下或设置 `PATH`。
### 🔒 加密测试数据库
OXIDE 附带一个预先构建的加密 SQLite 数据库 (`cgi_database/oxide_tests.db.enc`),其中包含跨越 32 个类别的 2623 项漏洞测试。若需从源 CSV(私有,不在仓库中)重新构建:
```
# 8. "Requires the CSV source files (you must obtain them separately)" – "Requires" is "需要", "the CSV source files" is "CSV 源文件", "(you must obtain them separately)" is "(必须单独获取)". So, "需要 CSV 源文件 (必须单独获取)".
python3 tools/build_db.py
```
### 构建脚本
使用 `oxide_build.sh` 进行主题定制和数据库管理:
```
# 9. "Default debug build, Gruvbox theme" – "Default debug build" is "默认调试构建", "Gruvbox theme" – "Gruvbox" is likely a theme name, so keep in English. So, "默认调试构建,Gruvbox 主题".
./oxide_build.sh
# 10. "Tokyo Night theme + release mode" – "Tokyo Night theme" is "Tokyo Night 主题", "+ release mode" is "+ 发布模式". So, "Tokyo Night 主题 + 发布模式".
./oxide_build.sh --tokyo-night --release
# 11. "Revert to Gruvbox" – "Revert to" is "恢复到", "Gruvbox" keep in English. So, "恢复到 Gruvbox".
./oxide_build.sh --revert-theme
# 12. "Rebuild encrypted DB from CSVs" – "Rebuild" is "重建", "encrypted DB" is "加密数据库", "from CSVs" is "从 CSVs". "CSVs" might be kept as is or translated, but since it's a file format, keep in English. So, "从 CSVs 重建加密数据库".
./oxide_build.sh --build-db
```
### 优化发布构建
发布配置已预先配置以获得最佳性能:
```
opt-level = 3
lto = "thin"
codegen-units = 1
```
## 🪟 Windows 兼容性
OXIDE 使用纯 Rust 构建,并通过 `x86_64-pc-windows-gnu` (MinGW) 和 `x86_64-pc-windows-msvc` (MSVC) **交叉编译到 Windows**。
| 组件 | Windows 状态 |
|-----------|---------------|
| 核心扫描器 | ✅ 完全支持 |
| 命令行界面与显示 | ✅ 完全支持 (彩色输出) |
| SQLite 数据库 | ✅ `rusqlite` 附带捆绑的 SQLite |
| HTTP 客户端 | ✅ reqwest 使用 native-tls 或 rustls |
| 代理库 | ✅ 构建为 `liboxide_proxy.dll` (cdylib) |
| Instagram 开源情报 | ✅ 纯 HTTP 请求 |
| 会话劫持 | ✅ 纯 HTTP 请求 |
| 机器学习引擎 | ✅ smartcore / linfa / ndarray |
| 速率限制器 | ✅ governor |
| DNS 解析器 | ✅ trust-dns-resolver |
| `pnet` (原始数据包) | ⚠️ 有限 — 使用 `--no-default-features` 禁用 |
**为 Windows 构建 (从 Linux 交叉编译):**
```
# 13. "GNU toolchain (recommended — no MSVC linker required)" – "GNU toolchain" – "GNU" is a proper noun, keep in English, "toolchain" translate to "工具链". So, "GNU 工具链 (推荐 — 无需 MSVC 链接器)". "MSVC" is a proper noun, keep in English, "linker" is "链接器".
rustup target add x86_64-pc-windows-gnu
cargo build --release --target x86_64-pc-windows-gnu
# 14. "MSVC toolchain (requires mingw-w64 or native MSVC)" – "MSVC toolchain" is "MSVC 工具链", "(requires mingw-w64 or native MSVC)" – "requires" is "需要", "mingw-w64" keep in English, "or native MSVC" is "或原生 MSVC". So, "MSVC 工具链 (需要 mingw-w64 或原生 MSVC)".
rustup target add x86_64-pc-windows-msvc
cargo build --release --target x86_64-pc-windows-msvc
```
**或在 Windows 上本地构建:**
```
cargo build --release
# 15. "Place liboxide_proxy.dll next to oxide.exe" – "Place" is "放置", "liboxide_proxy.dll" and "oxide.exe" are file names, keep in English, "next to" is "旁边". So, "将 liboxide_proxy.dll 放置在 oxide.exe 旁边".
```
**环境变量** (Windows): `set OXIDE_DB_DIR=C:\path\to\cgi_database`
## 🧩 代理库系统
### 工作原理
代理系统分为两部分:
**1. `oxide-proxy/` (cdylib → `liboxide_proxy.so`)**
一个独立的 Rust 库,编译为 C 兼容的动态库 (`cdylib`),导出 7 个 `extern "C"` 函数:
| 导出 | 签名 | 目的 |
|--------|-----------|---------|
| `proxy_ping` | `() -> u32` | 健康检查 — 返回版本字符串长度 |
| `proxy_route` | `(target, *mut Config) -> i32` | 根据目标 URL 选择代理类型 (HTTP/HTTPS/SOCKS5) |
| `proxy_auth` | `(username, password) -> i32` | 验证并进行 Base64 编码代理凭据 |
| `proxy_obfuscate` | `(input, *mut buf, max_len) -> i32` | XOR (0xAA) 混淆代理 URL |
| `proxy_deobfuscate` | `(input, *mut buf, max_len) -> i32` | 逆转混淆 |
| `proxy_rotation_seed` | `() -> u64` | 基于时间的代理轮换池种子 |
| `proxy_validate` | `(*const Config) -> i32` | 验证代理配置结构 (主机, 端口) |
.so 文件使用 `opt-level = "z"`, `lto = "fat"`, `panic = "abort"` 构建并进行剥离 —— 产生 **278KB** 的二进制体积。
**2. `src/http/proxy_loader.rs` (加载器)**
启动时通过 `libloading` 加载。流程:
```
main() → ensure_proxy_library()
│
├─ Finds .so (CWD → /usr/lib/ → /usr/local/lib/ → /opt/oxide/lib/ → LD_LIBRARY_PATH)
├─ Opens via libloading::Library
├─ Verifies all 7 symbols exist
├─ Stores Arc
**khaninkali** · *HyperSecurityLabs*
[](https://github.com/hypersecuritylabs)
[](https://hypersecuritylabs.netlify.app)
[](https://t.me/hypersecurity_offsec)
*"扫描一切。不信任任何事物。相应地修补。"*
## ⚖️ 许可与法律
**专有软件许可** — 版权所有 © 2024 khaninkali · HyperSecurityLabs · 保留所有权利
完整条款请参见 [`LICENSE`](LICENSE)。简而言之:
| 操作 | 公开 | HyperSecurity 成员 |
|--------|--------|----------------------|
| 查看源代码 | ✅ 是 | ✅ 是 |
| Fork 用于参考 | ✅ 是 | ✅ 是 |
| 个人 / 教育用途 | ✅ 是 | ✅ 是 |
| 授权渗透测试 | ✅ 是 | ✅ 是 |
| 修改代码 | ❌ 否 | ✅ 是 |
| 提交 PR / 合并 | ❌ 否 (可提交,无合并权限) | ✅ 是 |
| 移除名称 / 标签 / 归属 | ❌ 否 — 法律行动 | ❌ 否 — 永不 |
| 重新品牌化为自己的作品 | ❌ 否 — 法律行动 | ❌ 否 — 永不 |
| 出售 / 商业化 | ❌ 否 — 仅限书面许可 | ❌ 否 — 仅限书面许可 |
| 再分发 | ❌ 否 — 仅限书面许可 | ✅ 是 (需注明来源) |
**仅 HyperSecurityLabs 成员可以修改、合并或再分发此代码。移除作者姓名、版本标签或 HyperSecurityLabs 品牌标识是直接的许可证违规行为,将导致法律诉讼。**
*基于* 🦀 *Rust 构建 · 在攻击性安全战壕中锻造*
**HyperSecurityLabs** · OXIDE 框架 v8.3.1
标签:AI增强安全扫描, AI安全, Apex, Chat Copilot, Rust语言, Tokio框架, Web安全, Web漏洞扫描器, XSS, 人工智能, 代码生成, 加密数据库, 可视化界面, 威胁情报, 安全测试, 开发者工具, 异步编程, 攻击性安全, 本地文件包含, 机器学习, 渗透测试工具, 漏洞情报, 瑞士军刀, 用户模式Hook绕过, 网络安全, 蓝队分析, 跨平台支持, 进攻性安全, 通知系统, 隐私保护, 零日检测