Skip to content
KitploitKITPLOIT
उपकरणएक्सप्लॉइटब्लॉग
Log in
जमा करें
उपकरणएक्सप्लॉइटब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

फ़ीडसंपर्कगोपनीयता© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
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
उपकरण/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

रिपॉजिटरी देखें
122 अक्टू॰ 2026अभी तक समीक्षित नहीं
साझा करें
अनुरोधित भाषा में सामग्री उपलब्ध नहीं है। अंग्रेज़ी संस्करण दिखाया जा रहा है।

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

टूल डाउनलोड करें

संबंधित टूल

  • PEASS-ng

    PEASS - विशेषाधिकार वृद्धि के लिए अद्भुत स्क्रिप्ट्स सूट (रंगों के साथ)

  • PrivescCheck

    विंडोज के लिए विशेषाधिकार वृद्धि गणना स्क्रिप्ट

  • LinEnum

    स्क्रिप्टेड स्थानीय लिनक्स गणना और विशेषाधिकार वृद्धि जांच

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    # घोस्टलॉक वन-टैप निष्पादन ऐप (CVE-2026-43499)

    750
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    IMSI Catcher प्लेटफ़ॉर्म जो SMS को इंटरसेप्ट करने, संदेश इंजेक्ट करने और मोबाइल उपकरणों को ट्रैक करने के लिए एक रोगी GSM सेल तैनात करता है

    739
  • 3

    Callisto

    jetp1ane/callisto

    स्वचालित बाइनरी भेद्यता विश्लेषण उपकरण जो Ghidra के माध्यम से निष्पादन योग्य फ़ाइलों को डीकंपाइल करता है, Semgrep के साथ स्यूडो-सी कोड को स्कैन करता है, और गलत सकारात्मकता को कम करने के लिए GPT-3.5-Turbo का उपयोग करके निष्कर्षों को मान्य करता है।

    585
  • 4

    opencti

    opencti-platform/opencti

    खुला साइबर खतरा बुद्धिमत्ता प्लेटफॉर्म

    550
  • 5

    DFRoot

    a2333c/dfroot

    Samsung Galaxy S25 Ultra (SM-S938B) के लिए Android रूट टूल जो बूट पर KernelSU के माध्यम से स्वचालित रूप से रूट प्राप्त करने के लिए DirtyFrag CVE-2026-43284 और CVE-2026-43499 को चेन करता है।

    414
  • 6

    ARTEX

    baarai/artex

    प्लानर/वर्कर एजेंट, एसेट और एक्सप्लोरेशन ग्राफ़, MITM ट्रैफ़िक रिकॉर्डिंग, और भेद्यता पुनःपरीक्षण के साथ LLM मल्टी-एजेंट स्वायत्त पेनेट्रेशन टेस्टिंग प्लेटफ़ॉर्म।

    409

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →