UoW imapd (UW-IMAP) Multiple Command Remote Overflows - Nessus

High   Plugin ID: 10625

This page contains detailed information about the UoW imapd (UW-IMAP) Multiple Command Remote Overflows Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 10625
Name: UoW imapd (UW-IMAP) Multiple Command Remote Overflows
Filename: imap4_rev1_overflow.nasl
Vulnerability Published: 2000-04-16
This Plugin Published: 2001-03-01
Last Modification Time: 2018-11-15
Plugin Version: 1.29
Plugin Type: remote
Plugin Family: Gain a shell remotely
Dependencies: find_service1.nasl, logins.nasl
Excluded KB Items [?]: imap/false_imap

Vulnerability Information


Severity: High
Vulnerability Published: 2000-04-16
Patch Published: N/A
CVE [?]: CVE-2000-0284
CPE [?]: N/A

Synopsis

The remote IMAP server is affected by multiple remote buffer overflow vulnerabilities.

Description

The remote host appears to be running UoW IMAP Server. The installed version is affected by a buffer overflow vulnerability because the software fails to verify input length of arguments to the 'LIST', 'COPY', 'RENAME', 'FIND', 'LSUB' commands. An attacker, exploiting this flaw could execute arbitrary commands subject to the privileges of the connected user.

Solution

Upgrade to imap-2000 or higher, as this reportedly fixes the issue.

Public Exploits


Target Network Port(s): 143
Target Asset(s): Services/imap
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 UoW imapd (UW-IMAP) Multiple Command Remote Overflows vulnerability:

  1. Metasploit: exploit/linux/imap/imap_uw_lsub
    [UoW IMAP Server LSUB Buffer Overflow]
  2. Exploit-DB: exploits/linux/remote/10025.rb
    [EDB-10025: University of Washington - imap LSUB Buffer Overflow (Metasploit)]
  3. Exploit-DB: exploits/linux/remote/16846.rb
    [EDB-16846: UoW IMAPd Server - LSUB Buffer Overflow (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)

Go back to menu.

Plugin Source


This is the imap4_rev1_overflow.nasl nessus plugin source code. This script is Copyright (C) 2001-2018 Tenable Network Security, Inc.

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


include("compat.inc");

if(description)
{
 script_id(10625);
 script_version ("1.29");
 script_cve_id("CVE-2000-0284");
 script_bugtraq_id(1110);
 
 script_name(english:"UoW imapd (UW-IMAP) Multiple Command Remote Overflows");
 
 script_set_attribute(attribute:"synopsis", value:
"The remote IMAP server is affected by multiple remote buffer overflow
vulnerabilities." );
 script_set_attribute(attribute:"description", value:
"The remote host appears to be running UoW IMAP Server. The installed
version is affected by a buffer overflow vulnerability because the 
software fails to verify input length of arguments to the 'LIST', 
'COPY', 'RENAME', 'FIND', 'LSUB' commands. An attacker, exploiting 
this flaw could execute arbitrary commands subject to the privileges
of the connected user." );
 script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2000/Apr/63" );
 script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2000/Apr/74" );
 script_set_attribute(attribute:"see_also", value:"https://packetstormsecurity.com/0104-exploits/imap-lsub.pl" );
 script_set_attribute(attribute:"see_also", value:"http://www.ca.com/us/securityadvisor/vulninfo/vuln.aspx?id=2442" );
 script_set_attribute(attribute:"solution", value:
"Upgrade to imap-2000 or higher, as this reportedly fixes the issue." );
  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_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'UoW IMAP Server LSUB Buffer Overflow');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
script_set_attribute(attribute:"plugin_publication_date", value: "2001/03/01");
 script_set_attribute(attribute:"vuln_publication_date", value: "2000/04/16");
 script_cvs_date("Date: 2018/11/15 20:50:22");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_end_attributes();

 script_summary(english:"checks for a buffer overflow in imapd");
 script_category(ACT_MIXED_ATTACK); # mixed
 script_copyright(english:"This script is Copyright (C) 2001-2018 Tenable Network Security, Inc.");
 script_family(english:"Gain a shell remotely");
 script_dependencie("find_service1.nasl", "logins.nasl");
		       		     
 script_require_ports("Services/imap", 143);
 script_exclude_keys("imap/false_imap");
 exit(0);
}

#
# The script code starts here
#

port = get_kb_item("Services/imap");
if(!port)port = 143;


acct = get_kb_item("imap/login");
pass = get_kb_item("imap/password");

if((!pass) ||
   (safe_checks()))
{
 banner = get_kb_item(string("imap/banner/", port));
 if(!banner)
 {
  if(get_port_state(port))
  {
   soc = open_sock_tcp(port);
   if(!soc)exit(0);
   banner = recv_line(socket:soc, length:4096);
   close(soc);
  }
 }
 
 if("IMAP4rev" >< banner)
 {
  if(ereg(pattern:".*IMAP4rev.* v12\.([0-1].*|2([0-5].*|6[0-4]))",
  	  string:banner))
	  {
	   alrt = string(
	     "\n",
             "*** Nessus solely relied on the server banner to \n",
             "*** issue this warning.\n",
             "\n"
           );
	security_hole(port:port, extra:alrt);
	  }
 }
 exit(0);
}

if((acct == "")||(pass == ""))exit(0);


if(get_port_state(port))
{
 soc = open_sock_tcp(port);
 b = recv_line(socket:soc, length:1024);
 if(!strlen(b)){
 	close(soc);
	exit(0);
	}
 s1 = string("1 login ", acct, " ", pass, "\r\n");	
 send(socket:soc, data:s1);
 b = recv_line(socket:soc, length:1024);
 
 s2 = string("1 lsub ", raw_string(0x22, 0x22), " {1064}\r\n");
 send(socket:soc, data:s2);
 c = recv_line(socket:soc, length:1024);
 s3 = string(crap(1064), "\r\n");
 send(socket:soc, data:s3);
 
 c = recv_line(socket:soc, length:1024);
 if(strlen(c) == 0)security_hole(port);
 close(soc);
}

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

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

Go back to menu.

How to Run


Here is how to run the UoW imapd (UW-IMAP) Multiple Command Remote Overflows 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 Gain a shell remotely plugin family.
  6. On the right side table select UoW imapd (UW-IMAP) Multiple Command Remote Overflows plugin ID 10625.
  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 imap4_rev1_overflow.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 10374 - UoW imapd (UW-IMAP) Multiple Command Remote Overflows (2)
  • 52609 - IMAP Service STARTTLS Plaintext Command Injection
  • 10292 - UoW imapd AUTHENTICATE Command Remote Overflow
  • 122548 - Debian DLA-1700-1 : uw-imap security update
  • 156391 - Debian DLA-2866-1 : uw-imap - LTS security update

Version


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

Go back to menu.