Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

피드문의개인정보© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2025-21479 — Temporary root exploit for vivo X Fold+ (CVE-2025-21479): GPU physical memory read/write, __do_sys_capset shellcode patch, seccomp/SELinux bypass and KernelSU activation. | Kitploit
도구/GitHubGitHub/catxiaoshi/cve-2025-21479
Android SecurityPrivilege EscalationMemory ForensicsExploitationReverse EngineeringShellcodeMobile SecurityPayload DevelopmentBinary Exploitation
GitHubcatxiaoshi/cve-2025-21479

CVE-2025-21479

Temporary root exploit for vivo X Fold+ (CVE-2025-21479): GPU physical memory read/write, __do_sys_capset shellcode patch, seccomp/SELinux bypass and KernelSU activation.

2026년 11월 15일아직 검토되지 않음
공유
저장소 보기
요청한 언어로 콘텐츠를 사용할 수 없습니다. 영어 버전을 표시합니다.

Temporary root on vivo X Fold+ based on CVE-2025-21479

In the previous article, I achieved a temporary root shell using the cred method (see my previous post https://www.coolapk.com/feed/73490425?s=NjQ3OWQwNDMxOWJmMzk4ZzZhZjk1ZGNhega1670). However, due to seccomp restrictions, ksu could not be activated. Since I had no suitable approach, activating ksu was put on hold for the time being. Later, @曉曉恒 published a method for the same CPU and same kernel scheme, and that method can clear seccomp.

(Link: https://www.coolapk.com/feed/73486895?s=YjRmZWY2ZmExOWJmMzk4ZzZhYTU1MmJlega1651)

It also references @TNTHe's method.

(Link: https://blog.kinser.top/archives/1787279031701)

However, both of these schemes require patching the global __do_sys_capset

(Community version patch method concept diagram)


patch __do_sys_capset(全局生效)

    ↓

zygote 孵化应用时 specialize → 调用 capset() 降权

    ↓

★ 中招:执行 shellcode → commit_creds(prepare_kernel_cred(0))

    ↓

zygote 被提权成 root + seccomp 被清 + cred 被换成 init_cred 拷贝

(Flowchart of patch causing zygote exceptions)

In other words, this method, as long as it patches the global syscall, has an unavoidable timing race + hardcoded offset risk. zygote will inevitably be caught in the crossfire. And over time it may cause a kernel panic, but compared with the cred method, it can clear seccomp; for this reason, I added a safer recovery mechanism based on the patch method.


1. The Cred Method

1.1 What the Cred Method Can Do

GPU physical write task_struct->cred, modifying fields such as uid/gid/suid to escalate privileges. This path has always been successful.

1.2 The Fatal Flaw: Cache Consistency When Clearing seccomp

To clear seccomp, you must write the mode/filter fields of task_struct (0x848/0x850).

| Data | Access Frequency | Description |

| --- | --- | --- |

| cred | cold data | read only during permission checks |

| task_struct | extremely hot | accessed on every system call/scheduling/signal |

current->flags is being read and written by the CPU on every system call, and this page has a dirty line resident in L1/L2. The GPU is a non-coherent bus master; after it writes into DRAM, the CPU's next normal write-back swallows the entire line (64 bytes).

mode@0x848 and filter@0x850 happen to be in the same cache line, so they are overwritten together — all 8 retries result in 0x100000002.

1.3 A Worse Side Effect: SIGSYS

GPU writes occasionally take partial effect (the filter lands, but the mode does not), creating a self-contradictory state:


mode   = 2 (FILTER)   // 内核仍要走过滤器

filter = 坏值/NULL    // 指针已被破坏

The next system call enters __seccomp_filter() and executes the broken BPF → returns KILL → "Bad system call"


II. Principles of the Improved Patch Method

Friendly reminder: some new content, such as save, exists in my iterative version and may differ from the community version

2.1 Execution Flow

| Step | Action | Description |

| --- | --- | --- |

| 1 | GPU initialization | Gain physical address read/write capability |

| 2 | Disable SELinux | Physical write to selinux_state |

| 3 | kallsyms resolution | Read the 43MB kernel image and resolve symbols |

| 4 | Locate __do_sys_capset | VA → PA |

| 5 | Save the original code | Authoritative GPU read |

| 6 | Write gated shellcode | CPU window write + cache flush |

| 7 | Current process capset(NULL,NULL) | Trigger |

| 8 | Shellcode executes in kernel mode | prepare_kernel_cred(0) → commit_creds() |

| 9 | Restore the original code | CPU write + authoritative GPU verification |

| 10 | Tear down the fast_rw window | GPU write + verification |

| 11 | exec shell | — |

2.2 Why choose __do_sys_capset?

  1. Because this is the system call entry point, it can be precisely triggered from user space, and it is necessarily executed on every call

  2. The physical address is predictable: 0xa8000000 + 0x16c7bc = 0xa816c7bc (the kernel physical base address is fixed; KASLR only changes the virtual base address, and most in the community use this, with plenty of examples)

2.3 Address-fetching shortcut


uint64_t v = kernel_pread_u64(cheese, 0xa816c7bc);

if ((uint32_t)v == 0xd503233f)   /* paciasp = __do_sys_capset 首指令 */

    /* 不需要 kallsyms 就能定位! */

Only when prepare_kernel_cred / commit_creds are called from within the shellcode is the KASLR virtual base address required.


III. Gating Mechanism (Resolving zygote Corruption)

3.1 The Fatal Flaw of the Community Edition


zygote 在 specializeAppProcess 里

【每孵化一个 APP 都调 capset(&hdr,&data) 降权】

     ↓ 社区 shellcode 无条件执行

prepare_kernel_cred(0) → commit_creds()

     ↓ 每次命中

zygote 的 cred 被换掉 + cred_jar 泄漏一个 → 越用越崩 → 无法新开应用

"Anomalies increasing over time" is precisely the cumulative effect of the continuous cred_jar leak and the corrupted reference counting.

3.2 Improvements in This Version

To address this, this version adds a gating mechanism (solving the zygote breakage): only capset(NULL,NULL) triggers privilege escalation; when zygote passes a non-NULL pointer, it takes the skip path. The community edition escalates unconditionally, causing zygote to be mistakenly escalated every time it spawns an APP plus leak one cred → the more it is used, the more it crashes.

| Comparison Item | Community Edition | This Version |

| --- | --- | --- |

| zygote calls capset(&hdr,&data) | Unconditional escalation | Takes skip, returns 0 |

| cred allocation | Leaks one per spawn | No allocation, zero leak |

| App uid/gid | Affected | Unaffected (set by setuid/setgid) |

When overwriting contiguously in place, non-target paths must replay all N overwritten instructions before jumping back, while the shellcode itself has only N slots, which cannot hold "replay N instructions + gating + payload" — mathematically impossible, so an in-kernel trampoline is required.

Therefore the skip path returns 0. This is consistent with the community edition's behavior toward zygote (both are "capset returns 0"), but removes the privilege escalation and cred allocation; the APP's uid/gid is set via setuid / setgid (not capset), so app permissions are unaffected.


IV. Recovery Module (Core Innovation)

This is the most tortuous part of the entire process, only closed after many failures. Because validation was added and the process fixed, the privilege escalation time was also extended to 3~4 minutes.

4.0 Failure Overview

| No. | Failure | Symptom | Root Cause | Fix |

| --- | --- | --- | --- | --- |

| 1 | False success | Validation all green, DRAM untouched | CPU reads its own dirty cache line | Switched to authoritative GPU read |

| 2 | Wrong cache level | GPU cannot read new value | dc cvau only reaches PoU | Changed to dc cvac (reaches PoC) |

| 3 | No external validation | Cannot prove it has been written to disk | Missing GPU perspective | Added patch_verify_bytes_gpu() |

| 4 | fork breaks everything | restore inevitably fails | COW + GPU channel death | Privilege escalation no longer forks |

4.1 Failure One: False Success (CPU Reading Deceives Itself)


patch_verify_bytes() → fast_pread_u64()   // CPU 通过窗口读

As soon as the write finishes, it is read back with the CPU, and what is read is the cache line that was just dirtied by the write itself, which always equals the expected value. The logs stay green the whole way, and DRAM is never touched.

Hard evidence: on the second run, save reads back the shellcode rather than the original code.

4.2 Failure two: cache flushed at the wrong level


"dc cvau, %0"    // clean by VA to PoU(本核 L2/统一点)

GPU is an external bus master and accesses the PoC (DRAM). cvau cannot clean to DRAM.

Fix: dc cvau → dc cvac (clean to PoC).

4.3 Failure three: missing GPU authoritative verification

도구 다운로드

관련 도구

  • Mobile-Security-Framework-MobSF

    Android, iOS, Windows용 자동화된 모바일 애플리케이션 보안 테스트 프레임워크입니다. 정적 및 동적 분석, 멀웨어 탐지, CI/CD 통합을 통한 API 보안 테스트를 수행합니다.

  • jadx

    Android Dex 및 APK 파일을 읽을 수 있는 Java 소스 코드로 디컴파일하는 명령줄 및 GUI 도구입니다. 리소스 디코딩, 난독 해제 및 Smali 디버깅 기능을 제공합니다.

  • Apktool

    Android apk 파일을 리버스 엔지니어링하기 위한 도구입니다.

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    # GhostLock 원탭 실행 앱 (CVE-2026-43499)

    750
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    SMS를 가로채고, 메시지를 주입하며, 모바일 기기를 추적하기 위해 악성 GSM 셀을 배포하는 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

    삼성 Galaxy S25 Ultra(SM-S938B)용 Android 루트 도구로, DirtyFrag CVE-2026-43284와 CVE-2026-43499를 연쇄하여 KernelSU를 통해 부팅 시 자동으로 루트 권한을 획득합니다.

    414
  • 6

    ARTEX

    baarai/artex

    LLM 멀티 에이전트 자율 침투 테스트 플랫폼으로, 플래너/워커 에이전트, 자산 및 탐색 그래프, MITM 트래픽 기록, 취약점 재테스트 기능을 제공합니다.

    409

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →