Skip to content
KitploitKITPLOIT
HerramientasExploitsBlog
Log in
Enviar
HerramientasExploitsBlog
Enviar

¡Herramientas de Hacking, PenTest y Ciberseguridad para tu Arsenal de Seguridad!

Kitploit es un directorio de herramientas de hacking, ciberseguridad y pentesting. Descubre las últimas actualizaciones de proyectos para encontrar vulnerabilidades, analizar sistemas, automatizar pruebas y fortalecer tu seguridad.

FeedsContactoPrivacidad© 2026 Kitploit

Directorio de Herramientas

Categorías

Ver todas las categorías
Loading categories
cve-2023-6931-hitv205n — CVE-2023-6931 temporary-root port for Hisense HITV205N (TOUCH Lite), kernel 4.19.157-perf | Kitploit
Herramientas/GitHubGitHub/koast18/cve-2023-6931-hitv205n
Android SecurityPrivilege EscalationExploitationReverse EngineeringMobile SecurityPayload DevelopmentBinary Exploitation
GitHubkoast18/cve-2023-6931-hitv205n

cve-2023-6931-hitv205n

CVE-2023-6931 temporary-root port for Hisense HITV205N (TOUCH Lite), kernel 4.19.157-perf

Ver Repositorio
18 nov 2026Aún no revisado
Compartir
Contenido no disponible en el idioma solicitado. Mostrando versión en inglés.

CVE-2023-6931 — Hisense HITV205N (Hisense TOUCH Lite) temporary root port

A CVE-2023-6931 privilege escalation port for the Hisense HITV205N / TOUCH Lite (Qualcomm SM4250 / SD460, kernel 4.19.157-perf), intended for security research on your own device.

Upstream: Yutori-Natsu/cve-2023-6931-pipa (Xiaomi Pad 6) Principle: the temporary root approach described in fynks/awesome-temporary-root


What is this

CVE-2023-6931 is an out-of-bounds write primitive caused by incomplete validation of group read_size in perf_event_open(). The exploit chain (following pipa's approach):

1) perf group read_size 溢出              -> 越界 u64 自增原语
2) 自增 victim netlink_sock->sk_destruct  -> netlink_sock_destruct_work
3) close(victim) -> sk_free -> __sk_destruct -> container_of(work, netlink_sock, 0x440)
   -> fake sock -> fake->sk_destruct = pivot (mov sp,x19)
4) 栈迁移到 fake 内的 skb 载荷
5) entry trampoline -> eret EL1h -> commit_creds(&init_cred)
6) eret EL0 -> post_root

Effect: uid=0 + SELinux permissive within the current boot, invalidated on reboot. No partitions are modified, the bootloader remains locked, and the boot image remains unchanged.


Target device

ItemValue
ModelHisense HITV205N (TOUCH Lite)
SoCQualcomm SM4250 / SD460 (bengal / kamorta)
KernelLinux version 4.19.157-perf (clang 10.0.7, SMP PREEMPT, 2023-07-12)
SystemAndroid 11 / RKQ1.210107.001 / L1834.6.01.02 / patch 2021-07-05
VA_BITS39, 4K pages, text_offset 0x80000
KASLROn (RANDOMIZE_BASE=y)
KPTIOff (UNMAP_KERNEL_AT_EL0 not set)
SW PANOn (ARM64_SW_TTBR0_PAN=y)
perf_event_paranoid-1
perf_event_mlock_kb516

Why this kernel is exploitable

CheckResult
CVE-2023-6931 fixNot backported (4.19.157 ≪ fixed version 4.19.301)
CONFIG_USER_NSNot enabled → most other privilege-escalation chains are unavailable, but this chain does not depend on it
perf_event_paranoid=-1Unprivileged processes can open perf events
perf_event_validate_size symbolDoes not exist → the unfixed legacy code path is used

Repository structure

.
├── exploit.c                  上游 exploit,偏移块改为 #include "device_config.h"
├── device_config.h            设备选择(-DDEVICE=<name>,默认 hitv205n)
├── devices/
│   └── hitv205n.h             本机内核符号/gadget/结构体偏移
├── text_syms.h                .text 符号表(50,499 项,自动生成)
├── ro_syms.h                  .rodata 符号表(31,402 项,自动生成)
├── tools/gen_syms.py          从 vmlinux ELF 重新生成上面两个头文件
├── build.sh                   构建脚本(交叉 gcc 或 Android NDK)
└── .github/workflows/build.yml  CI:推 tag 自动构建并发布

Build

GitHub Actions (recommended)

Pushing a v* tag automatically builds and attaches exploit-hitv205n + .sha256 to the Release.

git tag v0.1.0 && git push origin v0.1.0

You can also manually workflow_dispatch on the Actions page, specifying device.

Local

sudo apt install gcc-aarch64-linux-gnu        # 或设置 ANDROID_NDK_HOME
./build.sh exploit-hitv205n

Usage

adb push exploit-hitv205n /data/local/tmp/
adb shell chmod 755 /data/local/tmp/exploit-hitv205n

# 必须从 adb shell(shell 域)启动 —— perf_event 与 netlink 在 app 域不可达
adb shell 'cd /data/local/tmp && setsid nohup ./exploit-hitv205n \
  --selinux-off --layout-interleave --tsec-sid 1 --alarm-us 5000000 \
  > /data/local/tmp/run.out 2>&1 < /dev/null &'

# 成功后 root 命令通道是 FIFO
adb shell 'echo "id" > /data/local/tmp/root_in'
adb shell 'cat /data/local/tmp/root_out'

Only one attempt per boot — 8446 sibling events will exhaust perf_event_mlock_kb = 516. To retry, you must first reboot the device (or kill -9 the old instance and confirm the perf event has been released).


Where the offsets come from

The kernel symbol table is not copied from anywhere; it is taken live from the boot_a.bin backed up via EDL from this device:

# 1. 从 boot.img 取出 kernel 并解压(gzip)
# 2. vmlinux-to-elf 重建符号表(本机 107,395 个符号)
vmlinux-to-elf kernel.raw vmlinux.elf
# 3. 生成 exploit 用的符号表
python tools/gen_syms.py vmlinux.elf .

Verification Record

ItemLocal machinepipa targetConclusion
_text0xffffff80080800000xffffff8008080000Match
netlink_sock_destruct → _work spacing0x28e80x28e8Match
struct sock.sk_destruct704704Match (confirmed by __sk_destruct disassembly)
struct sock.sk_rcu720720Match (sub x19,x0,#0x2d0)
nlk->groups824 (0x338)824Match (netlink_sock_destruct disassembly)
mov sp,x19 pivot0x4734 → ret_to_user0x840e0 → 0x843a8Same structure, different offsets
perf_event_mlock_kb516516Match

⚠️ Status: Requires calibration on real hardware

Completed:

  • Extracted all required symbols from the local kernel (items marked [A] in devices/hitv205n.h)
  • Gadget location (pivot / ret_to_user / TRAMP2 / TRAMP2C / bare ret)
  • Cross-verified key offsets of struct sock / netlink_sock via disassembly
  • Symbol table generation + CI build

Not yet verified on real hardware (items marked [B] / [D]):

  • SK_WMEM_ALLOC_OFF, SK_REUSEPORT_CB_OFF, NLK_PORTID_OFF — configuration-related, require --probe to re-check
  • The specific entry point of the entry trampoline (KPTI is disabled on the local machine, so the TRAMP_NOKPTI branch is taken)
  • perf group layout constants (empirical values such as P_OFF_DEFAULT=44)

Do not run the prebuilt binary directly — incorrect offsets will cause an oops. For the first run, it is recommended to use --probe.



Parameters for diagnostics / calibration

exploit.c retains all upstream debug switches; porting calibration mainly relies on these:

ParameterPurpose
--probe-onlyRun only up to the probing stage and exit without triggering — use this first when testing on the device
--dryDry run, to verify whether address resolution and the KASLR slide are correct
--kbase-override / --kshiftManually specify the kernel base address / slide, used to rule out problems in the leak stage
--diag / --diag-geo / --diag-matchPrint heap layout and matching status
--skbprobe / --posprobeCalibrate the offset of the skb payload within the slot (P_OFF_DEFAULT)
--calib-zero / --no-calibCalibration switches
--test-trampTest the entry trampoline separately (corresponds to OFF_TRAMP_RESTORE/OFF_TRAMP_NOKPTI on the local machine)
--test-ret / --test-cred-ret / --test-exitTest each hop of the ROP chain in stages
--sib-countAdjust the number of sibling events (limited by perf_event_mlock_kb=516)

Recommended order: --dry → --probe-only → --test-tramp → full --selinux-off.

Security Notes

  • This repository is intended solely for security research on your own hardware.
  • A failed exploit may trigger a kernel oops (on the local machine CONFIG_PANIC_ON_OOPS is not enabled, so the kernel usually survives).
  • After success, SELinux becomes permissive until reboot, during which device security is reduced.
  • Please make a full disk backup before proceeding (the local machine already has a 12.36 GiB EDL backup).
  • This repository does not provide any means to bypass the bootloader lock.

License

exploit.c is derived from Yutori-Natsu/cve-2023-6931-pipa; this port is likewise intended for research use only.

Descargar herramienta

Herramientas relacionadas

  • Mobile-Security-Framework-MobSF

    Marco de pruebas de seguridad automatizado para aplicaciones móviles en Android, iOS y Windows. Realiza análisis estático y dinámico, detección de malware y pruebas de seguridad de API con integración CI/CD.

  • jadx

    Herramienta de línea de comandos y GUI para descompilar archivos Android Dex y APK en código fuente Java legible, con capacidades de decodificación de recursos, desofuscación y depuración de Smali.

  • Apktool

    Una herramienta para la ingeniería inversa de archivos apk de Android.

Más Populares

Ver todos →

Descubre las herramientas más usadas por nuestra comunidad.

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    # Aplicación de Ejecución con un Solo Toque GhostLock (CVE-2026-43499)

    745
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    Plataforma IMSI Catcher que despliega una celda GSM fraudulenta para interceptar SMS, inyectar mensajes y rastrear dispositivos móviles

    732
  • 3

    Callisto

    jetp1ane/callisto

    Herramienta automatizada de análisis de vulnerabilidades binarias que descompila ejecutables mediante Ghidra, escanea código pseudo-C con Semgrep y valida los hallazgos usando GPT-3.5-Turbo para reducir falsos positivos.

    610
  • 4

    opencti

    opencti-platform/opencti

    Plataforma abierta de inteligencia de amenazas cibernéticas

    546
  • 5

    ARTEX

    baarai/artex

    Plataforma de pruebas de penetración autónoma multiagente basada en LLM con agentes planificadores/trabajadores, grafos de activos y de exploración, registro de tráfico MITM y reevaluación de vulnerabilidades.

    414
  • 6

    DFRoot

    a2333c/dfroot

    Herramienta de root para Android para Samsung Galaxy S25 Ultra (SM-S938B) que encadena DirtyFrag CVE-2026-43284 y CVE-2026-43499 para obtener root automáticamente al arrancar mediante KernelSU.

    413

Explora todas las herramientas

Explora nuestra colección de herramientas

Ver todas las herramientas →