The sandbox technology is organized around 2 processes:
An executor sets up and runs the monitor:
The sandboxee, a child program running in the sandboxed environment:
Purpose/goal:
Example:
A really tight policy could deny all except reads and writes on standard input and output file descriptors. Inside this sandbox, a program could take input, process it, and send the output back.
The sandbox relies on seccomp-bpf provided by the Linux kernel. seccomp is a Linux kernel facility for sandboxing and BPF is a way to write syscall filters (the very same used for network filters). Read more about seccomp-bpf on Wikipedia.
In practice, you will generate your policy using our PolicyBuilder class. If you need more complex rules, you can specify raw BPF macros, like in the crc4 example.
Filesystem accesses are restricted with the help of Linux user namespaces. User namespaces allow to drop the sandboxee into a custom chroot environment without requiring root privileges.
Read our Getting started page to set up your first sandbox.