Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
ghidralligator — 使用 Ghidra/Sleigh 的多架构 pcode 模拟器,用于对二进制文件、固件和嵌入式目标进行 AFL++ 模糊测试;通过 ASAN 检测内存损坏漏洞。 | Kitploit
工具/GitHubGitHub/airbus-cyber/ghidralligator
嵌入式系统安全动态分析 (沙盒)漏洞分析模糊测试二进制分析固件分析
GitHubairbus-cyber/ghidralligator

ghidralligator

使用 Ghidra/Sleigh 的多架构 pcode 模拟器,用于对二进制文件、固件和嵌入式目标进行 AFL++ 模糊测试;通过 ASAN 检测内存损坏漏洞。

查看仓库
331252年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Ghidralligator_logo

Ghidralligator

License

Ghidralligator 是一款基于 Ghidra libsla 的 C++ 多架构 pcode 模拟器,专为配合 AFL++ 进行模糊测试而设计。

它允许进行基于模拟的模糊测试,同时在处理运行于特殊架构上的二进制文件时保持可观的性能。

其可扩展性使得模拟几乎所有架构都变得容易(只要你能编写相应的 Sleigh 规范文件),从而对任意代码片段进行模糊测试。

安装

Ghidralligator 可在 Linux 系统上运行。仅需要拥有支持 C++17 的 GCC 版本(已在 GCC 12.2.0 上测试并正常工作)。

Ghidra 依赖项已嵌入项目自身的 "./src/" 目录中。

要正确安装 Ghidralligator,你必须按如下方式下载并编译 AFL++:

  1. 克隆并安装 AFL++
root@kitploit:~
git clone https://github.com/AFLplusplus/AFLplusplus
cd AFLplusplus
make distrib
sudo make install
  1. 克隆并编译 Ghidralligator:
root@kitploit:~
git clone https://github.com/airbus-cyber/ghidralligator
cd ghidralligator
make ghidralligator
  1. 获取你想要模拟的架构对应的 .sla 文件。 你可以自行编写 .sla 文件,也可以从官方 Ghidra 仓库(此处)下载已有的文件。你可以在项目的 "./specfiles" 文件夹中找到一组默认的 .sla 文件。

什么是 Ghidralligator?

Ghidralligator 旨在填补既有模拟器之间的空白:一类模拟器需要大量配置和手动修改才能对二进制文件进行插桩、运行和模糊测试,而另一类“黑盒”模拟器几乎不可扩展,不适合特定且不常见的应用场景。

其主要用途是闭源二进制文件的漏洞研究,尤其是针对运行在特殊架构上的嵌入式设备应用/固件。

Ghidralligator 是 afl_ghidra_emu 的后继者。它大幅提升了执行速度,并包含堆内存损坏检测(ASAN)等实用功能。

可以检测多种内存损坏:越界读/写操作、释放后使用、双重释放、读取未初始化内存、读/写/执行访问违规……

要运行 Ghidralligator,必须完成以下步骤:

  • 设置配置文件以定义内存映射布局和程序的初始状态
  • 设计钩子(hooks)。

文档

  • Ghidralligator 配置文件:关于配置文件编写的文档。
  • Ghidralligator 钩子:关于用户钩子文件编写的文档。

教程

为了理解如何使用 Ghidralligator,我们提供了一个在不同架构上编译的易受攻击程序的示例。

你可以运行 run_examples.sh 来实际查看 ASAN 机制。

快速开始

Ghidralligator 提供多个命令行选项:

root@kitploit:~
usage: ./ghidralligator [OPTION]

  -h 			Print this help and exit.

  -m [replay|fuzz]	Specify an emulation strategy. [REQUIRED]
				In 'replay' mode, the emulator will only launch the program once, exiting after a single loop.
				In 'fuzz' mode, this program must be launched through AFL.

  -c [FILENAME]		Specify the emulator json configuration file to load. [REQUIRED]

  -i [FILENAME]		Specify a test-case file to insert during a replay session. [OPTIONAL]

  -I 			Display info log (/!\ Slow down the emulation). [OPTIONAL]
  -D 			Display debug and info log (/!\ Slow down the emulation). [OPTIONAL]

  -t 			Store log in ./ghidraligator.log file. [OPTIONAL]


标准模拟的使用方法:

root@kitploit:~
$ ./ghidralligator -m replay -c examples/x86/config.json -I -i examples/x86/input/normal_use_case.bin

gif replay

标准 AFL++ 模糊测试会话的使用方法:

root@kitploit:~
mkdir afl_inputs afl_outputs
echo -n "AAAAAA" > ./afl_inputs/input.bin
$ AFL_SKIP_BIN_CHECK=1 afl-fuzz -D -i ./afl_inputs -o ./afl_outputs/ -- ./ghidralligator -m fuzz -c examples/x86/config.json

gif fuzzing

限制

  • Ghidralligator 可以借助 .sla 文件(Sleigh 指令定义文件)模拟代码。Ghidra 社区提供的 SLA 文件可能只有部分实现。为了获得一致的模拟效果,用户可能需要完善相关的 Sleigh 架构定义或添加一些钩子。

  • Ghidralligator 基于 Ghidra,而 Ghidra 并非为高性能模拟而设计。因此,在标准架构(x86 Linux / Windows 二进制文件)上,它无法与 afl_qemu 等经典模糊测试器竞争。

  • 由于 Ghidra 项目在不断演进,不建议为未来的 Ghidra 版本手动更新 Ghidralligator 依赖项。该工具是使用 Ghidra 11.0.3 反编译器源码构建和测试的。未来版本可能会导致其失效,且不支持 11.0.3 以下版本的向后兼容性。这对用户来说是透明的,因为 Ghidra 依赖项已包含在本仓库中。

许可证

Ghidralligator 根据 Apache 许可证 2.0 版 发布。

Ghidralligator 代码包含来自 NationalSecurityAgency 的 Ghidra 项目的代码,该项目根据 Apache 许可证 2.0 发布。

Ghidralligator 配置文件解析器包含 Niels Lohmann 的 C++ json 库,该库根据 MIT 许可证 发布。

Ghidralligator 模块包含 Yann Collet 的 xxHash 库,该库根据 BSD 2-Clause 许可证 发布。

作者

  • Flavian Dola - Airbus (Twitter)
  • Guillaume Orlando - Airbus (Twitter)
下载工具