Designing a .jpeg fuzzer
I'm in the planning stages of designing a fuzzer. The goal is to fuzz test a unix binary program.
1. Grab a file (a .jpeg image I supply)
2. Mutate that file (randomly flip a bit somewhere)
3. Feed it to the program (a unix binary program)
4. Record the output (from that unix binary)
This leads me to a few questions...
1. What would be the best language to begin this endeavour?
2. What is the most efficient way to flip a bit? How can I do this in a coding language I can run on a Linux system?
3. What is the proper code form to feed a file to a Linux binary program?
4. What is the proper way to record the output of the Linux Binary file after it's fed the file?
I understand 2-3 are completely dependant on my coding language of choice but as I said I'm not sure what language is best for this. It's new territory for me. I'd like to expedite the process as much as possible by communicating with some experts here, as such I appreciate ANY help given to me greatly.
Thank you and have a great day.:thumbsup:
1. you can use Perl to script this. using wget to acquire the image and save it to a dir
2. I would look into image magic, you can use that in conjunction with perl to re-size, flip, cut and place images with other images and save it in the dir where the binary program will read it from. I say Perl, cause i know for a fact imagemagic has a library for it.
3-4. depends on the binary program you are using