Exploit database

GH-14fb583d3d1bd2da10251bb1a37b93d6

gitchw/ghostlock-cve-2026-43499

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

Python · 2,617 bytes
import struct
import zlib

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

# Parse kallsyms from the kernel binary
# With CONFIG_KALLYSMS_BASE_RELATIVE=y, addresses are relative to kernel base

# Find kallsyms by looking for the kallsyms_markers or kallsyms_token_table
# First, let's find the "kallsyms" strings or known patterns

# The kallsyms data is typically at the end of the kernel image
# Let's look for the token table which contains common symbol name fragments

# Search for known function name strings that would be in kallsyms_names
# kallsyms_names is compressed with a token table
# The token table starts with empty string and has single chars + common substrings

# Let's try to find kallsyms by looking for the pattern of kallsyms_num_syms
# followed by kallsyms_names (compressed)

# Alternative: search for the kallsyms_addresses table
# With KALLSYMS_BASE_RELATIVE, these are relative offsets (unsigned long)
# The first symbol is usually at the start of .text

# Let's look for the kallsyms_token_table signature
# It starts with a zero byte (empty token), then single ASCII chars, then common strings

# Search for a sequence of zero-separated common kernel substrings
import re

# Look for "vmlinux" or "module" or known patterns
for pattern in [b'kallsyms_token_table', b'kallsyms_num_syms', b'kallsyms_names']:
    idx = data.find(pattern)
    if idx >= 0:
        print(f"Found '{pattern.decode()}' at file offset 0x{idx:x}, VA 0x{BASE+idx:08x}")

# Try to find the kallsyms token table by looking for a sequence of
# single-character strings followed by multi-char strings
# The token table starts with \x00 then ASCII chars
for offset in range(len(data) - 0x10000, len(data) - 0x100):
    # Look for pattern: \x00\x01\x00\x02... or \x00T\x00t\x00 etc
    if data[offset] == 0 and data[offset+2] == 0 and data[offset+4] == 0:
        # Check if this looks like a token table
        chars = []
        pos = offset
        for i in range(256):
            if pos >= len(data):
                break
            end = data.find(b'\x00', pos)
            if end < 0 or end - pos > 50:
                break
            s = data[pos:end]
            chars.append(s)
            pos = end + 1
            if len(chars) > 20 and all(len(c) <= 1 for c in chars[:20]):
                # Looks like a token table starting with single chars
                print(f"\nPossible token table at file offset 0x{offset:x}, VA 0x{BASE+offset:08x}")
                print(f"First 30 tokens: {chars[:30]}")
                break
        if len(chars) > 20:
            break