Novell NetMail IMAP Agent Long Verb Arguments Remote Overflow - Nessus

High   Plugin ID: 20318

This page contains detailed information about the Novell NetMail IMAP Agent Long Verb Arguments Remote Overflow Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 20318
Name: Novell NetMail IMAP Agent Long Verb Arguments Remote Overflow
Filename: novell_netmail_imapd_long_args_overflows.nasl
Vulnerability Published: 2005-11-18
This Plugin Published: 2005-12-16
Last Modification Time: 2018-11-15
Plugin Version: 1.19
Plugin Type: remote
Plugin Family: Gain a shell remotely
Dependencies: imap_overflow.nasl
Excluded KB Items [?]: imap/false_imap, imap/overflow

Vulnerability Information


Severity: High
Vulnerability Published: 2005-11-18
Patch Published: 2005-11-17
CVE [?]: CVE-2005-3314
CPE [?]: N/A

Synopsis

The remote IMAP server is affected by a buffer overflow vulnerability.

Description

The remote host is running Novell NetMail, a messaging and calendaring system for Windows, Linux, Unix, and NetWare.

The IMAP agent installed on the remote host as part of Novell NetMail is affected by a stack-based buffer overflow due to its improper handling of long arguments to selected IMAP commands while in an authenticated state. Successful exploitation of this issue may lead to the execution of arbitrary code on the remote host.

Solution

Upgrade to NetMail 3.52E FTF (Field Test File) 1 or later.

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 Novell NetMail IMAP Agent Long Verb Arguments Remote Overflow vulnerability:

  1. Metasploit: exploit/windows/imap/novell_netmail_status
    [Novell NetMail IMAP STATUS Buffer Overflow]
  2. Exploit-DB: exploits/windows/remote/16483.rb
    [EDB-16483: Novell NetMail 3.52d - IMAP STATUS 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 novell_netmail_imapd_long_args_overflows.nasl nessus plugin source code. This script is Copyright (C) 2005-2018 Tenable Network Security, Inc.

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


include("compat.inc");

if (description) {
  script_id(20318);
  script_version("1.19");

  script_cve_id("CVE-2005-3314");
  script_bugtraq_id(15491);

  script_name(english:"Novell NetMail IMAP Agent Long Verb Arguments Remote Overflow");
  script_summary(english:"Checks for long verb arguments buffer overflow vulnerability in Novell NetMail's IMAP agent");
 
 script_set_attribute(attribute:"synopsis", value:
"The remote IMAP server is affected by a buffer overflow vulnerability." );
 script_set_attribute(attribute:"description", value:
"The remote host is running Novell NetMail, a messaging and calendaring
system for Windows, Linux, Unix, and NetWare. 

The IMAP agent installed on the remote host as part of Novell NetMail
is affected by a stack-based buffer overflow due to its improper
handling of long arguments to selected IMAP commands while in an
authenticated state.  Successful exploitation of this issue may lead
to the execution of arbitrary code on the remote host." );
 script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/published/" );
 # http://web.archive.org/web/20060118114350/http://support.novell.com/filefinder/19357/beta.html
 script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?76172f4b" );
 script_set_attribute(attribute:"solution", value:
"Upgrade to NetMail 3.52E FTF (Field Test File) 1 or later." );
  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:'Novell NetMail IMAP STATUS Buffer Overflow');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
script_set_attribute(attribute:"plugin_publication_date", value: "2005/12/16");
 script_set_attribute(attribute:"vuln_publication_date", value: "2005/11/18");
 script_set_attribute(attribute:"patch_publication_date", value: "2005/11/17");
 script_cvs_date("Date: 2018/11/15 20:50:22");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_end_attributes();

 
  script_category(ACT_DENIAL);
  script_copyright(english:"This script is Copyright (C) 2005-2018 Tenable Network Security, Inc.");
  script_family(english:"Gain a shell remotely");
  script_dependencie("imap_overflow.nasl");
  script_exclude_keys("imap/false_imap", "imap/overflow");
  script_require_ports("Services/imap", 143);

  exit(0);
}

include("global_settings.inc");


port = get_kb_item("Services/imap");
if (!port) port = 143;
if (!get_port_state(port) || get_kb_item("imap/false_imap")) exit(0);


user = get_kb_item("imap/login");
pass = get_kb_item("imap/password");
if (!user || !pass) {
  exit(0, "imap/login and/or imap/password are empty");
}


# Try a couple of times to exploit the issue.
tries = 2;
for (iter=1; iter<=tries; iter++) {
  tag = 0;

  # Establish a connection.
  soc = open_sock_tcp(port);
  if (soc) {
    # Read banner and make sure it looks like NetMail.
    s = recv_line(socket:soc, length:1024);
    if (
      !strlen(s) || 
      "NetMail IMAP4 Agent" >!< s
    ) {
      close(soc);
      exit(0);
    }

    # Try to log in.
    ++tag;
    resp = NULL;
    c = string("nessus", string(tag), " LOGIN ", user, " ", pass);
    send(socket:soc, data:string(c, "\r\n"));
    while (s = recv_line(socket:soc, length:1024)) {
      s = chomp(s);
      m = eregmatch(pattern:string("^nessus", string(tag), " (OK|BAD|NO)"), string:s, icase:TRUE);
      if (!isnull(m)) {
        resp = m[1];
        break;
      }
    }

    # If successful, try to exploit the flaw.
    if (resp && resp =~ "OK") {
      ++tag;
      resp = NULL;

      c = string("nessus", string(tag), " SUBSCRIBE ", crap(1024));
      send(socket:soc, data:string(c, "\r\n"));
      while (s = recv_line(socket:soc, length:1024)) {
        s = chomp(s);
        m = eregmatch(pattern:string("^nessus", string(tag), " (OK|BAD|NO)"), string:s, icase:TRUE);
        if (!isnull(m)) {
          resp = m[1];
          break;
        }
      }

      # If we got a response, the server's not vulnerable.
      if (strlen(resp)) {
        # Logout.
        ++tag;
        resp = NULL;
        c = string("nessus", string(tag), " LOGOUT");
        send(socket:soc, data:string(c, "\r\n"));
        while (s = recv_line(socket:soc, length:1024)) {
          s = chomp(s);
          m = eregmatch(pattern:string("^nessus", string(tag), " (OK|BAD|NO)"), string:s, icase:TRUE);
          if (!isnull(m)) {
            resp = m[1];
            break;
          }
        }
        close(soc);

        break;
      }
    }
    else if (resp =~ "NO") {
      debug_print("couldn't login with supplied IMAP credentials!", level:1);
    }
  }
}


# There's a problem if our exploit worked every time.
if (iter > tries && c && "SUBSCRIBE" >< c) {
  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/novell_netmail_imapd_long_args_overflows.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\novell_netmail_imapd_long_args_overflows.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/novell_netmail_imapd_long_args_overflows.nasl

Go back to menu.

How to Run


Here is how to run the Novell NetMail IMAP Agent Long Verb Arguments Remote Overflow 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 Novell NetMail IMAP Agent Long Verb Arguments Remote Overflow plugin ID 20318.
  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 novell_netmail_imapd_long_args_overflows.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 62026 - Novell File Reporter Agent XML Parsing Remote Code Execution
  • 55544 - Novell File Reporter Engine RECORD Element Tag Parsing Overflow (uncredentialed check)
  • 47581 - Novell 'modulemanager' Servlet Arbitrary File Upload (intrusive check)
  • 47582 - Novell 'modulemanager' Servlet Arbitrary File Upload (safe check)
  • 69557 - Novell Client / Client 2 Multiple Vulnerabilities
  • 53536 - Novell File Reporter Agent XML Tag Handling Buffer Overflow
  • 62977 - Novell File Reporter Agent FSFUI UICMD 126 Arbitrary File Download
  • 55471 - Novell File Reporter Engine RECORD Element Tag Parsing Overflow (credentialed check)
  • 43060 - Novell iPrint Client < 5.32 Multiple Overflows
  • 48364 - Novell iPrint Client < 5.42 Multiple Flaws
  • 48407 - Novell iPrint Client < 5.44 Multiple Vulnerabilities
  • 51367 - Novell iPrint Client < 5.56 Multiple Vulnerabilities
  • 56682 - Novell iPrint Client < 5.72 nipplib.dll GetDriverSettings Function Buffer Overflow
  • 31136 - Novell iPrint Control ActiveX (ienipp.ocx) ExecuteRequest() Method Overflow
  • 34049 - Novell iPrint Client ActiveX Control Multiple Vulnerabilities
  • 33227 - Novell iPrint Client for Windows ienipp.ocx ActiveX Multiple Variable Overflow
  • 36103 - Novell NetIdentity Agent < 1.2.4 Arbitrary Pointer De-reference Code Execution
  • 29898 - Novell Client nicm.sys Local Privilege Escalation
  • 33481 - Novell Client nwfs.sys Local Privilege Escalation
  • 25952 - Novell Client nwspool.dll RPC Printer Functions Remote Overflow (300870)
  • 62968 - Novell Sentinel Log Manager Authentication Bypass
  • 23699 - Novell NetWare Client Print Provider (nwspool.dll) Multiple Function Overflow
  • 65722 - Novell ZENworks Control Center File Upload Remote Code Execution
  • 45569 - Novell ZENworks Configuration Management < 10 SP3 Multiple Flaws
  • 58968 - Novell ZENworks Configuration Management PreBoot Service Opcode Request Parsing Vulnerabilities
  • 83289 - Novell ZENworks Configuration Management < 11.3.2 Remote Code Execution (intrusive check)
  • 66914 - Novell ZENworks Control Center File Upload Remote Code Execution (intrusive check)
  • 65551 - Novell ZENworks Mobile Management MDM.php Local File Inclusion
  • 19428 - Novell eDirectory Server iMonitor Multiple Remote Overflows
  • 25084 - Novell Groupwise WebAccess GWINTER.EXE Base64 Decoding Remote Overflow
  • 21243 - Novell GroupWise Messenger Accept Language Remote Overflow
  • 18524 - Novell ZENworks Multiple Remote Pre-Authentication Overflows

Version


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

Go back to menu.