antonio-morales/Fuzzing101

GitHub: antonio-morales/Fuzzing101

一份包含 10 个真实目标练习的模糊测试实战课程,通过复现历史 CVE 系统教授漏洞挖掘技术。

Stars: 3797 | Forks: 421

# Fuzzing-101 你想像真正的专家一样学习 fuzzing,却不知从何下手吗? 如果是的话,这就是为你准备的课程! **10 个真实目标,10 个练习。** 你能解开全部 10 个吗? ## 结构 | 练习编号 | 目标 | 待寻找的 CVE | 预计时间 | 主要主题 | | ------------- | ------------- | ------------- | ------------- | ------------- | | [练习 1](https://github.com/antonio-morales/Fuzzing101/tree/main/Exercise%201) | Xpdf | CVE-2019-13288 | 120 分钟 | Afl-clang-fast, Afl-fuzz, GDB | | [练习 2](https://github.com/antonio-morales/Fuzzing101/tree/main/Exercise%202) | libexif | CVE-2009-3895, CVE-2012-2836 | 6 小时 | Afl-clang-lto, Fuzzing 库, Eclipse IDE| | [练习 3](https://github.com/antonio-morales/Fuzzing101/tree/main/Exercise%203) | TCPdump | CVE-2017-13028 | 4 小时 | ASan, Sanitizers | | [练习 4](https://github.com/antonio-morales/Fuzzing101/tree/main/Exercise%204) | LibTIFF | CVE-2016-9297 | 3 小时 | 代码覆盖率, LCOV | | [练习 5](https://github.com/antonio-morales/Fuzzing101/tree/main/Exercise%205) | Libxml2 | CVE-2017-9048 | 3 小时 | 字典, 基础并行化, Fuzzing 命令行参数 | | [练习 6](https://github.com/antonio-morales/Fuzzing101/tree/main/Exercise%206) | GIMP | CVE-2016-4994, 额外漏洞 | 7 小时 | 持久化 Fuzzing, Fuzzing 交互式应用程序| | [练习 7](https://github.com/antonio-morales/Fuzzing101/tree/main/Exercise%207) | VLC media player | CVE-2019-14776 | 6 小时 | 部分插桩, Fuzzing harness | | [练习 8](https://github.com/antonio-morales/Fuzzing101/tree/main/Exercise%208) | Adobe Reader | | 8 小时 | Fuzzing 闭源应用程序, QEMU 插桩| | [练习 9](https://github.com/antonio-morales/Fuzzing101/tree/main/Exercise%209) | 7-Zip | CVE-2016-2334 | 8 小时 | WinAFL, Fuzzing Windows 应用程序| | [**练习 10(最终挑战)**](https://github.com/antonio-morales/Fuzzing101/tree/main/Exercise%2010) | **Google Chrome / V8** | **CVE-2019-5847** | **8 小时** | **Fuzzilli, Fuzzing JavaScript 引擎** | ## 更新日志 - 02/14/2022:修复了练习 5 中一些 'wget' 的拼写错误。 - 11/25/2021:练习 3 已更新并修复了一些问题。 ## 本课程面向哪些人? - 任何希望学习 fuzzing 基础知识的人 - 任何想要学习如何在真实软件项目中寻找漏洞的人。 ## 先决条件 - 本课程只需要一台连接互联网且正常运行的 Linux 系统。你将在练习中找到一个合适的 VMware 镜像。 - 强烈建议至少具备基础的 Linux 技能。 - 所有练习均已在 Ubuntu **20.04.2 LTS** 上经过测试。你可以从[这里](https://ubuntu.com/download/desktop/thank-you?version=20.04.2.0&architecture=amd64)下载。 - 在本课程中,我们将使用 [AFL++](https://github.com/AFLplusplus/AFLplusplus)(Michał "lcamtuf" Zalewski 的 AFL 的一个更新且更优秀的分支)来完成这些 fuzzing 练习。 ## 什么是 fuzzing? **Fuzz 测试(或 Fuzzing)**是一种自动化软件测试技术,其核心在于向程序输入随机/变异的值,并监控其异常/崩溃。 [AFL](https://github.com/google/AFL)、[libFuzzer](https://llvm.org/docs/LibFuzzer.html) 和 [HonggFuzz](https://github.com/google/honggfuzz) 是在实际应用中最成功的三款 fuzzer。它们都是**覆盖率引导的进化型** fuzzer 的典型代表。 ### 覆盖率引导的进化型 fuzzer - **进化型**:这是一种受进化算法启发的元启发式方法,基本上就是通过使用选择标准(如覆盖率),随着时间的推移不断进化和变异初始子集(seeds)。 - **覆盖率引导**:为了增加发现新崩溃的几率,覆盖率引导的 fuzzer 会收集并比较不同输入之间的代码覆盖率数据(通常通过插桩),并选择那些能触发新执行路径的输入。

覆盖率引导的进化型 fuzzer 收集覆盖率过程的简化图

## 致谢 感谢以下人员的帮助: - [Xavier RENE-CORAIL](https://github.com/xcorail) - [Alan Vivona](https://github.com/alanvivona) - [Jason White](https://github.com/misfir3) - [Octavio Gianatiempo](https://github.com/ogianatiempo) - [van Hauser](https://github.com/vanhauser-thc) - [Marc Poulhiès](https://github.com/dkm) - [Xu Hanyu](https://github.com/Mundi-Xu) - [tclan126](https://github.com/tclan126) - [epi052](https://github.com/epi052) - [Jeremias Gomes](https://github.com/j3r3mias)
标签:C/C++, 事务性I/O, 二进制安全, 安全教程, 身份验证强制