Tool to detect Privilege Escalation and Data Tampering risks in Docker environments
Project description
IntegrityGuard: Docker Security Assessment Tool
IntegrityGuard is a security tool designed to detect Privilege Escalation and Data Tampering risks in multi-user Docker environments.
It implements the methodology described in the research "Segurança em Docker Multiusuário: Avaliação de Riscos", focusing on the dangers of exposing the Docker socket (/var/run/docker.sock) to non-privileged users.
🚀 Key Features
- Vulnerability Diagnosis: Checks if the current user is improperly added to the
dockergroup or has write access to the socket. - Safe Proof-of-Concept (PoC): Simulates a "Host Breakout" attack by attempting to mount the host filesystem and write a harmless test file, proving the viability of Data Tampering without damaging the system.
- IEVI Score Calculation: Quantifies the risk using the Integrity Violation Exposure Index (IEVI), a metric derived from the DREAD threat modeling framework.
- SonarQube-like Reporting: Generates visual HTML dashboards or JSON output for CI/CD integration.
📦 Installation
Install the tool directly from PyPI:
pip install integrityguard-cli
🛠️ Usage
Once installed, the integrity-guard command is available globally.
1. Standard Analysis (Console Output)
Runs the diagnosis and prints the findings and IEVI score to the terminal.
integrity-guard
2. Generate HTML Dashboard
Creates a visual report (integrity_scan_report.html) containing the risk score, DREAD breakdown, and detailed findings.
integrity-guard --html
3. JSON Output (DevOps/CI)
Outputs the raw data in JSON format for parsing by other tools.
integrity-guard --json
📊 How It Works (Methodology)
The tool operates in three phases:
- Diagnosis: It inspects user permissions and group memberships. Adding a user to the
dockergroup is equivalent to granting themrootaccess. - Simulation: It attempts to spin up a container with
-v /:/mnt/hostto verify if the host filesystem is writable. - Scoring: It calculates the IEVI (Integrity Violation Exposure Index).
- Score > 40: Indicates a Critical risk where an attacker can modify
/etc/passwdor other sensitive files. - Score < 40: Indicates a Tolerable risk (e.g., Rootless Docker).
- Score > 40: Indicates a Critical risk where an attacker can modify
🛡️ Mitigation
If IntegrityGuard reports a critical vulnerability, the recommended mitigation is to migrate to Docker Rootless mode or remove the user from the docker group.
📝 License
This project is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file integrityguard_cli-1.0.3.tar.gz.
File metadata
- Download URL: integrityguard_cli-1.0.3.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.7 Linux/6.17.9-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b585841201cc11597de2742c9803116f7c0a0c8a9eb3bbb0af7effb312579a4f
|
|
| MD5 |
ad676732e3827db4b9eb98236ee4cfc1
|
|
| BLAKE2b-256 |
cc430ba14d50985a6fe921097c3447a8c5663267c245d71670b31e93330dc4a3
|
File details
Details for the file integrityguard_cli-1.0.3-py3-none-any.whl.
File metadata
- Download URL: integrityguard_cli-1.0.3-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.7 Linux/6.17.9-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0a018d4b7db1efa1af46953ffb16f59649ebc15a93a310da5106ed122b7f652
|
|
| MD5 |
423f2af4e6b60e5bd1cb4605d40ce477
|
|
| BLAKE2b-256 |
a33c51f4a7b7b9f4115e463e12dd8b8f07f7520017dc397e95cd4b6af48d91aa
|