0xrpheus/wraith

GitHub: 0xrpheus/wraith

一款用 Zig 编写的零依赖网络威胁扫描器,集主机发现、端口枚举和离线 CVE 签名匹配于一体。

Stars: 0 | Forks: 0

# wraith [![build](https://img.shields.io/badge/build-passing-brightgreen)](https://github.com/0xrpheus/wraith) [![zig](https://img.shields.io/badge/zig-0.14.0-orange)](https://ziglang.org) [![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE) [![platform](https://img.shields.io/badge/platform-linux%20%7C%20macos%20%7C%20windows-lightgrey)](https://github.com/0xrpheus/wraith/releases) `wraith` 是一个用 Zig 编写的零依赖网络威胁扫描器。它将主机发现、端口枚举和离线 CVE 签名匹配整合到一个快速、静态的二进制文件中 —— 无需代理、无需云端、无需遥测。 为追求高信噪比的安全工程师而生。 ## 安装说明 **homebrew (macOS / Linux)** ``` brew tap 0xrpheus/wraith https://github.com/0xrpheus/wraith/ brew install wraith ``` **cargo 风格的一键命令 (如果已安装 zig)** ``` git clone https://github.com/0xrpheus/wraith cd wraith zig build -Doptimize=ReleaseFast sudo cp zig-out/bin/wraith /usr/local/bin/ ``` **预编译二进制文件** 从 [releases](https://github.com/yourhandle/wraith/releases) 下载适用于以下平台的版本: - `wraith-macos-aarch64` - `wraith-macos-x86_64` - `wraith-linux-x86_64` - `wraith-linux-aarch64` - `wraith-windows-x86_64.exe` ## 使用方法 ``` wraith [command] [target] [options] COMMANDS: scan [target] Scan a host or CIDR range for threats (default) probe [target] Deep port probe with service fingerprinting monitor Continuous passive monitoring mode help Show this message version Print version info OPTIONS: -s, --stealth Enable stealth mode (slower, lower detection risk) -V, --verbose Verbose output -t, --timeout Probe timeout in milliseconds (default: 3000) -p, --ports Port range: common, all, or 80,443,8080 (default: common) -o, --output Write results to file ``` ### 示例 ``` # 扫描本地子网 wraith scan # 扫描特定范围 wraith scan 10.0.0.0/24 # 深度探测主机,全端口 wraith probe 192.168.1.1 --ports all --verbose # 隐蔽扫描,延长超时 wraith scan 192.168.1.1 --stealth --timeout 5000 # 被动持续监控 wraith monitor ``` ## 功能介绍 ``` ██╗ ██╗██████╗ █████╗ ██╗████████╗██╗ ██╗ ██║ ██║██╔══██╗██╔══██╗██║╚══██╔══╝██║ ██║ ██║ █╗ ██║██████╔╝███████║██║ ██║ ███████║ ██║███╗██║██╔══██╗██╔══██║██║ ██║ ██╔══██║ ╚███╔███╔╝██║ ██║██║ ██║██║ ██║ ██║ ██║ ╚══╝╚══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ v1.0.0 // silent network threat detection initializing wraith engine... loading threat signature database [v2024.12.1 — 94,302 signatures] calibrating stealth probe intervals... [ HOST DISCOVERY ] target: 192.168.1.0/24 ───────────────────────────────────────────────── ► 192.168.1.1 a4:c3:f0:12:88:01 Netgear Inc. ► 192.168.1.5 b8:27:eb:44:12:fc Raspberry Pi Trading ► 192.168.1.12 3c:22:fb:09:44:d1 Apple Inc. ... [ PORT SCAN ] probing 192.168.1.1 ───────────────────────────────────────────────── 22 tcp open ssh OpenSSH 9.2 80 tcp open http nginx 1.24.0 443 tcp open https nginx 1.24.0 ... [ THREAT ANALYSIS ] matching signatures... ───────────────────────────────────────────────── CVE-2024-6387 CRITICAL CVSS:8.1 OpenSSH regreSSHion RCE (unauthenticated) CVE-2024-1086 HIGH CVSS:7.5 UPnP stack buffer overflow via SUBSCRIBE ... ``` ## 工作原理 wraith 分三个阶段运行: **1. 主机发现** 在目标网段进行 ARP 扫描。无 ICMP,无噪音。利用内置的 OUI 数据库解析 MAC/厂商信息,以此识别存活主机。 **2. 端口枚举** 对可配置的端口范围进行 TCP SYN 扫描。隐蔽模式增加了随机的探测间延迟和抖动的 TTL,以规避基础的 IDS 签名。 **3. 威胁匹配** 检测到的服务会与内置的 CVE 签名数据库进行离线匹配,通过服务名称、版本和协议指纹进行交叉比对。数据不会流出本机。 ## 为什么选择 Zig? wraith 使用 [Zig](https://ziglang.org) 编写,原因如下: - **单一静态二进制文件** —— 无运行时,无动态链接,没有 `libssl` 版本地狱 - **交叉编译** —— 一台构建机器即可针对所有平台 - **确定性构建** —— 相同的源代码,每次都生成相同的二进制文件 - **无内存分配器意外** —— 显式内存管理意味着负载下的行为可预测 - **comptime CVE 嵌入** —— 签名数据库通过 `@embedFile` 在编译时嵌入,使二进制文件完全自包含 ## 从源码构建 需要 zig `0.14.0+` ``` # debug 构建 zig build # release 构建(推荐) zig build -Doptimize=ReleaseFast # 从 macOS 交叉编译 Linux 版本 zig build -Dtarget=x86_64-linux -Doptimize=ReleaseFast ``` ## 手册页 ``` man wraith ``` 通过 homebrew 安装时会自动安装。对于手动安装: ``` sudo cp man/wraith.1 /usr/local/share/man/man1/ sudo mandb # linux ``` ## 路线图 - [ ] JSON/结构化输出模式 - [ ] 用于 CI 集成的 SARIF 输出 - [ ] IPv6 支持 - [ ] 可配置的 OUI 数据库更新 - [ ] TUI 仪表盘模式 ## 许可证 MIT。详见 [LICENSE](LICENSE)。 ## 贡献 欢迎提交 PR。如有实质性更改,请先提交 Issue。代码风格遵循 `zig fmt`。
标签:AMSI绕过, ARP扫描, AST分析, Facebook API, GitHub, Scrypt密钥派生, TCP SYN扫描, Zig, 嗅探, 威胁检测, 密码管理, 并发处理, 插件系统, 数据统计, 服务指纹识别, 离线CVE匹配, 端口扫描, 网络安全, 网络枚举, 被动监控, 隐形扫描, 隐私保护, 零依赖, 静态二进制