
brary derived from Capsicum, provides a suite of
widely-used services designed to operate within Cap-
sicum’s sandbox. These services include Capsicum-
compatible APIs for networking, DNS resolu-
tion, file handling, and specific system calls like
getgrent(3), getpwent(3), sysctlbyname(3),
and syslog(3). While libcasper(8) simplifies the
developer experience, it still confines users to a lim-
ited set of features.
Several sandboxing methodologies focus on track-
ing and interposing system calls. For instance, Li et
al. proposed a model for intrusion detection that re-
lies on system call interception, control, and data flow
assessment (Li et al., 2010). Their system intercepts
each system call, evaluating it against a predefined
policy to ensure it aligns with expected behaviour.
While effective in capturing system call contexts with
manageable overhead, it faces challenges with policy
complexity and performance for larger applications.
Similarly, Ul Haq et al. described an isolation sys-
tem for Linux that integrates Seccomp-BPF, AppAr-
mor, Dune, and ptrace to restrict application access
to system resources (Linux Kernel Documentation,
2012; Gruenbacher and Arnold, 2007; Belay et al.,
2012). Their approach translates defined restrictions
into Dune, leveraging hardware virtualization exten-
sions (Intel VT-x) for a virtual machine-like isolation.
The policy definition is complex, requiring extensive
kernel interaction and high-level privileges, which in-
creases performance overhead. In contrast, the ap-
proach adopted in Leash eliminates the need for hard-
ware involvement. It simplifies policy definition using
available resources, eliminating the need for complex
translations or additional instructions. This frame-
work prepares resources for the sandbox without re-
quiring further verification.
Unix containers, such as FreeBSD’s Jail(8), of-
fer a form of sandboxing by creating isolated execu-
tion environments that mimic the host OS. While they
provide good isolation, containers incur high mem-
ory and disk overhead, making them inefficient for
sandboxing individual applications, especially when
secure modifications to the host system are needed.
Additionally, securing host machines against exploits
originating from containers or hyper-visors remains a
challenge as described in recent studies(Bhanumathi
et al., 2023; Win et al., 2017). This ongoing debate
highlights that, while containers offer isolation, they
do not provide the same level of security as sandbox-
ing, particularly in protecting the host from guest ap-
plications and vice versa.
In summary, sandboxing encompasses a range of
defensive strategies designed to impose behavioural
restrictions on programs, thereby mitigating risks and
potential damages to systems from exploits. The pri-
mary objective is to prevent or minimize future harm
and information leakage resulting from vulnerabilities
in applications. Approaches addressing issues such as
malicious code, application restrictions, confinement,
and program compartmentalization all are counted in
this category (Greamo and Ghosh, 2011). Design-
ing a sandboxing mechanism targets specific vulner-
abilities, defining limitations that prohibit certain be-
haviours through instructions, system calls, and ac-
cess controls (Ansel et al., 2011; Watson et al., 2010).
Variations in resource protection, behaviour defini-
tions, and limitations lead to different sandboxing
mechanisms with distinct purposes and effectiveness.
6.2 Secure Package Management
This study primarily was focused on enhancing the se-
curity of installer applications, which are critical com-
ponents in software deployment. In this section, we
delve into various security mechanisms that have been
implemented in package managers on Linux and Unix
systems. Package managers are crucial for verify-
ing software integrity and auditing known vulnerabili-
ties before installation, thus ensuring system security.
Copper et al. provide an in-depth analysis of these
security mechanisms (Cappos et al., 2008). While
Unix and Linux package managers were not initially
security-focused, they have evolved to address vari-
ous concerns. For example, the Advanced Packag-
ing Tool (APT) in Debian-based distributions uses Se-
cure APT, which authenticates repositories with cryp-
tographic signatures to ensure packages come from
trusted sources. However, this mechanism lacks a
confinement-based model, potentially limiting its ef-
fectiveness in certain scenarios.
FreeBSD’s package manager includes key secu-
rity features, such as auditing archives for known vul-
nerabilities, verifying package checksums, and issu-
ing warnings about installation privileges (FreeBSD
Foundation, 2023). The pkg(8) utility also oper-
ates within a sandbox using Capsicum, adding pro-
tection by isolating package management operations.
However, these security measures are limited by the
repositories supported and the vulnerabilities already
identified. Poudriere is another package builder for
FreeBSD that enables users to compile packages for
multiple architectures on a single machine (Seaman,
2011). It enhances security by compiling packages
within jails preventing unwanted remote connections.
This approach ensures a clean build process, includ-
ing only the necessary dependencies for the package’s
functionality. Nix, a non-native package manager, ad-
dresses the challenges of managing varying depen-
Leash: A Transparent Capability-Based Sandboxing Supervisor for Unix
549