LibAFL-legacy
LibAFL-legacy copied to clipboard
Add Dictionary/Extras Support
The main feature lacking in LibAFL right now is Extas support.
This includes the dictionary extras, you would pass to AFL using -x, but also autoextras added during fuzzing, as well as the compile-time autodict feature in AFL LTO builds, and eventually even cmplog.
The important pieces of code are in https://github.com/AFLplusplus/AFLplusplus/blob/stable/src/afl-fuzz-extras.c
I was looking at doing this. Can you give a little background of how afl generates extras during the fuzzing? taking a dict as a command-line parameter and parsing is pretty straight-forward. But generating them during fuzzing was a bit confusing :sweat_smile:
We can start with the "normal" ones and go from there :)
Ok. So, if we get a dict, do we need any special mutators for them? Or the havoc ones work(for now)?
Havoc needs to take extras into account, that's okay for now. Later we'll probably want redqueen
:+1: I think we'll need a deterministic stage too now?
If we want to be close to AFL, eventually yes
I've started with the deterministic stage and deterministic mutators (Had to introduce a new structure for storing "state" of mutation since it isn't random). You guys can have a look at
add_extras branch
Don't code, I have the lock this week, deterministic can be implemented just using the stage_idx parameter to mutate (that was in FFF for this purpose, but was not ported to LibAFL)