Vixen
02b45cc4
csharp
public sealed class Mutator

Turns one input into a slightly different one.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

AFL's havoc stage, with the operations that matter for a binary protocol and none of the ones that do not. Uniform random bytes are a bad fuzzer for a codec: a snapshot starts with a 32-bit tick and a client drops anything not newer than the last one, so random input is refused at the first field about four billion times out of four billion. Everything interesting is found by taking something that decoded and breaking one thing about it.

The interesting bytes are interesting for reasons. 0x80 is a varint continuation, so a run of them is the encoding that walks a reader forward without ever terminating; 0xFF is both the largest length field and a continuation; 0x7F is the largest single-byte varint. A length field set to its maximum is the classic way to turn a decoder into an allocator, and it is one byte away from every well-formed input in the corpus.

Driven by FuzzRandom, for the reason stated there: a fuzzer that cannot be replayed has found nothing it can hand you.

Fields and properties (1)

  • public const int MaxLength

    The largest input this will produce.

Methods (3)

  • public Mutator(ulong seed)

    Creates a mutator.

  • public byte[] Mutate(byte[] input, byte[] other)

    Produces a mutant of an input, possibly spliced with another.

  • public byte[] Fresh()

    Produces an input from nothing, for the cases a corpus would never suggest.

Used by (4)

  • BitReaderTargetVixen.Net.Fuzz
  • FuzzSessionVixen.Net.Fuzz
  • HandshakeTargetVixen.Net.Fuzz
  • SessionClientTargetVixen.Net.Fuzz