Sarah Jamie Lewis
||2 years ago|
|fuzzimages||2 years ago|
|pics||3 years ago|
|results||2 years ago|
|src||2 years ago|
|.gitignore||2 years ago|
|Cargo.toml||2 years ago|
|README.md||2 years ago|
nesfuzz is a fuzzer for Nes Games by @SarahJamieLewis
nessfuzz built on top of the nestur emulator by @spieglt.
Usage & Methodology
To begin fuzzing you will need a rom file, and a sample input file. For sample inputs see TasVids.
nessfuzz <rom> <tas file>
nessfuzz smb.rom happylee-supermariobros,warped.fm2
nesfuzz uses the same input to see novel RAM configurations and search the possible input space. It will also tile 28 (by default), windows to allow you to see the fuzzing happen.
Found at the top of
main.rs a few parameters control the types and effectiveness of fuzzing.
// The number of cpu instances to spawn.. const NUM_THREADS: usize = 28; // The number of frames to fuzz and process // A small number exploits the current point more at the expense of // large exploration - and vice versa. const FRAMES_TO_CONSIDER: usize = 400; // Same input should generate the same output... // (I make no guarantee of that at the moment) const RNG_SEED: u32 = 0x5463753; // If set to a low number, this disables start presses after the given frame // Useful for some games where pausing does nothing to advance the game... const DISABLE_START_PRESSES_AFTER: usize = 50; // The rate at which seed inputs become corrupted.. const MUTATION_RATE: f64 = 0.1; // The rate at which seed inputs may become soft resets.. const MUTATION_RATE_SOFT_RESET: f64 = 0.000;
Right now novelty is driven by the hamming distance of the ram of the cpu compared to observed values. You can get better performance by changing the novelty to focus on specific values / be more game specific.
There are also a number of possible extensions in the replacement algorithm. Right now the fuzzer makes no attempt to "lock-in" good paths and so the engine is likely to reconsider all past values. This leads to the queue of inputs growing without bound (eventually causing the application itself to be refused memory from the kernel).
CPU Timing Test
|Test Name||Current Status|
|07.screen_bottom.nes||Fail #4 -