Exploit database

GH-14fb583d3d1bd2da10251bb1a37b93d6

gitchw/ghostlock-cve-2026-43499

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-43499

168 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_code_ptr.py

Python · 2,681 bytes
import sys
sys.path.insert(0, 'pylibs')
import struct
from capstone import Cs, CS_ARCH_ARM, CS_MODE_ARM

with open('kernel_raw.bin', 'rb') as f:
    data = f.read()
BASE = 0xC0008000
md = Cs(CS_ARCH_ARM, CS_MODE_ARM)

init_task = 0xc1b11640
it_off = init_task - BASE

# Check fields around +0x4e0
print("=== init_task fields around +0x4e0 ===")
for off in range(0x4d0, 0x500, 4):
    val = struct.unpack('<I', data[it_off+off:it_off+off+4])[0]
    print(f"  +0x{off:03x}: 0x{val:08x}")

# The code pointer at +0x4e4 = 0xc01397f0
# Let's see what function this is
print("\n=== Function at 0xc01397f0 ===")
code = data[0xc01397f0-BASE:0xc01397f0-BASE+0x60]
for ins in md.disasm(code, 0xc01397f0):
    print(f'  0x{ins.address:08x}: {ins.mnemonic}\t{ins.op_str}')
    if ins.mnemonic.startswith('pop') and 'pc' in ins.op_str:
        break

# Search for references to init_task+0x4e4 in code
# Look for instructions that load/store from a known offset
# This might be a vDSO or signal-related pointer
print("\n=== Searching for references to offset 0x4e4 in code ===")
# Look for "ldr rX, [rY, #0x4e4]" patterns
count = 0
for i in range(0, len(data)-4, 4):
    insn = struct.unpack('<I', data[i:i+4])[0]
    # LDR/STR with immediate offset 0x4e4
    # ARM encoding: cond 01 0 1 1 0 0 1 0 1 1 1 1 0 0 0 ...
    # U=1 (add), P=1, B=0, W=0, L=1 (LDR)
    # offset = 0x4e4 = 1252
    # imm12 = 0x4e4
    # Mask: 0x0f700000 for LDR immediate
    if (insn & 0x0f700000) == 0x05100000 or (insn & 0x0f700000) == 0x05000000:  # LDR or STR
        imm12 = insn & 0xfff
        if imm12 == 0x4e4:
            addr = BASE + i
            # Verify with capstone
            for ins in md.disasm(data[i:i+4], addr):
                if '0x4e4' in ins.op_str:
                    print(f'  0x{addr:08x}: {ins.mnemonic}\t{ins.op_str}')
                    count += 1
                    if count > 20:
                        break
    if count > 20:
        break

# Also check what +0x4e4 might be by looking at nearby known offsets
# comm is at 0x628, mm at 0x488
# Let's check the thread_struct (arch-specific)
# On ARM, thread_struct starts around offset 0x240 or so
print("\n=== Checking if +0x4e4 is in thread_struct ===")
# Look for the vDSO or signal-related pointers
# vdso_image, vdso_sigreturn, etc.
for s in [b'vdso', b'sigreturn', b'restart']:
    idx = 0
    while True:
        idx = data.find(s, idx)
        if idx < 0:
            break
        if 0xc0000000 <= BASE+idx <= 0xc2000000:
            ctx = data[max(0,idx-10):idx+30]
            if all(32 <= b < 127 or b == 0 for b in ctx):
                print(f"  Found '{s.decode()}' at 0x{BASE+idx:08x}: {ctx}")
        idx += 1