• Home
Name Date Size #Lines LOC

..--

MakefileD03-May-20241.9 KiB5932

README.mdD03-May-2024785 1612

argv-fuzz-inl.hD03-May-20242.2 KiB9139

argvfuzz.cD03-May-20241.3 KiB5024

README.md

1# argvfuzz
2
3AFL++ supports fuzzing file inputs or stdin. When source is available,
4`argv-fuzz-inl.h` can be used to change `main()` to build argv from stdin.
5
6`argvfuzz` tries to provide the same functionality for binaries. When loaded
7using `LD_PRELOAD`, it will hook the call to `__libc_start_main` and replace
8argv using the same logic of `argv-fuzz-inl.h`.
9
10A few conditions need to be fulfilled for this mechanism to work correctly:
11
121. As it relies on hooking the loader, it cannot work on static binaries.
132. If the target binary does not use the default libc's `_start` implementation
14   (crt1.o), the hook may not run.
153. The hook will replace argv with pointers to `.data` of `argvfuzz.so`. If the
16   target binary expects argv to be living on the stack, things may go wrong.