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.


filepath – Path to the configuration


Configuration object

static from_str(s: str) EngineConfiguration[source]

Parse a string to a configuration object.


s – configuration as string


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.


coverage mode used

static new() EngineConfiguration[source]

Static method that should return a fresh configuration object.


Configuration object

set_target(target: int) None[source]

Set a specific target (address, index etc), that should be targeted by the fuzzing engine. This will be used when running in a targeted way.


target – identifier of the target

to_str() str[source]

Serialize configuration object to string.


serialize configuration

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'

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.


binary_file – file path to an executable file


True if supported, and two optional attributes indicating the ExecMode and FuzzMode


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.


list of coverage modes