qilingframework / qiling

A True Instrumentable Binary Emulation Framework
https://qiling.io
GNU General Public License v2.0
5.11k stars 742 forks source link

Understanding Qiling fuzzing #1449

Closed psparc82 closed 7 months ago

psparc82 commented 8 months ago

Hi,

I'm trying to understand at a high level how Qiling fuzzes with AFL++ and unicorn. The fuzzing examples and documentation don't fully explain it. So here's a few questions:

Any sort of diagram / order of events explaining how the fuzzing works would be great!

Thanks for reading and thanks for the excellent project

psparc82 commented 8 months ago

Any help?

iMoD1998 commented 7 months ago

Not sure which example you are looking at but they usually ship with 2 scripts, a saver which gets the binary into a state where the target func can be called which then dumps the entire state, memory, registers, etc all to a file called snapshot.bin.

Then in the fuzzer script you can call your target function with fuzzer input and then restore the context from snapshot.bin and send another input and so on...

psparc82 commented 7 months ago

@iMoD1998 Thanks for clearing that up!