Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Einreichen
ToolsExploitsBlog
Einreichen

Hacking-, PenTest- und Cybersicherheits-Tools für Ihr Sicherheitsarsenal!

Kitploit ist ein Verzeichnis von Hacking-, Cybersicherheits- und Pentesting-Tools. Entdecken Sie die neuesten Projekt-Updates, um Schwachstellen zu finden, Systeme zu analysieren, Tests zu automatisieren und Ihre Sicherheit zu stärken.

FeedsKontaktDatenschutz© 2026 Kitploit

Tool-Verzeichnis

Kategorien

Alle Kategorien anzeigen
Loading categories
Dirty-Cow-Ubuntu-Server-16.04.1 — CVE-2016-5195 (Dirty COW) privilege escalation on Ubuntu Server 16.04.1 — exploit, impact & mitigation | Kitploit
Tools/GitHubGitHub/cbry-96/dirty-cow-ubuntu-server-16.04.1
Privilege EscalationVulnerability AnalysisExploitationCTFPenetration TestingLearning & EducationLabs & Practice
GitHubcbry-96/dirty-cow-ubuntu-server-16.04.1

Dirty-Cow-Ubuntu-Server-16.04.1

CVE-2016-5195 (Dirty COW) privilege escalation on Ubuntu Server 16.04.1 — exploit, impact & mitigation

Repository anzeigen
122. Okt. 2026Noch nicht geprüft
Teilen
Inhalt in der angeforderten Sprache nicht verfügbar. Englische Version wird angezeigt.

Dirty COW — Privilege Escalation on Ubuntu Server 16.04.1

CVE Severity Platform Bootcamp Status

Privilege escalation lab exploiting the Dirty COW vulnerability (CVE-2016-5195), a race condition in the Linux kernel's copy-on-write subsystem that allows an unprivileged user to write to read-only system files, thereby gaining root access.


Ethical notice

This lab was run on a deliberately vulnerable virtual machine (Ubuntu Server 16.04.1 without security patches), in an isolated environment and on equipment I own. No third-party system was attacked. The documented techniques are intended exclusively for educational, defensive and professional portfolio purposes. Using them against systems without express written authorization is illegal.


Summary

IndicatorValue
Target machineUbuntu Server 16.04.1 (kernel vulnerable to Dirty COW)
VectorCVE-2016-5195 — race condition in copy-on-write
Exploit40847.cpp (EDB-ID 40847, Gabriele Bonacini)
ResultPrivilege escalation: access as root
Captured flag4GEEKS{Y0u_G0t_R00t}
Context4Geeks Academy Cybersecurity Bootcamp practice

Lab environment

  • Target system: unpatched Ubuntu Server 16.04.1, running as a virtual machine.
  • Isolation: internal network with no Internet access.
  • Initial access: standard user without administrative privileges.

Methodology

  1. Reconnaissance — identification of the operating system and kernel version.
  2. Vector identification — verification that the kernel is vulnerable to CVE-2016-5195.
  3. Exploit compilation — compilation of the 40847.cpp source code on the target system.
  4. Exploitation — execution of the exploit to modify /etc/passwd and overwrite the root password.
  5. Validation — confirmation of root access and capture of the flag.

Phase 1 — Reconnaissance

Verification of the kernel version to confirm that it is vulnerable:

uname -r
cat /etc/os-release

Linux kernels prior to version 4.8.3 are vulnerable to Dirty COW. Ubuntu 16.04.1 with an unpatched kernel meets this condition.


Phase 2 — Compiling the exploit

The 40847.cpp exploit modifies the /etc/passwd file by taking advantage of the race condition in the kernel's copy-on-write mechanism. Before running it, make a backup of the original file.

g++ -Wall -pedantic -O2 -std=c++11 -pthread -o dcow 40847.cpp -lutil

Phase 3 — Exploitation

Running the exploit with the -s option to disable dirty writeback and open a shell with root privileges:

./dcow -s

The exploit overwrites the root entry in /etc/passwd with a known password (dirtyCowFun), allowing access as root.

Exploit execution and root access Successful exploit execution: a shell with root privileges is obtained.


Phase 4 — Validation

Confirmation of root access and capture of the exercise flag:

whoami
# root
cat FlagUserRoot.txt
# 4GEEKS{Y0u_G0t_R00t}

Captured flag Screenshot of the flag confirming root access on the target system.


Findings

IDFindingCVESeverity
F-01Kernel vulnerable to Dirty COW — allows privilege escalation to rootCVE-2016-5195🔴 Critical (CVSS 7.8)
F-02System without security patches applied—🔴 Critical

Remediation

TimeframeAction
ImmediateUpdate the kernel to a patched version (≥ 4.8.3)
Short (7–30 days)Apply all pending security updates (apt update && apt upgrade)
Medium (30–90 days)Implement automated patch management and integrity monitoring of critical files (/etc/passwd, /etc/shadow)

Root cause: unpatched Linux kernel on an exposed system. The underlying mitigation is an update and vulnerability management cycle, not just patching this CVE.


Lessons learned

  • Privilege escalation does not always require exposed services. Dirty COW is exploited locally, which shows that an attacker with limited access (even through a web shell or SSH with a weak user) can compromise the entire system.
  • Backing up before exploiting is essential. The exploit modifies /etc/passwd; without a backup, the system could become unusable.
  • Kernel patches are critical. This vulnerability was published in 2016 and affected Linux kernels in use for nearly a decade. An unpatched system is a compromised system.

Repository structure

Dirty-Cow-Ubuntu-Server-16.04.1/
├── README.md
├── 40847.cpp                  # Exploit CVE-2016-5195 (EDB-ID 40847)
├── FlagUserRoot.txt           # Flag del ejercicio
├── dirtyrootpasswoord.png     # Evidencia: ejecución del exploit
├── flagroot.png               # Evidencia: captura del flag
└── .gitignore

Tools used

  • g++ — exploit compilation
  • Ubuntu Server 16.04.1 — vulnerable target system
  • VirtualBox — virtualization and lab isolation

References

  • NVD — CVE-2016-5195 (Dirty COW)
  • Exploit-DB — 40847
  • dirtycow.ninja — Official vulnerability page

Credits

Practice based on an exercise from the 4Geeks Academy Cybersecurity Bootcamp. The execution, evidence, and documentation in this repository are my own work.

The 40847.cpp exploit was created by Gabriele Bonacini and published under the GPL v3 license.

Author

Bryan Calderón Herrera · Cybersecurity | Networks and Telecommunications GitHub: cbry-96

Tool herunterladen

Ähnliche Tools

  • PEASS-ng

    PEASS – Privilegieneskalations-Awesome-Skripte-SUITE (mit Farben)

  • PrivescCheck

    Skript zur Aufzählung von Privilegieneskalation für Windows

  • LinEnum

    Skriptbasierte lokale Linux-Enumeration & Privilegieneskalationsprüfungen

Beliebteste

Alle anzeigen →

Entdecken Sie die meistgenutzten Tools unserer Community.

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    750
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    IMSI-Catcher-Plattform, die eine gefälschte GSM-Zelle bereitstellt, um SMS abzufangen, Nachrichten einzuschleusen und Mobilgeräte zu verfolgen

    739
  • 3

    Callisto

    jetp1ane/callisto

    Automatisiertes Binär-Schwachstellenanalyse-Tool, das ausführbare Dateien über Ghidra dekompiliert, Pseudo-C-Code mit Semgrep scannt und Ergebnisse mithilfe von GPT-3.5-Turbo validiert, um Fehlalarme zu reduzieren.

    585
  • 4

    opencti

    opencti-platform/opencti

    Offene Plattform für Cyber-Bedrohungsinformationen

    550
  • 5

    DFRoot

    a2333c/dfroot

    Android-Root-Tool für das Samsung Galaxy S25 Ultra (SM-S938B), das DirtyFrag CVE-2026-43284 und CVE-2026-43499 verkettet, um beim Booten automatisch über KernelSU Root zu erlangen.

    414
  • 6

    ARTEX

    baarai/artex

    LLM-basierte Multi-Agenten-Plattform für autonome Penetrationstests mit Planer-/Worker-Agenten, Asset- und Explorationsgraphen, MITM-Verkehrsaufzeichnung und Schwachstellen-Retesting.

    409

Alle Tools erkunden

Durchsuchen Sie unsere Tool-Sammlung

Alle Tools anzeigen →