[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-108227":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":13,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":15,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":9,"pushedAt":22,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},108227,"DirtyFalg-vr","DONGDERS\u002FDirtyFalg-vr","DONGDERS","DirtyFrag + W1c vr probe disarm (private fork)",null,"Java",72,7,1,0,6,20,49.71,"GNU General Public License v2.0",false,"master",[],"2026-11-20 05:02:27","2026-11-23 01:26:19","# DirtyFrag-vr (CVE-2026-43284)\n\n**A vivo\u002FMTK-hardened build of [mitschud\u002FDirtyFrag](https:\u002F\u002Fgithub.com\u002Fmitschud\u002FDirtyFrag), which is itself a hardened fork of [diabl0w\u002FDFRoot](https:\u002F\u002Fgithub.com\u002Fdiabl0w\u002FDFRoot).**\n\nDirtyFrag exploits **CVE-2026-43284 (DirtyFrag)**, a kernel page-cache write primitive, to load a\nkernel module on a **locked bootloader and a stock kernel** — no unlock, no custom kernel, no\nflashing. This fork takes the upstream 1.16 engine and grafts on the **vivo `vr.ko` disarm stack**\n(the anti-root module that otherwise kills KernelSU-family managers), BTF-based automatic offset\nresolution, and a crash-proof kernel-log follower.\n\n> [!IMPORTANT]\n> Root is **ephemeral**. The kernel module, `su` and any loaded modules are gone the moment the\n> device reboots. A reboot always returns the phone to a clean, unrooted state — which is also the\n> recovery path if a run goes wrong.\n\n## What this fork adds over upstream\n\nThis build is based on mitschud DirtyFrag **v1.16** (upstream DFRoot 4.2–4.5 engine). Everything\nbelow is original work on top of that base.\n\n### 1. vivo `vr.ko` disarm (W1c)\n\nvivo ships `vr.ko`, a vendor anti-root module that watches for root activity and tears down\nKernelSU-family managers. This fork disarms it instead of fighting it:\n\n- The kernel module walks the **`sys_exit` tracepoint** and clears the probe vivo registered\n  against it, so `vr.ko` stops observing process exits and loses its detection trigger.\n- The write target is `__tracepoint_sys_exit->funcs`, addressed as a **member offset of\n  `struct tracepoint`** — the offset differs per KMI, which is why it is resolved, not hardcoded.\n- **BTF auto-resolve**: `dfroot.ko` reads `\u002Fsys\u002Fkernel\u002Fbtf\u002Fvmlinux` itself and derives that\n  offset at run time, in chunked reads so large BTF blobs do not blow the allocation. You do not\n  need to know your KMI.\n- **Manual override**: if auto-resolve fails, the UI exposes a raw offset field and the onboarding\n  extractor below can compute it for you. `exp.c` accepts both (`auto` or an explicit decimal\u002Fhex\n  value) and logs which path it took.\n- **Abort chain**: if the tracepoint or the offset does not match, the run aborts cleanly and\n  reports `W1c FAILED - tracepoint\u002Foffset mismatch, vr intact` rather than proceeding into a\n  half-patched state.\n\n### 2. Offset extractor (app-side, `\u002Flibvrext.so`)\n\nA Rust `cdylib` bridged through `VrExtractor.java`. Point it at a **`boot.img`, `payload.bin` or\nan OTA ZIP** — a local path or an `http(s)` URL — and it:\n\n1. recovers the embedded **kallsyms** from the image,\n2. **disassembles `__traceiter_sys_exit`**,\n3. derives the `__tracepoint_sys_exit->funcs` member offset for your exact kernel\n   (e.g. `72` on `6.6.89-android15-8`).\n\nURL mode downloads **only the boot partition**, via ranged requests. `derive()` blocks and runs on\na background thread; progress is polled as `phase done total`. This is what makes the feature\nusable without a PC and without knowing your offset in advance.\n\n### 3. Crash-proof logging (`kmsglog` + `RunLog`)\n\nTwo independent log paths, both designed around the case where the device wedges mid-run:\n\n- **`kmsglog.c`** — a persistent `\u002Fdev\u002Fkmsg` follower spawned from the module init at\n  `UMH_WAIT_EXEC` time (root, permissive). It appends **message by message with a per-line\n  `fsync`**, so anything the kernel prints reaches disk within milliseconds and survives a watchdog\n  hard reset that would take the page cache and pstore with it. A `\u002Fdev\u002Fdfkmsg` tmpfs mutex keeps\n  it to one follower per boot; a file-size cap and a wall-clock lifetime bound its growth.\n- **`RunLog.java`** — every report line from **both** run chains (app button *and* boot autorun)\n  lands here, line-synchronous and fsynced, written through MediaStore to the public Downloads\n  folder. A panic mid-run cannot eat the lines that led up to it.\n\nThis matters because pstore is structurally absent on some of these devices — without it there is\nno record of the lead-up to a hang.\n\n### 4. UI work\n\n- **`HomeScrollView`** — the run log lives inside the home scroller and has its own; a plain outer\n  `ScrollView` would steal every vertical drag. A press landing in the log window is handed over\n  untouched for the whole gesture.\n- **`VersionPillSpan`** — the version digits in the header are a `ReplacementSpan`: a compact grey\n  pill normally, growing from its left edge into a lime **Update available** pill when a newer\n  release exists.\n- **Chinese run logs** for the main report lines, alongside the English originals.\n\n### 5. Build and release\n\n- **8 prebuilt GKI KMIs committed** under `app\u002Fsrc\u002Fmain\u002Fjni\u002Fko\u002F`, rebuilt for 1.16-vr with the vr\n  config slot, CI-verified (magic ×8): `android12-5.10`, `android13-5.10`, `android13-5.15`,\n  `android14-5.15`, `android14-6.1`, `android15-6.6`, `android16-6.12`, `android17-6.18`.\n- Because they are committed, a plain clone builds **without a DDK toolchain**. Rebuild them\n  whenever `lkm\u002Fdfroot.c` changes (see [Building](#building)).\n\n| | upstream mitschud v1.16 | this fork (1.16-vr) |\n|---|---|---|\n| `lkm\u002Fdfroot.c` | 7.6 KB | **19.0 KB** |\n| Prebuilt `.ko` | CI-only, gitignored | **8 KMIs committed** |\n| Kernel-log follower | — | `kmsglog` (per-line fsync) |\n| App-side extractor | — | `libvrext.so` (Rust) |\n| vivo `vr.ko` handling | — | **W1c disarm + BTF auto-resolve** |\n| Version | 1.16 | **1.16-vr (46)** |\n\n## Install\n\n1. Install the DirtyFrag-vr APK from [**Releases**](https:\u002F\u002Fgithub.com\u002FDONGDERS\u002FDirtyFalg-vr\u002Freleases\u002Flatest).\n2. Install an SU manager that **ships `libksud.so`**:\n   - [KernelSU](https:\u002F\u002Fgithub.com\u002Ftiann\u002FKernelSU\u002Freleases\u002Flatest)\n   - [KernelSU-Next](https:\u002F\u002Fgithub.com\u002FKernelSU-Next\u002FKernelSU-Next\u002Freleases\u002Flatest)\n   - [KowSU](https:\u002F\u002Fgithub.com\u002FKOWX712\u002FKernelSU\u002Freleases\u002Flatest)\n   - [BakaSU](https:\u002F\u002Fgithub.com\u002FBaka-SU\u002FBakaSU\u002Freleases\u002Flatest) (formerly ReSukiSU)\n   - Samsung: **required** — [diabl0w's KernelSU](https:\u002F\u002Fgithub.com\u002Fdiabl0w\u002FKernelSU\u002Freleases)\n3. Open DirtyFrag-vr, pick your manager in the **SU Manager** card, then press **Run exploit**.\n\n> [!WARNING]\n> Since 1.10 (upstream 3.2) DirtyFrag no longer bundles `ksud` — it is staged from the selected\n> manager's own `libksud.so`. A manager that does not ship that library cannot give you root. The\n> older advice to install a CI \u002F Actions build of the manager no longer applies.\n\nA fresh install of DirtyFrag-vr gets a new Android UID, so the grant in the manager has to be given\nagain after every reinstall.\n\n## Features\n\n- Choose your SU manager inside the app\n- **Autorun** (start on boot), gated behind Expert mode, with a failed-run interlock that disables\n  itself after a failed attempt so a bad run cannot boot-loop you\n- **Auto reboot** (soft reboot) — since 1.11 (upstream 4.1) this works with every KernelSU\n  derivative: `dfroot.ko` is unloaded after late-load and ksud's own `soft-reboot` is run\n- **KernelSU Modules** on\u002Foff — works without root, applied by the kernel module before ksud starts\n- RO Partition Protection\n- Advanced log, with one tap to save it to Downloads\n- **Odin** pill in the toolbar: its dot says whether this firmware will let the device into download mode, and\n  tapping it opens the three facts that decision is made from\n- When a newer release is published, the headline itself becomes a lime **Update** pill — one tap from the release\n- Shizuku not needed\n- **[This fork]** **Vr disarm (W1c)** switch with automatic BTF offset resolution and a manual\n  offset override\n- **[This fork]** **Boot-image offset extractor** — feed it a `boot.img` \u002F `payload.bin` \u002F OTA ZIP\n  (local or URL) and it derives the offset for you\n- **[This fork]** **Crash-proof kernel log** — per-line fsynced `\u002Fdev\u002Fkmsg` follower, survives a\n  watchdog reset\n- **[This fork]** Chinese run-log lines alongside English\n\n## FAQ\n\n**Q: Log says patching failed and that my device isn't vulnerable**\nA: Sorry, there is no fix. Either:\n  - your device's kernel is too new\n  - your device manufacturer backported the official mitigation\n  - [accidental mitigation](https:\u002F\u002Fgithub.com\u002FV4bel\u002Fdirtyfrag\u002Fissues\u002F23#issuecomment-4405314290)\n    (typically seen on kernel 6.1)\n\n**Q: Log says \"SUCCESS\" or \"ksud exited with error\", but I don't have root**\nA: Turn off **Auto reboot** on the Autorun card if it is enabled — a soft reboot that the manager\ncannot complete leaves the loaded module unloaded again. Otherwise see\n[upstream discussion 69](https:\u002F\u002Fgithub.com\u002Fdiabl0w\u002FDFRoot\u002Fdiscussions\u002F69).\n\n**Q: I installed a module and now I can't launch root without crashing**\nA: Set the **KernelSU Modules** card to Disabled and reroot. The switch works without root, which is\nthe point — it is the escape hatch when a module is the thing that is crashing the run.\n\n**Q: Module + Autorun and now I am bootlooping**\nA: Android usually detects the bootloop and offers Safe Mode; otherwise hold **Volume Down** during\nboot. From Safe Mode turn Autorun off and set KernelSU Modules to Disabled, or just uninstall\nDirtyFrag until you stabilise. If you cannot get far enough into the system, `adb uninstall df.root`\nfrom any PC works on user builds without root.\n\n**Q: The progress bar sits at 0 percent**\nA: That is the app's log-marker mapping, not the exploit. The run window is 70 seconds — do not\nre-run a \"slow\" run, the daemon may still be working.\n\n**Q: How do I remove root cleanly?**\nA: Before unrooting, use file manager with root and delete \u002Fdata\u002Fadb\u002F (KernelSU, KSUD residue)\n\n**Q: [This fork] Vr auto-resolve failed — what do I do?**\nA: Two paths. Either turn the automatic resolve off and paste the offset from the onboard extractor\n(**Vr disarm → extract**, point it at your `boot.img` \u002F `payload.bin` \u002F OTA ZIP), or leave it off\nentirely and run again — the `vr` stage is then skipped and root proceeds as it does upstream,\nsubject to `vr.ko` interfering as usual. The advanced log states which path was taken\n(`auto-resolve` or `funcs offset provided`) and aborts with\n`W1c FAILED - tracepoint\u002Foffset mismatch` if the write did not land.\n\n**Q: [This fork] Where is the kernel log if the device hard-resets?**\nA: In the public **Downloads** folder. `kmsglog` writes message by message with a per-line\n`fsync`, so the last line on disk marks the entry point of the hang. This is the only witness on\ndevices where pstore is absent.\n\n## Building\n\n```sh\nJAVA_HOME=\"\u003CAndroid Studio jbr>\" .\u002Fgradlew assembleRelease\n```\n\nThe APK is written to `app\u002Fbuild\u002Foutputs\u002Fapk\u002Frelease\u002Fdirtyfrag.apk`.\nRelease builds are signed with `app\u002Fkeystore.jks`, which is gitignored (the signing config expects\nalias `dirtyfrag` and `dirtyfrag` for both passwords). Generate your own before building:\n\n```sh\nkeytool -genkeypair -v -keystore app\u002Fkeystore.jks -alias dirtyfrag \\\n  -keyalg RSA -keysize 2048 -validity 10000 \\\n  -storepass dirtyfrag -keypass dirtyfrag\n```\n\nThe eight prebuilt kernel modules are committed under `app\u002Fsrc\u002Fmain\u002Fjni\u002Fko\u002F`. Upstream gitignores\nthem and builds them per-KMI in CI; this fork commits them so a plain clone builds without a DDK\ntoolchain. They are built by this repo's `Build` workflow (the `LKMs \u002F \u003Ckmi>` jobs) from the\ncurrent `lkm\u002Fdfroot.c`, so they must be rebuilt whenever that file changes: run the workflow,\ndownload the `df-lkm-\u003Ckmi>` artifacts and drop them in this directory. To build them yourself\ninstead, use upstream's `make` \u002F podman DDK flow.\n\nThe app-side extractor is a separate Rust crate under `app\u002Fsrc\u002Fmain\u002Fjni\u002Fvrext\u002F` (built as\n`libvrext.so` via the NDK toolchain in `CMakeLists.txt`).\n\n## How it works\n\nThe Android kernel decrypts AES-CBC ESP packets directly into the page cache of files open for\n`splice()`. By crafting `IV = AES_ECB_DEC(key, current_content) XOR desired_content`, any\n16-byte-aligned block in a mapped shared library can be overwritten without write permission and\nwithout copy-on-write.\n\nThe exploit uses this primitive to patch shellcode into `libc++.so` in the kernel's page cache. The\nnext privileged call to the hooked function runs the shellcode, which loads the kernel module via\n`insmod`.\n\n### Exploit chain\n\n1. **IpSec transform** — the app allocates a `UdpEncapsulationSocket` plus an SPI and builds an\n   AES-CBC\u002FHMAC-SHA256 ESP transform through `IpSecManager`.\n2. **splicehelper -> crash_dump64** — splicehelper is spliced into `crash_dump64` using the CBC\n   primitive. `crash_dump64` runs in the `crash_dump` SELinux domain, which can open `vendor_file`\n   labelled files that `untrusted_app` cannot read — the bridge we need.\n3. **dfroot.ko -> vendor_file** — the kernel module is written through that bridge into a\n   `vendor_file`-labelled file.\n4. **libc++ hook** (fires in init, uid=0, tid=1) — shellcode patched at\n   `std::ostream::sentry::sentry()`. It checks uid and tid, creates `\u002Fdev\u002Fdf` as a one-shot mutex so\n   it cannot re-enter, then execs `insmod` in the `vendor_modprobe` domain.\n5. **dfroot.ko init** — sets SELinux permissive, bypasses DEFEX via kprobes where present, then uses\n   `call_usermodehelper` to run the bootstrap.\n6. **bootstrap** — reads the app's device-protected settings, adopts the zygote environment, sets\n   partitions read-only, optionally disables all modules, and finally launches the SU daemon from\n   your installed SU manager.\n\n### The vr step (this fork)\n\nBefore root is handed over, `dfroot.ko` optionally runs an extra stage: it locates\n`__tracepoint_sys_exit`, resolves the `funcs` member offset (from BTF at run time, or from the value\n`exp.c` passed in), and clears the probe slot that `vr.ko` installed.\nWith the probe gone, `vr.ko` no longer observes process exits and cannot trigger its teardown path\nagainst the manager. If the tracepoint or offset does not match, the stage aborts and reports it —\nthe root path is not left half-patched.\n\n## Credits\n\n- Upstream project and exploit chain: https:\u002F\u002Fgithub.com\u002Fdiabl0w\u002FDFRoot\n- DirtyFrag engine base (v1.16, DFRoot 4.2–4.5): https:\u002F\u002Fgithub.com\u002Fmitschud\u002FDirtyFrag\n- Original PoC and various code: https:\u002F\u002Fgithub.com\u002Flsposed\u002Flspromise\n- SELinux permissive kernel modules and various code: https:\u002F\u002Fgithub.com\u002Fpolygraphene\u002FDFReroot\n- Unprivileged XFRM socket method: https:\u002F\u002Fgithub.com\u002Fcombeng6th\u002FDirtyInit\n- vr offset extractor engine: this project's Ghostlock-vr toolchain\n\n## License\n\n本项目使用 [GNU General Public License v2.0](LICENSE)，继承自上游\n[diabl0w\u002FDFRoot](https:\u002F\u002Fgithub.com\u002Fdiabl0w\u002FDFRoot)（GPL-2.0）。\nThis project is licensed under the [GNU General Public License v2.0](LICENSE),\ninherited from [diabl0w\u002FDFRoot](https:\u002F\u002Fgithub.com\u002Fdiabl0w\u002FDFRoot).","DirtyFrag-vr 是一个针对 vivo\u002FMTK 设备的内核级临时提权工具，利用 CVE-2026-43284（DirtyFrag）漏洞，在不解锁 Bootloader、不刷入自定义内核的前提下实现瞬时 root。其核心功能包括：动态禁用 vivo 厂商反 root 模块 vr.ko（通过 tracepoint 函数链清理）、基于 BTF 的运行时内核结构体偏移自动解析、支持 OTA\u002Fboot.img 等镜像的离线偏移提取，以及崩溃安全的日志跟踪与失败回退机制。适用于需临时调试、取证或兼容性验证的 Android 系统安全研究场景，重启后自动恢复无 root 状态。",2,"2026-11-24 04:33:54","CREATED_QUERY"]