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/parse_kallsyms_final.py

Python · 3,125 bytes
#!/usr/bin/env python3
"""Parse kallsyms correctly - all bytes are token indices."""
import struct

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

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

num_syms = 119934
offsets_off = 0x14abe44
rel_base_off = 0x152103c
names_off = 0x1521044
token_table_off = 0x16b61bc
token_index_off = 0x16b654c

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

def get_token(idx):
    offset = struct.unpack_from("<H", data, token_index_off + idx*2)[0]
    start = offset
    end = token_block.index(b'\x00', start)
    return token_block[start:end]

# Decode ALL symbols
symbols = {}
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

    result = b""
    for c in name_bytes:
        result += get_token(c)

    off = struct.unpack_from("<i", data, offsets_off + i*4)[0]
    addr = rel_base + off
    try:
        symbols[addr] = result.decode('ascii')
    except:
        symbols[addr] = result.decode('ascii', errors='replace')

# Save all symbols
with open(r"F:\phone\ow251\全量包\kallsyms_parsed.txt", "w") as f:
    for addr in sorted(symbols):
        f.write(f"0x{addr:08x} {symbols[addr]}\n")

print(f"Parsed {len(symbols)} symbols")

# Find selinux-related symbols
print("\n=== SELinux symbols ===")
for addr in sorted(symbols):
    name = symbols[addr]
    if 'selinux' in name.lower() or 'enforcing' in name.lower():
        print(f"  0x{addr:08x}: {name}")

# Find symbols near selinux_state
print("\n=== Symbols near 0xc1eb0690 ===")
for addr in sorted(symbols):
    if 0xc1eb0600 <= addr <= 0xc1eb06b0:
        print(f"  0x{addr:08x}: {symbols[addr]}")

# Find key symbols
print("\n=== Key symbols ===")
for addr in sorted(symbols):
    name = symbols[addr]
    if name in ('_end', '__bss_start', '__bss_stop', '_text', '_stext',
                'init_cred', 'init_task', 'commit_creds', 'prepare_kernel_cred',
                'selinux_state', 'selinux_enabled', 'selinux_enforcing',
                'selinux_enforcing_boot', 'modprobe_path', 'core_pattern',
                'poweroff_cmd', '__stack_chk_guard', 'runqueues',
                '__per_cpu_offset', '__tracepoint_sched_pi_setprio'):
        print(f"  0x{addr:08x}: {name}")

# Find security-related BSS symbols
print("\n=== Security/flag symbols in high BSS ===")
for addr in sorted(symbols):
    name = symbols[addr]
    if addr > 0xc1c00000 and any(kw in name.lower() for kw in
        ['enforce', 'selinux', 'lockdown', 'panic', 'taint', 'secure',
         'modules_disable', 'kptr', 'dmesg', 'ptrace_scope', 'perf_event_paranoid',
         'core_pattern', 'modprobe', 'poweroff', 'usermodehelper',
         'selinux_state', 'checkreqprot', 'initialized']):
        print(f"  0x{addr:08x}: {name}")

# Find all symbols in the last 0x200 bytes of BSS
print("\n=== Last 0x200 bytes of kernel image ===")
for addr in sorted(symbols):
    if addr >= 0xc1eb04a0:
        print(f"  0x{addr:08x}: {symbols[addr]}")