How sandboxie-plus/sandboxie works
Based on our analysis of the file tree and the README, this project is the open‐source community fork of Sandboxie – a Windows sandbox solution that creates isolated environments for running untrusted applications. It actually comprises two editions: the “Classic” version with its legacy MFC-based UI and the “Plus” version with a modern, Qt-based user interface. The project contains many components that include the core sandbox engine (with kernel-mode drivers, user-mode DLLs, hooks, detouring, and service components), installers, support utilities, and additional add-on tools (e.g., SandboxieTools, QSbieAPI, SandMan, UGlobalHotkey).
Main high-level components
• Installer/Deployment: Look at the Installer directory, Sandboxie/install, and related build scripts. These represent the system’s deployment and update processes.
• Core Sandbox Engine: The “Sandboxie/core” directory is organized into several submodules:
– User-mode DLLs (e.g., Sandboxie/core/dll): Responsible for API hooking, detouring (the project even includes Detours subfolders), configuration, and file operations.
– Kernel-mode components (drivers in Sandboxie/core/drv): They handle low-level operations, including sandbox isolation at the OS level.
– Low-level system interactions (Sandboxie/core/low) and services (Sandboxie/core/svc): These manage IPC, service control, and communication with the installed sandbox driver.
• User Interfaces:
– Classic UI: Found in the “Sandboxie” directory and its MFC-based code.
– Plus UI: Organized under “SandboxiePlus” (and subprojects such as QSbieAPI, SandMan, and SbieShell) which use Qt and other modern libraries.
• Auxiliary/Helper Modules: Additional directories like SandboxieTools and SandboxiePlus/MiscHelpers provide plug-in functionality and supporting libraries (e.g., for archive management, network/firewall control, add-on management, hotkey functionality, and so on).
• Messaging & Localization: The “Sandboxie/msgs” directory collates language resource files and components that provide UI strings and error messages.
Relations and interactions
• The UI layer (both Classic and Plus) is the entry point from the user. It sends control instructions (e.g., start a sandboxed process, apply a configuration change) to the underlying core engine.
• The Core Engine layers communicate with the OS using both user-mode DLLs and kernel drivers. They use IPC mechanisms (through services and named pipes as seen in the “svc” subdirectory) and hook into processes to enforce the sandbox environment.
• The Installer components build and deploy the appropriate binaries and configurations (e.g., the NSIS scripts and build commands in the Installer directory), which prepare the system for installation and updates.
• External tools and add-ons (like LogApiDll or SandboxToys2) interact with the sandbox environment through exposed APIs, logging, or hook interfaces.
Architectural patterns and design principles
• Modularity & Layering: The system is built in layers – from the interface layer (UI), to the sandbox orchestration (dll and service components), down to the driver/kernel and low-level hooks.
• Separation of Concerns: Different directories manage UI (Classic vs. Plus), sandbox core, installers, and external tools.
• Extensibility: The presence of add-on modules (e.g., SandMan and MiscHelpers) indicates a design that favors plug-and-play additions and extension points.
• Cross-cutting concerns: Support for multiple languages, configuration files, and separate CI/CD pipelines (as evidenced by the .github folder with workflows) underline the robustness in design.
Final checklist
• Every major directory group and significant file collection (Installer, Sandboxie, SandboxiePlus, and SandboxieTools) is represented.
• External interactions (e.g., OS-level interactions like system calls, IPC channels, network communications, etc.).
• Labels are clear and cover responsibilities such as “isolating sandbox environments,” “hooking system calls,” “managing sandbox configurations,” or “facilitating add-on integration.”