Fuzzer Interface
- class libpastis.enginedesc.EngineConfiguration[source]
Basic interface to represent an engine configuration file on broker side. A fuzzing engine have to provide such object so that the broker can load them and forwarding them to clients.
- static from_file(filepath: Path) EngineConfiguration [source]
Load a configuration object from file.
- Parameters:
filepath – Path to the configuration
- Returns:
Configuration object
- static from_str(s: str) EngineConfiguration [source]
Parse a string to a configuration object.
- Parameters:
s – configuration as string
- Returns:
configuration object
- get_coverage_mode() CoverageMode [source]
Should return the coverage mode defined in the configuration. For greybox fuzzer like AFL++, Honggfuzz one can return
CoverageMode.AUTO
. If the engine support different coverage metric it should return the one selected.- Returns:
coverage mode used
- static new() EngineConfiguration [source]
Static method that should return a fresh configuration object.
- Returns:
Configuration object
- class libpastis.enginedesc.FuzzingEngineDescriptor[source]
Abstract class describing a fuzzer engine. This object is used on broker side, to identify the name and version of a fuzzer and to know whether or not it accept a specific executable file.
- NAME = 'abstract-engine'
- SHORT_NAME = 'AE'
Name of the fuzzing Engine
- VERSION = '1.0'
Short name of the fuzzing engine
- static accept_file(binary_file: Path) Tuple[bool, ExecMode | None, FuzzMode | None] [source]
Function called by the broker with all executable files detected in its directory. As an fuzzer developer, you have to implement this function to indicate whether a file is accepted as a target or not.
- Parameters:
binary_file – file path to an executable file
- Returns:
True if supported, and two optional attributes indicating the ExecMode and FuzzMode
- config_class
alias of
EngineConfiguration
- static supported_coverage_strategies() List[CoverageMode] [source]
List of coverage metrics supported by the fuzzer. If it only support a single one, it should be
CoverageMode.AUTO
.- Returns:
list of coverage modes