Fuzzing experiments orchestrator for embedded systems
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
PROJECT ARCHIVED Further development performed as emtorch.
This project has drifted from fuzzing towards more generic experiments, hence the change of the name.
Emfuzzer fuzzing experiments orchestrator for embedded systems
When executing fuzzing experiment on embedded environment one often faces challenge of performing multiple tasks in repeatable and observable manner, for example: reset board, ensure embedded software booted, send fuzzing data using selected link, monitor peripheral state to detect changes in behaviour etc.
This is what Emfuzzer helps to orchestrate: it runs various tools and scripts in specific manner, then gathers their results for further inspections.
Note: although focused on fuzzing and embedded systems, Emfuzzer can help with any software-related experiments, that require repeatable order of tasks and results capture.
Installation
Emfuzzer is available on PyPI, it is recommended to install
it in isolated environment, either by using Python venv or
tools like pipx.
python -m venv .venv
source .venv/bin/activate
pip install emfuzzer
pipx install emfuzzer
Usage
To run experiments simply run:
emfuzzer --config=experiment.json test1.bin test2.bin
For each specified data file steps from experiment.json
will be executed and gathered results stored in file named
emfuzzer-CURRENTDATE.json. Application will output logs
to the console and also store them in .log file next to
the .json results file. The prefix for output files can
be modified using --output-prefix command line switch.
See default-config.json in source directory for example
of experiment definition (this file can be safely used -
the "experiment" calls cat on each passed file).
To obtain complete command line switches documentation call
emfuzzer --help.
Experiment
Each data file passed to the emfuzzer represents a single Test Case. For each test case following experiment steps will be performed:
- Setup tasks will be executed and their results stored.
- Monitoring tasks will be started.
- Case actions will be performed and their results stored.
- Monitoring tasks will finish, their results stored.
- Check tasks will be executed and their results stored.
- Go to 1 for next Test Case.
Configuration
Experiment configuration is stored in JSON format.
See chapters below for list of all types of injectors, tasks and monitors (with arguments).
Below is the default-config.json with comments:
{
"case": { // for each case
"delays": {
"between_cases": 0.2, // delay between Test Cases
"before_actions": 1 // delay after all setups
},
"setups": [ // list of setups
{
"type": "subprocess", // type of setup tasks
"name": "setup", // name used in results
"args": { // arguments for given setup
"cmd": [
"echo",
"SETUP"
],
"finish": {
"timeout": 0.5,
"signal": "NONE"
},
"shell": false
}
},
{ // second setup
"type": "ping_alive",
"name": "ping",
"args": {
"host": "127.0.0.1",
"timeout": 10,
"interval": 1
}
}
],
"monitoring": [], // monitoring tasks
"actions": [ // case actions (core of the experiment)
{
"type": "subprocess",
"name": "test",
"args": {
"cmd": [
"cat $EMFUZZER_CASE_KEY"
],
"shell": true,
"finish": {
"timeout": 0.5,
"signal": "NONE"
}
}
}
],
"checks": [ // list of checks tasks
{ // same as setups
"type": "ping_stable",
"name": "ping",
"args": {
"host": "127.0.0.1",
"count": 2,
"interval": 1
}
},
{
"type": "subprocess",
"name": "teardown",
"args": {
"cmd": [
"echo",
"TEARDOWN"
],
"finish": {
"timeout": 0.5,
"signal": "NONE"
},
"shell": false
}
}
]
}
}
SubTasks
Sub Tasks are tasks that for each case can be executed as setups, checks, actions or monitors.
Note: failure of "setup" does not interrupt the test case execution - it is logged and stored in results, next steps are still executed, to be analyzed later.
Monitors are tasks that their execution is started after setups, then they are active during the actions and finish before checks.
All Sub Tasks instances has to be named using name.
Available tasks:
subprocess- execute script and capture its exit code. Arguments:cmd- (list of strings) command to be executedshell- (boolean) true when shell should be used todo interpret the commandfinish- configuration of finishing the task:signal- (string) signal name to be sent to the task (can beNONE)timeout- (float) time to wait for command to finish (starts after signal is sent)
ping_stable- pings a target number of times, expects all pings to reply. Arguments:host- (string) host to be checkedcount- (integer) number of pings to sentinterval- (integer) interval between pings
ping_alive- pings a target and expects first response Arguments:host- (string) host to be checkedtimeout- (float) timeout to wait for responseinterval- (integer) interval between pings
remote- executes command over SSH and captures its exit code. Host key must be in 'known hosts' file. Arguments:connection- dictionary containing:hostportusernamepassword
command- (string) command to be executedstart_key- (string) string expected in the output of the executed command for the command to be considered "started successfully"start_timeout- (float) timeout for the start of the commandfinish- configuration of finishing the task:signal- (string) signal name to be sent to the task (can beNONE)timeout- (float) time to wait for command to finish (starts after signal is sent)
coap_monitor- listens for CoAP responses Arguments:target- dictionary containinghostandportof the targetresponse_timeout- (float) timeout to wait for CoAP response after sending any data (useful only when used as Injector)observation_timeout- (float) additional time for detecting any unexpected messages when monitoring finishes
coap_send- sends data provided in argument to the program call as CoAP message and checks system response. Arguments:monitor- name of thecoap_monitorinstance used to send the message.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file emfuzzer-1.3.1.tar.gz.
File metadata
- Download URL: emfuzzer-1.3.1.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51f6d643ae15f7581bbceb2ce03ffd9089b42e7c06fc7d46a4eed2a8bb212139
|
|
| MD5 |
2b1d8a7ff2db4674a1166005d01928c8
|
|
| BLAKE2b-256 |
b9c7eb3027a0c3919e4c5fd9d3f1d304bd4044a3327eddda45068ebe85a0596f
|
Provenance
The following attestation bundles were made for emfuzzer-1.3.1.tar.gz:
Publisher:
workflow.yml on ZBOSK-II/emfuzzer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
emfuzzer-1.3.1.tar.gz -
Subject digest:
51f6d643ae15f7581bbceb2ce03ffd9089b42e7c06fc7d46a4eed2a8bb212139 - Sigstore transparency entry: 1283880187
- Sigstore integration time:
-
Permalink:
ZBOSK-II/emfuzzer@f0ec94ff0eac7379ee2934490cf5a9a912327100 -
Branch / Tag:
refs/tags/1.3.1 - Owner: https://github.com/ZBOSK-II
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@f0ec94ff0eac7379ee2934490cf5a9a912327100 -
Trigger Event:
push
-
Statement type:
File details
Details for the file emfuzzer-1.3.1-py3-none-any.whl.
File metadata
- Download URL: emfuzzer-1.3.1-py3-none-any.whl
- Upload date:
- Size: 31.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ba0bfc580d6580f5e1029d63f12cb65a35355c13dcb4ea7952c6d728a809724
|
|
| MD5 |
d9c6e982c8c11ecbfbf873488e488945
|
|
| BLAKE2b-256 |
b96e29949fa80a98fd1aac43cc36f60db6ca67edc0e747e48bf8b6e9e11413e3
|
Provenance
The following attestation bundles were made for emfuzzer-1.3.1-py3-none-any.whl:
Publisher:
workflow.yml on ZBOSK-II/emfuzzer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
emfuzzer-1.3.1-py3-none-any.whl -
Subject digest:
3ba0bfc580d6580f5e1029d63f12cb65a35355c13dcb4ea7952c6d728a809724 - Sigstore transparency entry: 1283880782
- Sigstore integration time:
-
Permalink:
ZBOSK-II/emfuzzer@f0ec94ff0eac7379ee2934490cf5a9a912327100 -
Branch / Tag:
refs/tags/1.3.1 - Owner: https://github.com/ZBOSK-II
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@f0ec94ff0eac7379ee2934490cf5a9a912327100 -
Trigger Event:
push
-
Statement type: