Skip to content

2. Setup

Min Hee Jo edited this page Mar 31, 2026 · 2 revisions

Prerequisites

  • Docker
  • Python 3.11+
  • Git
  • Containerized application to be tested

Installation

  1. Clone the repository:

    git clone https://github.com/boschresearch/syscallm-injection.git
    cd syscallm-injection
  2. Set up Python:

    cd ~/path-to/syscallm-injection
    pip install --upgrade pip setuptools
    pip install -e .
  3. Navigate to the proto directory and build the necessary files:

    cd proto
    make all
  4. 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

Configuration

There are two types of configurations for this project: Tool Configuration and Test Configuration.

Tool 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/configure

Test Configuration

The 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

Clone this wiki locally