views:

212

answers:

4

I am looking for a free, open source, portable fuzzing tool for popular image file types that is written in either Java, Python, or Jython.

Ideally, it would accept specifications for the fuzzable fields using some kind of declarative constraints. Non-procedural grammar for specifying constraints are greatly preferred. Otherwise, might as well write them all in Python or whatever.

Just specifying ranges of valid values or expressions for them. Ideally, it would support some kind of generative programming to export the fuzzer into various programming languages to suit cases where more customization was required.

If it supported a direct-manipulation GUI for controlling parameter values and ranges, that would be nice too.

The file formats that should be supported are:

  • GIF
  • JPEG
  • PNG

So basically, it should be sort of a toolkit consisting of ready-to-run utility, a framework or library, and be capable of generating the fuzzed files directly as well as from programs it generates. It needs to be simple so that test images can be created quickly. It should have a batch capability for creating a series of images. Creating just one at a time would be too painful.

I do not want a hacking tool, just a QA tool. Basically, I just want to address concerns that it is taking too long to get commonplace image rendering/parsing libraries stable and trustworthy.

A: 

Okay, I don't think it has a ready-to-run utility, but people use PIL (Python Imaging Library) to generate captchas all the time, so it can probably fuzz images. (At least, assuming that my definition of "fuzz" is correct and that what you mean is adding random noise to an image for some purpose.)

Of course, all your talking about ready-to-run utilities and generating programs to fuzz images is confusing me. What I'm wondering is, why is all that necessary? What use-case do you have for wanting a program that can make programs to fuzz images when most practical concerns could be solved by simply writing a script that loads an image and does the fuzzing using PIL?

LeafStorm
I want to test my platform to make sure it does not have stupid buffer overflow, boundary condition, range violation, premature EOF errors and so forth in it - for starters.Plus, on an on-going basis I want to test my application/library/service code as I develop it to make sure that I and my team do not release code with these same pitfalls.I want to stress test graphics handling logic because I think it is way underdone and is turning into a soft underbelly of modern computing.Pointless to do all this unit/system testing and have a hacker or accident steal/corrupt/lose data via a pic.
JohnnySoftware
A: 

You might want to consider 'bringing in the Gimp!' [ to paraphrase Pulp Fiction there...]

http://www.gimp.org/docs/python/index.html

monojohnny
+1  A: 

Peach has a file fuzzing module. Here is an excellent quick start tutorial for using the file fuzzing module to attack mplayer using a sound file: http://peachfuzzer.com/TutorialFileFuzzing

I recommend focusing on the file's header.

Rook
A: 

Not exactly what you are asking for, but for getting quick up and running some fuzz tests for file formats, you should check out Radamsa from OUSPG, Oulu University Secure Programming Group.

Radamsa can take bunch of files, for example jpeg files, and turn those into fuzzed images. It can also learn some structure from multiple files, so it's not just random bit flipping of bits and bytes.

It's also really cool that Radamsa can listen on TCP socket. That way you can use a script to connect to Radamsa to receive one fuzzed file per connection.

oherrala