WU-FTPD site_exec() Function Remote Format String - Nessus

Critical   Plugin ID: 10452

This page contains detailed information about the WU-FTPD site_exec() Function Remote Format String Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 10452
Name: WU-FTPD site_exec() Function Remote Format String
Filename: wu_ftpd_site_exec.nasl
Vulnerability Published: N/A
This Plugin Published: 2000-06-27
Last Modification Time: 2018-11-15
Plugin Version: 1.49
Plugin Type: remote
Plugin Family: FTP
Dependencies: ftp_anonymous.nasl, ftpserver_detect_type_nd_version.nasl
Required KB Items [?]: ftp/wuftpd

Vulnerability Information


Severity: Critical
Vulnerability Published: N/A
Patch Published: N/A
CVE [?]: CVE-2000-0573
CPE [?]: N/A

Synopsis

The remote host is running an FTP server with a remote root vulnerability.

Description

The version of WU-FTPD hosted on the remote server does not properly sanitize the argument of the SITE EXEC command. It may be possible for a remote attacker to gain root access.

Solution

Upgrade to WU-FTPD version 2.6.1 or later.

Public Exploits


Target Network Port(s): 21
Target Asset(s): Services/ftp
Exploit Available: True (Metasploit Framework, Exploit-DB, Immunity Canvas)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the WU-FTPD site_exec() Function Remote Format String vulnerability:

  1. Metasploit: exploit/multi/ftp/wuftpd_site_exec_format
    [WU-FTPD SITE EXEC/INDEX Format String Vulnerability]
  2. Exploit-DB: exploits/linux/remote/16311.rb
    [EDB-16311: WU-FTPD - Site EXEC/INDEX Format String (Metasploit)]
  3. Immunity Canvas: CANVAS

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2000-0573
CVSS V2 Vector: AV:N/AC:L/Au:N/C:C/I:C/A:C/E:F/RL:OF/RC:C
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:8.3 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.3 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.1 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.1 (Critical)

Go back to menu.

Plugin Source


This is the wu_ftpd_site_exec.nasl nessus plugin source code. This script is Copyright (C) 2000-2018 A. de Bernis

#
# This script was written by Alexis de Bernis <[email protected]>
#

# Changes by Tenable:
# - rely on the banner if we could not log in
# - changed the description to include a Solution:
# - revised plugin title, removed unrelated CVE ref (2/04/2009)
#
# See the Nessus Scripts License for details
#

include("compat.inc");

if (description)
{
  script_id(10452);
  script_version("1.49");
  script_cvs_date("Date: 2018/11/15 20:50:22");

  script_cve_id("CVE-2000-0573");
  script_bugtraq_id(726, 1387, 2240);

  script_name(english:"WU-FTPD site_exec() Function Remote Format String");
  script_summary(english:"Checks if the remote FTP server sanitizes the SITE EXEC command");

  script_set_attribute(attribute:"synopsis", value:
"The remote host is running an FTP server with a remote root
vulnerability.");
  script_set_attribute(attribute:"description", value:
"The version of WU-FTPD hosted on the remote server does not properly
sanitize the argument of the SITE EXEC command. It may be possible for
a remote attacker to gain root access.");
  script_set_attribute(attribute:"see_also", value:"https://marc.info/?l=bugtraq&m=96171893218000&w=2");
  script_set_attribute(attribute:"solution", value:"Upgrade to WU-FTPD version 2.6.1 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2000-0573");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'WU-FTPD SITE EXEC/INDEX Format String Vulnerability');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:'CANVAS');

  script_set_attribute(attribute:"plugin_publication_date", value:"2000/06/27");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_family(english:"FTP");

  script_copyright(english:"This script is Copyright (C) 2000-2018 A. de Bernis");

  script_dependencies("ftpserver_detect_type_nd_version.nasl", "ftp_anonymous.nasl");
  script_require_keys("ftp/wuftpd");
  script_require_ports("Services/ftp", 21);

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("ftp_func.inc");

login = get_kb_item("ftp/login");
pass  = get_kb_item("ftp/password");

# Connect to the FTP server
port = get_ftp_port(default: 21);

ftpport = port;

if(login)
{
 soc = ftp_open_and_authenticate( user:login, pass:pass, port:port );
 if(soc)
 {
  # We are in
  c = 'SITE EXEC %p \r\n';
  send(socket:soc, data:c);
  b = recv(socket:soc, length:6);
  if(b == "200-0x") security_hole(ftpport);
  ftp_close(socket: soc);
  exit(0);
  }
  else
  {
    soc = open_sock_tcp(ftpport);
    if (! soc ) audit(AUDIT_SOCK_FAIL,ftpport);
    r = ftp_recv_line(socket:soc);
    close(soc);
  }
}
  if (report_paranoia < 2) audit(AUDIT_PARANOID);

  if(egrep(pattern:"220.*FTP server.*[vV]ersion (wu|wuftpd)-((1\..*)|(2\.[0-5]\..*)|(2\.6\.0)).*",
  	 string:r)){
	 report = "
Nessus is solely basing this finding on the version reported
in the banner, so this may be a false positive.
";
	 security_hole(port:ftpport, extra:report);
	 }

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/wu_ftpd_site_exec.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\wu_ftpd_site_exec.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/wu_ftpd_site_exec.nasl

Go back to menu.

How to Run


Here is how to run the WU-FTPD site_exec() Function Remote Format String as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select FTP plugin family.
  6. On the right side table select WU-FTPD site_exec() Function Remote Format String plugin ID 10452.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl wu_ftpd_site_exec.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a wu_ftpd_site_exec.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - wu_ftpd_site_exec.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state wu_ftpd_site_exec.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 14924 - Debian DSA-087-1 : wu-ftpd - remote root exploit
  • 13903 - Mandrake Linux Security Advisory : wu-ftpd (MDKSA-2001:090)
  • 12086 - DreamFTP Server username Remote Format String
  • 30106 - AXIGEN Mail Server AXIMilter CNHO Command Remote Format String
  • 18974 - FreeBSD : gld -- format string and buffer overflow vulnerabilities (6c2d4f29-af3e-11d9-837d-000e0c2e438a)
  • 57739 - FreeBSD : sudo -- format string vulnerability (7c920bb7-4b5f-11e1-9f47-00e0815b8da8)
  • 21504 - FreeBSD : perl, webmin, usermin -- perl format string integer wrap vulnerability (bb33981a-7ac6-11da-bf72-00123f589060)
  • 22213 - FreeBSD : mysql -- format string vulnerability (fcb90eb0-2ace-11db-a6e2-000e0c2e438a)
  • 18530 - GLSA-200506-15 : PeerCast: Format string vulnerability
  • 20281 - GLSA-200512-02 : Webmin, Usermin: Format string vulnerability
  • 16265 - Berlios gpsd gpsd_report() Function Format String
  • 10522 - LPRng use_syslog() Remote Format String Arbitrary Command Execution
  • 31732 - McAfee Common Management Agent < 3.6.0.595 UDP Packet Handling Format String
  • 17839 - OpenSSH < 2.1.1p3 Format String Privilege Escalation
  • 18417 - PeerCast URL Error Message Format String
  • 16064 - SHOUTcast Server Filename Handling Format String
  • 31642 - VLC Media Player network/httpd.c httpd_FileCallBack Function Connection Parameter Format String
  • 63075 - VMware OVF Tool 2.1 File Handling Format String Vulnerability (VMSA-2012-0015)
  • 20343 - Webmin 'miniserv.pl' 'username' Parameter Format String

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file wu_ftpd_site_exec.nasl version 1.49. For more plugins, visit the Nessus Plugin Library.

Go back to menu.