Moghaddas Borhan, Alireza ORCID: https://orcid.org/0009-0003-9802-6662
(2025)
CapMan: Detecting and Mitigating Linux Capability Abuses at Runtime to Secure Privileged Containers.
Masters thesis, Concordia University.
![]() |
Text (application/pdf)
8MBMoghaddasborhan_MA_S2025.pdf - Accepted Version Restricted to Repository staff only until 1 April 2026. Available under License Spectrum Terms of Access. |
Abstract
Linux capabilities represent an important security feature for enabling fine-grained management of privileges. However, limitations in selectively enabling capabilities for processes and lagging adoption from application developers often lead the operators to run containers with unnecessary privileges. Although this can potentially be addressed by modifying the application, minimizing the set of enabled capabilities, assigning capabilities to executable files, or using user-space utilities like Ptrace, those solutions typically require manual efforts, only provide partial protection, or incur significant overhead. In this thesis, we present CapMan, a solution that secures privileged containers by detecting and mitigating potential capability abuses at runtime. Our main idea is threefold. First, CapMan examines all capability requests made by system calls to ensure full protection. Second, CapMan performs the detection directly inside the Linux kernel to ensure its efficiency. Third, CapMan performs the mitigation in a transparent manner without requiring any change made to the application or container. We tackle several key challenges in realizing CapMan as follows: i) to ensure CapMan can cover every capability request, we study the Linux kernel source code to identify the kernel function used to handle such requests, and subsequently develop a kprobe-based kernel module to intercept those requests via that kernel function; ii) since user-space detection can introduce prohibitive delay, we design CapMan to perform its detection completely inside the kernel based on lightweight whitelisting and machine learning methods; iii) as Linux only allows the container itself to drop capabilities, CapMan performs its mitigation by overriding such rules in a safe manner using standard kernel functions and procedures.} Our evaluation of CapMan using real-world CVEs and capability abuses shows that it can mitigate all the tested capability abuses (most of which are missed by a state-of-the-art solution) with negligible performance overhead and resource consumption.
Divisions: | Concordia University > Gina Cody School of Engineering and Computer Science > Concordia Institute for Information Systems Engineering |
---|---|
Item Type: | Thesis (Masters) |
Authors: | Moghaddas Borhan, Alireza |
Institution: | Concordia University |
Degree Name: | M.A. Sc. |
Program: | Information Systems Security |
Date: | 4 March 2025 |
Thesis Supervisor(s): | Wang, Lingyu and Pourzandi, Makan |
ID Code: | 995417 |
Deposited By: | Alireza Moghaddasborhan |
Deposited On: | 17 Jun 2025 17:20 |
Last Modified: | 17 Jun 2025 17:20 |
Repository Staff Only: item control page