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

リポジトリを見る
12026年10月22日未レビュー
共有
要求された言語のコンテンツは利用できません。英語版を表示しています。

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

    Windows用の権限昇格列挙スクリプト

  • LinEnum

    スクリプト化されたローカルLinux列挙と特権昇格チェック

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock ワンタップ実行アプリ(CVE-2026-43499)

    750
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    不正なGSMセルを展開してSMSを傍受し、メッセージを注入し、モバイル端末を追跡するIMSI Catcherプラットフォーム

    739
  • 3

    Callisto

    jetp1ane/callisto

    Ghidraを介して実行可能ファイルを逆コンパイルし、Semgrepで擬似Cコードをスキャンし、GPT-3.5-Turboを使用して検出結果を検証することで誤検知を低減する、自動化されたバイナリ脆弱性解析ツール。

    585
  • 4

    opencti

    opencti-platform/opencti

    オープンサイバー脅威インテリジェンスプラットフォーム

    550
  • 5

    DFRoot

    a2333c/dfroot

    Samsung Galaxy S25 Ultra (SM-S938B) 向けの Android root ツール。DirtyFrag CVE-2026-43284 と CVE-2026-43499 を連鎖させ、KernelSU 経由で起動時に自動的に root を取得します。

    414
  • 6

    ARTEX

    baarai/artex

    プランナー/ワーカーエージェント、資産グラフと探索グラフ、MITMトラフィック記録、脆弱性の再テストを備えたLLMマルチエージェント自律ペネトレーションテストプラットフォーム。

    409

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →