Install Vagrant and VirtualBox
To set up the framework, you'll need to install Vagrant and VirtualBox. Use the following commands to install them on your system:
sudo apt-get install -y vagrant
sudo apt-get install -y virtualbox
Running Confine:
cd confine
Start the Virtual machine using and connect to it using:
vagrant up
vagrant ssh
Go inside the folder named vagrant_data:
cd vagrant_data
Now you can run the becnhmark on confine using the run.py file.
This will debloat the container images and run the test cases and generate the relevant files.
Running Slimtoolkit and/or Speaker:
cd slimtoolkit_speaker
Start the Virtual machine using and connect to it using:
vagrant up
vagrant ssh
Go inside the folder named vagrant_data:
cd vagrant_data
Now you can run the becnhmark using main.py file. Check the help functionality using:
python3 orchestrator.py -h
All the tools (currently Slimtoolkit and Speaker) can be run using:
python3 orchestrator.py -t all
Specific tools can be run using:
python3 orchestrator.py -t toolname
This will generate all the data inside data folder.
To generate the reports go back to the main directory
cd /path-to-debloath-bench
Generate the graphs for correctnes and system call reduction:
python3 move.p
python3 measurement.py
To add more applications to the framework, follow these steps:
- Navigate to the
configurations
directory. - Create a new JSON file to define the configurations for the new applications. Model it after the existing JSON files, ensuring you include all necessary details.
- Additionally, add corresponding test cases for the new applications in the
TestCases
directory.
To include new debloating tools, follow these steps:
- Create a new Python file, e.g.,
your_tool.py
, similar to the existing tool files such asslimtoolkit.py
andspeaker.py
. - Remember to add the configurations and specifications for the newly added tool in the
configurations
directory.
We encourage contributions and the expansion of the framework to accommodate a broader range of applications and debloating tools.
Feel free to extend the framework's capabilities and make it more versatile!
Debloat Bench C has the following planned improvements:
-
Integrate CVEs and their corresponding reports.
- This will enhance security assessment by including information on known vulnerabilities and their impacts.
-
Automate the graph generation process.
- Automating graph generation will streamline data visualization and analysis.
-
Add a feature to run all tools from a single file.
- Simplify the execution of debloating tools by providing a one-click option for running all available tools.
-
Create a base class with common functionalities.
- Developing a base class with shared functionalities will simplify the addition of new debloating tools. It can include features like running test cases and training cases for dynamic tools.
Feel free to contribute and help us make this framework even better!