Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

mitschud/DirtyFrag

Security & Privacy

Forked from diabl0w/DFRoot

An Android app that gains temporary root on vulnerable Samsung devices via the CVE-2026-43284 page-cache exploit; root disappears after reboot.

1,539
209
Java
GPL-2.0
55 days old

What it does

DirtyFrag is an Android app for obtaining root on vulnerable devices without an unlocked bootloader or a custom kernel. It is built around CVE-2026-43284, a page-cache write primitive: because AES-CBC ESP packets are decrypted directly into the page cache of files opened for splice(), a crafted IV lets the exploit overwrite 16-byte-aligned blocks of a mapped shared library without write permission or copy-on-write. DirtyFrag uses that to patch shellcode into libc++.so, which then loads a kernel module and starts the SU daemon of an installed KernelSU-family manager.

The root session is ephemeral. The kernel module, su and loaded modules all disappear on reboot, which also serves as the recovery path if a run fails. It targets Samsung devices on Android 12+ with One UI, and the interface is One UI-inspired. It works as a fork of the upstream DFRoot project DFRoot.

Quick start

  1. Install the signed APK from Releases.
  2. Install an SU manager that ships libksud.so. On Samsung this is required to be diabl0w's KernelSU; other devices can use KernelSU, KernelSU-Next, KowSU or BakaSU.
  3. Open DirtyFrag, choose that manager in the SU Manager card, and press Run exploit.

The app no longer bundles ksud; it stages it from the chosen manager's own libksud.so, so a manager without that library cannot provide root. The grant in the manager must be given again after every reinstall because a fresh install gets a new Android UID. If you need a pre-release build, use the DFRoot artifact from the latest green Build workflow, where the APK is at app/build/outputs/apk/release/dirtyfrag.apk.

Build from source

Build with Gradle, pointing JAVA_HOME at an Android Studio JBR:

JAVA_HOME="<Android Studio jbr>" ./gradlew assembleRelease

The release APK is written to app/build/outputs/apk/release/dirtyfrag.apk. Release builds are signed with app/keystore.jks, which is not checked in; the signing config expects alias dirtyfrag with dirtyfrag for both passwords, so generate a key first with keytool -genkeypair. The eight prebuilt kernel modules are committed under app/src/main/jni/ko/ and must be rebuilt from lkm/dfroot.c through the Build workflow whenever that source changes.

Constraints and known limitations

Compatibility depends on the device kernel and its security patches. The log reports "not vulnerable" when the kernel is too new, the manufacturer backported the official mitigation, or accidental mitigation is present (typically kernel 6.1); there is no fix for those cases. Success depends on a manager that ships libksud.so.

Autorun is gated behind Expert mode and disables itself after a failed run to avoid bootloops. If a module causes crashes, set KernelSU Modules to Disabled and reroot; that switch works without root. The app also offers a Recovery Writer under Expert mode that toggles Samsung's download-mode authorisation byte, though the vendor clears that byte on its own schedule. The advanced log is translated only in the UI; the saved file stays in English. The project is licensed GPL-2.0-only and notes that GPL-3.0-only code cannot be incorporated. Clean unrooting requires deleting /data/adb/ksu, ksud and module residue with a root-capable file manager before unrooting.

HotRepo's take

The repository has 1,539 stars and 209 forks but no recorded GitHub daily-rank entry or HotRepo snapshot history, so there is no trend reading to add. What stands out technically is the explicit upstream fork relationship and the decision to commit the eight prebuilt kernel modules under app/src/main/jni/ko/, which lets a plain clone build without a DDK toolchain at the cost of rebuilding artifacts whenever lkm/dfroot.c changes. The documentation is unusually candid about failure modes — non-vulnerable kernels, module-caused bootloops and stale Auto reboot runs — which is the useful part for anyone evaluating whether this fits their device.

Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.

You might also like

  1. diabl0w/DFRootAndroid rooting tool that exploits the DirtyFrag kernel page-cache write flaw to load a KernelSU-compatible root module without unlocking the bootloader.C990
  2. eness/php2shell-CVE-2026-109618-CVE-2026-109619-PoCA weaponized PoC for pre-auth PHP core RCE bugs, aimed at defenders verifying exposure and patch urgency.Shell983