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 files4
gitchw/ghostlock-cve-2026-43499Revision 96acd93156f6
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
leakc/deploy.py
Python · 3,244 bytes#!/usr/bin/env python3
"""Push a local file to the leak guest (serial 5593) via base64 over the
raw-TCP console, verifying with md5. Usage:
python3 deploy.py <local_file> <guest_guest_path> [chmod]
Port via env SPORT (default 5593)."""
import socket, sys, time, os, base64, hashlib, re, argparse
PORT = int(os.environ.get('SPORT', '5593'))
IAC=255; DONT=254; DO=253; WONT=252; WILL=251; SB=250; SE=240
def strip(data):
out=b''; i=0
while i<len(data):
b=data[i]
if b==IAC:
if i+1<len(data) and data[i+1]==IAC: out+=b'\xff'; i+=2; continue
if i+2<len(data) and data[i+1] in (DO,DONT,WILL,WONT): i+=3; continue
if i+1<len(data) and data[i+1]==SB:
j=data.find(bytes([SE]),i+2); i=j+1 if j>=0 else len(data); continue
i+=2; continue
out+=bytes([b]); i+=1
return out
class Console:
def __init__(self):
self.s=socket.create_connection(('127.0.0.1',PORT),timeout=10)
self.buf=b''
def read_some(self,t=2.0):
self.s.settimeout(t); d=b''
try:
while True:
c=self.s.recv(4096)
if not c: break
d+=c
if len(d)>400000: break
except socket.timeout: pass
self.buf+=strip(d)
return self.buf.decode('utf-8','replace')
def wait_for(self,pat,timeout=30):
rx=re.compile(pat,re.S); end=time.time()+timeout
while time.time()<end:
if rx.search(self.buf.decode('utf-8','replace')): return True
self.read_some(min(2.0,end-time.time()))
return False
def send(self,cmd):
self.s.sendall(cmd.encode()+b'\n')
def run(self,cmd,timeout=60):
tok='RK%06d'%(int(time.time()*1000)%1000000)
self.buf=b''; self.send(cmd+'; echo '+tok+'=$?')
ok=self.wait_for(tok+r'=(\d+)',timeout)
out=self.buf.decode('utf-8','replace')
m=re.search(tok+r'=(\d+)',out)
return (int(m.group(1)) if m else None), out
def main():
ap=argparse.ArgumentParser()
ap.add_argument('local'); ap.add_argument('remote')
ap.add_argument('--chmod',default='755')
a=ap.parse_args()
data=open(a.local,'rb').read()
host_md5=hashlib.md5(data).hexdigest()
b64=base64.b64encode(data).decode()
print('local %d bytes md5=%s'%(len(data),host_md5))
c=Console(); time.sleep(0.5); c.send(''); c.wait_for(r'[/#]',10)
remote_b64=a.remote+'.b64'
c.run('rm -f %s; mkdir -p $(dirname %s)'%(remote_b64,a.remote))
CHUNK=4000
n=(len(b64)+CHUNK-1)//CHUNK
for i in range(n):
part=b64[i*CHUNK:(i+1)*CHUNK]
rc,out=c.run("echo '%s' >> %s"%(part,remote_b64),timeout=20)
if rc!=0:
print('chunk %d failed'%i); print(out[-500:]); sys.exit(1)
if i%20==0: print(' chunk %d/%d'%(i,n))
rc,out=c.run('base64 -d %s > %s; chmod %s %s; md5sum %s'%(
remote_b64,a.remote,a.chmod,a.remote,a.remote),timeout=30)
print(out[-400:])
m=re.search(r'([0-9a-f]{32})\s+',out)
guest_md5=m.group(1) if m else ''
print('guest md5=%s match=%s'%(guest_md5, guest_md5==host_md5))
c.s.close()
sys.exit(0 if guest_md5==host_md5 else 2)
if __name__=='__main__':
main()