xsscx/xnuimagefuzzer
GitHub: xsscx/xnuimagefuzzer
针对 Apple XNU 系统的图像解析模糊测试框架,覆盖 CoreGraphics、ImageIO 和 ICC 配置文件解析,支持多种格式和平台的漏洞挖掘。
Stars: 39 | Forks: 7
# XNU Image Fuzzer
针对 iOS/macOS 的图像模糊测试框架,覆盖 CoreGraphics、ImageIO 和 ICC 配置文件解析,支持 15 种位图上下文类型和 22 种输出格式。
- **永久链接**: https://srd.cx/xnu-image-fuzzer/
- **CVE 参考**: https://srd.cx/cve-2022-26730/
- **作者**: David Hoyt — https://xss.cx · https://srd.cx · https://hoyt.net
## 工作流程
1. 使用 [xnuimagetools](https://github.com/xsscx/xnuimagetools) 生成基线图像
2. 使用 xnuimagefuzzer 进行 Fuzz (`--pipeline`, `--chain`, `--input-dir`)
3. 嵌入 ICC 配置文件(纯净 + [变异](https://github.com/xsscx/research/tree/main/colorbleed_tools))
4. 编码为 22 种格式(PNG, JPEG, TIFF×5, HEIC, WebP, JP2, PDF, BMP, GIF, EXR, ICNS, …)
5. 输入到目标应用:Preview, Safari, iMessage, Mail, Notes
6. 从 `~/Library/Logs/DiagnosticReports/` 收集崩溃
## 快速开始
```
# Xcode
open "XNU Image Fuzzer.xcodeproj" # Update Team ID → Run
# CLI (Mac Catalyst, unsigned)
xcodebuild build \
-scheme "XNU Image Fuzzer" \
-destination 'platform=macOS,variant=Mac Catalyst' \
-configuration Release \
CODE_SIGN_IDENTITY="-" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
# Pipeline fuzzing (生成 → fuzz → ICC embed → 测量)
./XNU\ Image\ Fuzzer --pipeline /path/to/input-images/
```
## 平台支持
| 平台 | 状态 |
|----------|--------|
| macOS 15+ (arm64, x86_64) | ✅ |
| iOS / iPadOS 18+ | ✅ |
| visionOS 2.x | ✅ |
## 文档
- [Copilot 指令](.github/copilot-instructions.md) — 构建命令、架构、调试环境变量
- [API 文档](https://xss.cx/public/docs/xnuimagefuzzer/)
- [XNU Image Tools](https://github.com/xsscx/xnuimagetools) — 多平台图像生成器
标签:CGBitmapContext, CoreGraphics, Crash分析, CVE监控, CVE研究, Fuzzing, HEIC, ICC配置文件, ImageIO, iOS安全, JPEG, Mac Catalyst, macOS安全, Objective-C, PDF, PNG, visionOS, WebP, Xcode, XNU, 云资产清单, 位图上下文, 图像处理, 图像解析, 数据变异, 文件格式, 目录枚举, 移动安全, 逆向工程