sslab-gatech/DIE

GitHub: sslab-gatech/DIE

基于方面保持变异技术的 JavaScript 引擎模糊测试工具,用于发现浏览器引擎漏洞。

Stars: 231 | Forks: 44

# 死 “Fuzzing JavaScript Engines with Aspect-preserving Mutation”(发表于 S&P'20)的代码库。您可以查阅[论文](https://gts3.org/assets/papers/2020/park:die.pdf)了解技术细节。 ## 环境 在 Ubuntu 18.04 上测试,环境如下。 * Python v3.6.10 * npm v6.14.6 * n v6.7.0 ## 通用设置 对于 nodejs 和 npm, ``` $ sudo apt-get -y install npm $ sudo npm install -g n $ sudo n stable ``` 对于 redis-server, ``` $ sudo apt install redis-server ``` 我们选择 clang-6.0 来顺利编译 afl 和浏览器。 ``` $ sudo apt-get -y install clang-6.0 ``` ## DIE 设置 为 AFL 设置环境, ``` $ cd fuzz/scripts $ sudo ./prepare.sh ``` 编译整个项目, ``` $ ./compile.sh ``` ### 服务器设置 * 创建语料库目录 (我们使用 [Die-corpus](https://github.com/sslab-gatech/DIE-corpus.git) 作为语料库) ``` $ git clone https://github.com/sslab-gatech/DIE-corpus.git $ python3 ./fuzz/scripts/make_initial_corpus.py ./DIE-corpus ./corpus ``` * 创建 ssh-tunnel 以连接 redis-server ``` $ ./fuzz/scripts/redis.py ``` * 使用语料库进行试运行 ``` $ ./fuzz/scripts/populate.sh [target binary path] [path of DIE-corpus dir] [target js engine (ch/jsc/v8/ffx)] # 示例 $ ./fuzz/scripts/populate.sh ~/ch ./DIE-corpus ch ``` 完成了!您的语料库已成功执行,数据应位于 redis-server 上。 #### 提示 检查 redis-data, ``` $ redis-cli -p 9000 127.0.0.1:9000> keys * ``` 如果结果包含 "crashBitmap"、"crashQueue"、"pathBitmap"、"newPathsQueue" 键,说明模糊测试器已正确注册并执行。 ### 客户端设置 * 创建 ssh-tunnel 以连接 redis-server ``` $ ./fuzz/scripts/redis.py ``` * 用法 ``` $ ./fuzz/scripts/run.sh [target binary path] [path of DIE-corpus dir] [target js engine (ch/jsc/v8/ffx)] # 示例 $ ./fuzz/scripts/run.sh ~/ch ./DIE-corpus ch ``` * 检查是否正在运行 ``` $ tmux ls ``` 如果正在运行,您可以找到一个名为 `fuzzer` 的会话。 ### 类型器 我们使用 d8 来分析类型信息。因此,请在执行前修改 fuzz/TS/typer/typer.py 中的 d8_path。 ``` cd fuzz/TS/typer python3 typer.py [corpus directory] ``` 如果插桩工作正常,将创建 *.jsi 文件。 如果分析工作正常,将创建 *.t 文件。 ## CVE 如果您通过运行 DIE 发现了漏洞并获得了 CVE,请告知我们。 * ChakraCore: CVE-2019-0609, CVE-2019-1023, CVE-2019-1300, CVE-2019-0990, CVE-2019-1092 * JavaScriptCore: CVE-2019-8676, CVE-2019-8673, CVE-2019-8811, CVE-2019-8816 * V8: CVE-2019-13730, CVE-2019-13764, CVE-2020-6382 ## 联系方式 * Soyeon Park * Wen Xu * Insu Yun * Daehee Jang * Taesoo Kim ## 引用 ``` @inproceedings{park:die, title = {{Fuzzing JavaScript Engines with Aspect-preserving Mutation}}, author = {Soyeon Park and Wen Xu and Insu Yun and Daehee Jang and Taesoo Kim}, booktitle = {Proceedings of the 41st IEEE Symposium on Security and Privacy (Oakland)}, month = may, year = 2020, address = {San Francisco, CA}, } ```
标签:AFL, American Fuzzy Lop, ASN解析, Aspect-preserving, Chakra, Clang, Crash分析, Cutter, Fuzzing, GNU通用公共许可证, IEEE S&P, JavaScriptCore, JavaScript引擎, MITM代理, Node.js, Python, Redis, S&P, SpiderMonkey, TLS抓取, V8, 二进制发布, 代码突变, 安全测试, 开源工具, 搜索引擎查询, 攻击性安全, 无后门, 测试用例生成, 灰盒测试, 编译器安全, 自动化攻击, 自动化攻击, 论文代码, 语义保持, 软件安全, 逆向工具