-
Notifications
You must be signed in to change notification settings - Fork 0
2. Setup
- Docker
- Python 3.11+
- Git
- Containerized application to be tested
-
Clone the repository:
git clone https://github.com/boschresearch/syscallm-injection.git cd syscallm-injection -
Set up Python:
cd ~/path-to/syscallm-injection pip install --upgrade pip setuptools pip install -e .
-
Navigate to the
protodirectory and build the necessary files:cd proto make all -
Set up configuration:
# if you are using bash echo "source ~/path-to/syscallm-injection/config/configure" >> ~/.bashrc # if you are using zsh echo "source ~/path-to/syscallm-injection/config/configure" >> ~/.zshrc
There are two types of configurations for this project: Tool Configuration and Test Configuration.
The config/configure file sets all the necessary environment variables for running the testbed. Here is a summary of the environment variables that can be set:
-
APPLICATION_NAME: The name of the application under test. (when using the example AUTs) -
IMAGE_NAME: The image name of the application under test. (when not using the example AUTs, change this value to your own AUT.) -
CONFIG_DIR: The directory containing the test configuration. -
EXPORT_DIR: The directory where the test results will be saved. -
WORKLOAD_DIR: The parent directory that includes input and output directories for the AUT workload.
After updating the environment variables, ensure the changes take effect by either opening a new terminal tab or sourcing the configure file:
source ~/path-to/syscallm-injection/config/configureThe test configuration is specified in a JSON file located in the path set as CONFIG_DIR in the tool configuration. This file defines the parameters and settings for the fuzzing tests. Here is an example of a test configuration JSON file:
{
"syslog_monitor_config": {
"id": "Test_Delay_Injection",
"strace_output": "/export/strace.output.{id}",
"faults": [
"inject=write:delay_enter=10000:delay_exit=10000",
"inject=close:delay_enter=10000:delay_exit=10000"
]
}
}-
syslog_monitor_config: Configuration for the syslog monitor.-
id: Identifier for the test. -
strace_output: Path for the strace output file. -
faults: An array of fault injection settings.
-
The syntax for faults can be referenced in Fault Injection Syntax using Strace.
To use your own test configuration, create a JSON file with the desired settings and update the CONFIG_DIR environment variable to point to the directory containing your configuration file.
After updating the environment variables, ensure the changes take effect by either opening a new terminal tab or sourcing the configure file:
source ~/path-to/syscallm-injection/config/configure