Exploit database

GH-14fb583d3d1bd2da10251bb1a37b93d6

gitchw/ghostlock-cve-2026-43499

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-43499

165 sources

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

Repository files678
gitchw/ghostlock-cve-2026-43499Revision 96acd93156f6
Next files →

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

analysis/check_jumptable.py

Python · 3,454 bytes
#!/usr/bin/env python3
"""Read jump table at 0xc0570bc0 and trace the full path."""
from capstone import Cs, CS_ARCH_ARM, CS_MODE_ARM
import struct

KERNEL = r"F:\phone\ow251\全量包\kernel_raw.bin"
BASE = 0xC0008000

with open(KERNEL, "rb") as f:
    data = f.read()

md = Cs(CS_ARCH_ARM, CS_MODE_ARM)

# Read jump table at 0xc0570bd8 (PC after add r0,pc,#0)
# ldr pc, [r0, r1, lsl #2] where r0 = 0xc0570bd8
print("=== Jump table at 0xc0570bd8 ===")
for i in range(5):
    addr = 0xc0570bd8 + i*4
    off = addr - BASE
    val = struct.unpack_from("<I", data, off)[0]
    print(f"  [{i}] 0x{addr:08x}: 0x{val:08x}")

# Case 2 jumps to 0xc0570be0 value
case2 = struct.unpack_from("<I", data, 0xc0570be0 - BASE)[0]
print(f"\nCase 2 target: 0x{case2:08x}")

# Disassemble case 2 target
print(f"\n=== Case 2 target @ 0x{case2:08x} ===")
off = case2 - BASE
for insn in md.disasm(data[off:off+0x80], case2):
    print(f"  0x{insn.address:08x}: {insn.mnemonic:10s} {insn.op_str}")
    if insn.mnemonic in ('bx', 'pop') and 'pc' in insn.op_str:
        break

# Let me also look at what 0xc0570bc0 actually is by checking nearby symbols
# Parse kallsyms properly
print("\n=== Looking up 0xc0570bc0 in kallsyms ===")
num_syms = 119934
offsets_off = 0x14abe44
rel_base_off = 0x152103c
names_off = 0x1521044
token_table_off = 0x16b61bd

rel_base = struct.unpack_from("<I", data, rel_base_off)[0]

# Read token table
token_table = []
pos = token_table_off
while pos < len(data) and len(token_table) < 256:
    end = data.index(b'\x00', pos)
    token_table.append(data[pos:end])
    pos = end + 1

# Find symbol at or near 0xc0570bc0
target = 0xc0570bc0
best_addr = 0
best_name = ""
name_pos = names_off
for i in range(num_syms):
    length = data[name_pos]
    name_pos += 1
    name_bytes = data[name_pos:name_pos+length]
    name_pos += length
    
    # Decompress
    name = b""
    j = 0
    while j < len(name_bytes):
        b = name_bytes[j]
        if b == 0 and j+1 < len(name_bytes):
            idx = name_bytes[j+1]
            if idx < len(token_table):
                name += token_table[idx]
            j += 2
        else:
            name += bytes([b])
            j += 1
    
    off = struct.unpack_from("<i", data, offsets_off + i*4)[0]
    addr = rel_base + off
    
    if addr <= target and addr > best_addr:
        best_addr = addr
        best_name = name.decode('ascii', errors='replace')
    if addr > target + 0x1000:
        break

print(f"  Nearest symbol: 0x{best_addr:08x} {best_name}")
print(f"  Offset: +0x{target - best_addr:x}")

# Also look up wake_up_process
target = 0xc0157590
best_addr = 0
best_name = ""
name_pos = names_off
for i in range(num_syms):
    length = data[name_pos]
    name_pos += 1
    name_bytes = data[name_pos:name_pos+length]
    name_pos += length
    name = b""
    j = 0
    while j < len(name_bytes):
        b = name_bytes[j]
        if b == 0 and j+1 < len(name_bytes):
            idx = name_bytes[j+1]
            if idx < len(token_table):
                name += token_table[idx]
            j += 2
        else:
            name += bytes([b])
            j += 1
    off = struct.unpack_from("<i", data, offsets_off + i*4)[0]
    addr = rel_base + off
    if addr <= target and addr > best_addr:
        best_addr = addr
        best_name = name.decode('ascii', errors='replace')
    if addr > target + 0x1000:
        break
print(f"  0xc0157590 nearest: 0x{best_addr:08x} {best_name}")