I'm trying to fuzz using AFL (Qemu-mode) a binary-app that keeps waiting for data, and because I don't have the source code to modify the binary so that it exit(0) after parsing the data, I'm faced with a problem in AFL (timeout), so I decided to write a wrapper around the binary so that I can make it exit after a certain time passes, with that in mind.
- AFL fuzzer: it can passes test inputs through
STDINor as anargument file - the binary-app that I'm fuzzing expects the input to be in the
STDINand just keep waiting for input
My strategies are based on parent/child style (forking) such that the child will be the binary-app and the parent will monitor it.
- the parent makes the child(binary-app) exit with a 0 status if nothing happens for 5 seconds (no crash happens in the child process).
and also the parent is responsible for sending the input to the child that it receives from
stdinif the child crash I want the parent to crash as well so that
AFLwill notice that and save the test file that is responsible for the crash
my questions are :
- how can you make a child exit with a status of 0 from the parent?
- how to send the data to the child process from the parent process
after the child runs the binary-app using
exec()? - is it a good idea to tell if the child crashed based on the exit status of the child?