Skip to content

Design & Architecture

This section is for developpers who want to learn how Packing Box is built. It is a Docker image based on Ubuntu and architectured in three layers as depicted hereafter.

Architecture of Packing Box

  1. The lower layer is the underlying OS, currently Ubuntu 22.04.
  2. The middle layer, Libraries, shows an underlying set of executable formats. Currently, the Portable Executable (PE) and Executable & Linkable Format (ELF) are supported and Mach Objects are considered for a future addition. This layer shows two other subsets of software ; Machine Learning currently gathers two frameworks (Scikit-Learn and Weka) and Binary Parsing regroups parsing libraries for various executable formats (including LIEF and some others very soon like pefile and pyelftools.
  3. The upper layer, Automation Toolset, contains the logic for abstracting different entities and items that are, for some of them, backed by Python tools and/or configurable through YAML files.

These three layers are tied together through the Dockerfile of the Packing Box.

The upper layer containing the specific logic is disseminated into the Docker image at different locations:

  • Code base (pbox Python package): pbox holds the source code that defines abstractions (see architecture schema here above) ties every pieces together. It gets installed from src/lib into user's home location for Python libraries at ~/.local/lib/python3.11/site-packages/pbox.
  • Toolset (~/.opt): Tools, items and utils coming from src/files get installed in user's home at ~/.opt. The bin subfolder is a special case and holds Python scripts aimed to be wrappers for detectors so that they use a logic from another package, pboxtools (which is a lightweight library separated from pbox to keep startup overhead lower), to normalize detection outputs.
  • Main workspace (~/.packing-box): Configuration files (coming from src/conf), executable formats' data (from src/data), datasets and models are stored in the main workspace at ~/.packing-box. This can be changed when working experiments using the experiment tool by opening a new experiment. Note that, in this case, figures generated from plot functionalities are saved in a dedicated subfolder of the experiment's workspace.
Back to top