DreamFTP Server username Remote Format String - Nessus

High   Plugin ID: 12086

This page contains detailed information about the DreamFTP Server username 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: 12086
Name: DreamFTP Server username Remote Format String
Filename: dreamftp_format_string.nasl
Vulnerability Published: 2004-03-04
This Plugin Published: 2004-03-04
Last Modification Time: 2018-08-31
Plugin Version: 1.18
Plugin Type: remote
Plugin Family: FTP
Dependencies: ftp_anonymous.nasl, ftpserver_detect_type_nd_version.nasl
Required KB Items [?]: ftp/login
Excluded KB Items: global_settings/supplied_logins_only

Vulnerability Information


Severity: High
Vulnerability Published: 2004-03-04
Patch Published: N/A
CVE [?]: CVE-2004-2074
CPE [?]: N/A

Synopsis

Arbitrary code may be run on the remote host.

Description

The remote DreamFTP server is vulnerable to a format string attack when processing the USER command.

An attacker may exploit this flaw to gain a shell on this host.

Solution

Upgrade to DreamFTP 1.03 or newer (when available) or use another FTP server.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the DreamFTP Server username Remote Format String vulnerability:

  1. Metasploit: exploit/windows/ftp/dreamftp_format
    [BolinTech Dream FTP Server 1.02 Format String]
  2. Exploit-DB: exploits/windows/remote/16712.rb
    [EDB-16712: BolinTech DreamFTP Server 1.02 - Format String (Metasploit)]

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 V2 Vector [?]: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:F/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.2 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.2 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:F/RL:O/RC:C
CVSS Base Score:7.3 (High)
Impact Subscore:3.4
Exploitability Subscore:3.9
CVSS Temporal Score:6.8 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.8 (Medium)

Go back to menu.

Plugin Source


This is the dreamftp_format_string.nasl nessus plugin source code. This script is Copyright (C) 2004-2018 and is owned by Tenable, Inc. or an Affiliate thereof.

# 
# (C) Tenable Network Security, Inc.
#


include("compat.inc");

if(description)
{
 script_id(12086);
 script_cve_id("CVE-2004-2074");
 script_bugtraq_id(9800);
 script_version ("1.18");
 
 script_set_attribute(attribute:"synopsis", value:
"Arbitrary code may be run on the remote host." );
 script_set_attribute(attribute:"description", value:
"The remote DreamFTP server is vulnerable to a format string attack when
processing the USER command.

An attacker may exploit this flaw to gain a shell on this host." );
 script_set_attribute(attribute:"solution", value:
"Upgrade to DreamFTP 1.03 or newer (when available) or use another FTP
server." );
 script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
 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:L/I:L/A:L");
 script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
 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:'BolinTech Dream FTP Server 1.02 Format String');
 script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

 script_name(english:"DreamFTP Server username Remote Format String");
 
 script_set_attribute(attribute:"plugin_publication_date", value: "2004/03/04");
 script_set_attribute(attribute:"vuln_publication_date", value: "2004/03/04");
 script_cvs_date("Date: 2018/08/31 12:25:01");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_end_attributes();

 script_summary(english:"Logs as a %n");
 script_category(ACT_ATTACK);
 script_copyright(english: "This script is Copyright (C) 2004-2018 and is owned by Tenable, Inc. or an Affiliate thereof.");
 script_family(english:"FTP");
 script_dependencies("ftpserver_detect_type_nd_version.nasl", "ftp_anonymous.nasl");
 script_require_keys("ftp/login");
 script_exclude_keys("global_settings/supplied_logins_only");
 script_require_ports("Services/ftp", 21);
 exit(0);
}

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

if (supplied_logins_only) audit(AUDIT_SUPPLIED_LOGINS_ONLY);

port = get_ftp_port(default: 21);


soc = open_sock_tcp(port);
if (! soc) exit(1);

ftp_debug(str:"custom banner");
r = ftp_recv_line(socket:soc);
if ( ! r ) exit(1, "Cannot read FTP banner from port "+port+".");

# Recognize DreamFTP thanks to its error message
send(socket:soc, data:'USER ' + rand()  + '\r\n');
r = ftp_recv_line(socket:soc);
if ( ! r ) exit(1, "The FTP server on port "+port+" did not answer to USER.");
send(socket:soc, data:'PASS ' + rand() + '\r\n');
r = ftp_recv_line(socket:soc);
if ( ! r ) exit(1, "The FTP server on port "+port+" did not answer to PASS.");

if ( "530 Not logged in, user or password incorrect!" >< r )
{
 # Overwrite the username buffer
 send(socket:soc, data:'USER ' + crap(data:"%x", length:86) + '%n\r\n');
 r = ftp_recv_line(socket:soc);
 if ( ! r ) exit(1);
 if (egrep(pattern:"^331 Password required for ..$", string:r) ) security_hole(port);
}

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

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

Go back to menu.

How to Run


Here is how to run the DreamFTP Server username 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 DreamFTP Server username Remote Format String plugin ID 12086.
  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 dreamftp_format_string.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

/opt/nessus/bin/nasl -T - dreamftp_format_string.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 dreamftp_format_string.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 10452 - WU-FTPD site_exec() Function 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 dreamftp_format_string.nasl version 1.18. For more plugins, visit the Nessus Plugin Library.

Go back to menu.