So recently, I attended a product demo of Mu Security's Mu-4000 and I have to say that it's interesting. Essentally, the product is a fuzzer with components to automatically detect failure as defined by things like regular expression matching of logs of failure to pass network traffic from point a to b or vice versa, and isolate the input that caused that failure to occur.
All of this talk about fuzzing got me interested in looking at it again. So I started reading some of the material about PROTOS and the chapter in the Shellcoder's Handbook. Now one of the things that I've had the good fortune of being exposed to was my old roommate Ian's book Perl Testing: A Developer's Notebook. It amazes me as to how similar the process of writing a semi-intelligent fuzzer is to creating mocking objects for unit testing.
If you haven't been exposed to the whole extreme programming(XP), thing then the relationship may not be obvious. In the XP world you try to construct unit tests to cover as much code as is possible to make sure that you get the desired functionality. To achieve this level of code coverage one needs to fullfil dependencies for that function or method. For example if you're testing a function that is supposed to generate some data and send it back down an already established socket, what you really want to test is the data generation, but you'll need something that supports the API of the socket. This is where mocked objects come in. In this case you'd generate a class that acts like the socket and perhaps spits a response back to the piece of code your testing if neccessary. This way you can determine if the meat of the function works as expected or at the very least as tested.
Fuzzing or fuzz testing on the other hand aims at finding faults by injecting random data into a black box be it function/method calls, network data or any other input. So in a strange way it can be thought of as almost an inversion of unit testing with mocked objects. This becomes especially true when trying to isolate which particular input is the one that caused the error.
So a lot of the work in mocking is providing something that the program can interact with such that you can test the component you want. The same is true for fuzzing, you have to provide enough of the functionality to penetrate deep enough into the code to find the bug.

