Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

afl_ghidra_emu

> 编程语言
Open source

aflghidraemu aflghidraemu is no longer maintained and replaced by Ghidralligator. Try it! aflghidraemu allows to fuzz exotic architecture u…

189 stars0 likes0 views
WebsiteGitHub

About

aflghidraemu aflghidraemu is no longer maintained and replaced by Ghidralligator. Try it! aflghidraemu allows to fuzz exotic architecture u…

afl_ghidra_emu

afl_ghidra_emu is no longer maintained and replaced by Ghidralligator. Try it!

afl_ghidra_emu allows to fuzz exotic architecture using AFL++ and Ghidra emulation with code coverage functionality.

For more information, read this article.

How it works?

AFL++ runs a trampoline program (afl_bridge_external) which is in charge of forwarding samples to Ghidra emulation via a TCP socket (Ex: 127.0.0.1:6674/tcp).

A python script in Ghidra (fuzz_xtensa_check_serial.py) is responsible for emulating code execution. It listens on a TCP socket (127.0.0.1:6674/tcp) and waits for input data coming from trampoline script. As soon as the script receives input data, the emulation will be started. During the execution, the executed path addresses, and the execution status are sent to afl_bridge_external using established TCP socket.

afl_bridge_external reports the execution status and execution path to AFL++ using pipes and shared memory.

Installation

Install AFL++

Clone afl_ghidra_emu directory

bash
git clone https://github.com/airbus-cyber/afl_ghidra_emu.git

Compile afl_bridge_external

bash
cd afl_ghidra_emu/afl_bridge_external
make

Copy afl_ghidra_emu files to your ghidra script directory

bash
cd ../..
cp –r afl_ghidra_emu/* $USER_HOME/ghidra_scripts/

Example: Fuzzing Xtensa binary code keygenme_xtensa.elf

./examples/xtensa/bin/keygenme_xtensa.elf is a keygenMe compiled for Xtensa (ex: esp32) architecture. Xtensa is not officially supported in Ghidra yet. So, you need first to install it by following these instruction

Load in Ghidra

  • Create a new project in Ghidra;
  • Import file ./bin/keygenme_xtensa.elf (arch: Xtensa:LE:32);
  • Open it in CodeBrowser and execute auto-analyze;
  • Open Script Manager in "Window" submenu;
  • Run script fuzz_xtensa_check_serial.py;

Start Fuzz

Make AFL workspace directories

bash
mkdir input output

Add first sample

bash
echo -n "BBBBBBBB" > input/sample1.bin

Start AFL++ with trampoline program.

bash
afl-fuzz -D -i input -o output afl_bridge_external 127.0.0.1 6674 20

Stop Ghidra emulation

Stop AFL++ using CTRL+C. If Ghidra emulation still running, we can send "STOP" command:

bash
echo -e "\xff" | nc 127.0.0.1 6674

Do no use Ghidra Cancel button, because it does not properly close the socket.

Example: Fuzzing PPC binary code keygenme_ppc.elf

./examples/ppc/bin/keygenme_ppc.elf is also a keygenMe compiled for PowerPC architecture.

Follow the same steps above with PowerPC:BE:32:default architecture in Ghidra and run the script fuzz_ppc_check_serial.py.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言