senier / cobrafuzz Goto Github PK
View Code? Open in Web Editor NEWCoverage guided fuzz testing for cobra^H^H^H^H^Hpython
License: Apache License 2.0
Coverage guided fuzz testing for cobra^H^H^H^H^Hpython
License: Apache License 2.0
Done here:
cobrafuzz/pythonfuzz/fuzzer.py
Line 10 in d0bb6b7
This conflicts with fuzzing targets that use a different method. Investigate alternatives.
cobrafuzz/pythonfuzz/corpus.py
Line 10 in d0bb6b7
Utilize multiple CPU cores for fuzzing.
Parallel fuzzing requires refactoring of coverage collection. Right now, coverage is collected in the child process and the new coverage is sent over a pipe shared between parent and child. The parent then compares the new coverage with the coverage previously stored (by the parent) and in case it increased, stores the binary returned by the child process.
The current approach has a number of limitations:
Design:
The tracer is changed such that it can be reset.
class Status:
worker: int
job: int
class Report:
worker: int
job: int
covered: list[tuple[str, str, int]]
class Error:
worker: int
job: int
message: str
class Job:
id: int
data: bytes
The number of runs calculation on a 256 core systems seems much lower than expected, while the fuzzing results seem in accordance with the number of cores. Investigate.
Try to shrink the input leading to a crash:
Strategies for (specific) mutations:
To allow seamless restart of a fuzzing campaign, obtain coverage data for all samples found in the crash dir (if any) and add them to the coverage database without reporting them as a crash.
Currently, when an example in the corpus exists that will likely trigger a crash, it will be modified, stored back into the corpus and likely trigger another crash at the same location. The more examples of the same type of issue end up in the corpus, the more likely it is to produce the same issue over and over again.
Solutions:
Update: May be as easy as checking the coverage for error in the coordinator process and only add / distribute a crash artifact iff the corresponding path has not been found in the coverage database.
Allow for setting a timeout after which to give up the fuzzing attempt.
The fuzzer currently exits once a crash was found. Add a mode of operation where it continues fuzzing.
Power schedule can be applied to the corpus (which input is selected for mutations) and on the mutation functions used (which mutations have been used):
Exceptions in the __del__
method are ignored. Detect the respective warning message on stdout and treat the sample as a crash.
Combing multiple parts of the corpus into a new test input.
The fuzzer does not seem to load previous state from the fuzzing directory. Nor does it load state from previous crashes
directory.
Clean up the directory handling such that
I don't have an application for this parameter. Remove.
Currently the fuzzer often creates bit-identical crashes. This should be next to impossible with proper randomness. Check all random sources to be truly random.
Idea: Create a shared memory area for each worker (shared with the coordination process). Before each execution, the worker stores the current binary into that shared memory area. The coordination tasks periodically check the liveness of each worker. When a configurable amount of time has passed without a status update, the worker is killed, the binary stored in the respective shared memory area stored as timeout and the worker is restarted.
TODO: Find a way to detect a memory exhaustion and handle it in a similar way (assuming the process gets killed when memory is exhausted). E.g. analyzing the return code for fatal error signals might be a solution.
Mypy cannot currently analyze the library as it's not marked as containing type information.
Currently, either an exact artifacts path (storing a single file) is configured or the default directory crashes
is used for storing crash results. Rework this to allow for providing an alternative directory (also required for #11).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.