Ipswitch IMail Server < 2006.21 Multiple Vulnerabilities - Nessus

Critical   Plugin ID: 25737

This page contains detailed information about the Ipswitch IMail Server < 2006.21 Multiple Vulnerabilities Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 25737
Name: Ipswitch IMail Server < 2006.21 Multiple Vulnerabilities
Filename: ipswitch_imail_2006_21.nasl
Vulnerability Published: 2007-03-09
This Plugin Published: 2007-07-19
Last Modification Time: 2022-04-11
Plugin Version: 1.27
Plugin Type: remote
Plugin Family: Windows
Dependencies: doublecheck_std_services.nasl, popserver_detect.nasl, smtpserver_detect.nasl

Vulnerability Information


Severity: Critical
Vulnerability Published: 2007-03-09
Patch Published: 2007-07-19
CVE [?]: CVE-2007-2795, CVE-2007-3925, CVE-2007-3926, CVE-2007-3927
CPE [?]: cpe:/a:ipswitch:imail

Synopsis

The remote mail server is affected by multiple vulnerabilities.

Description

The remote host is running Ipswitch IMail, a commercial messaging and collaboration suite for Windows.

According to its banner, the version of Ipswitch IMail installed on the remote host has several buffer overflows in its IMAP service component, one of which can be exploited prior to authentication to execute arbitrary code with SYSTEM privileges.

In addition, there is also a denial of service issue that can cause the IM Server to crash without authentication.

Solution

Upgrade to Ipswitch IMail version 2006.21 or later.

Public Exploits


Target Network Port(s): 25, 110, 143
Target Asset(s): Services/imap, Services/pop3, Services/smtp
Exploit Available: True (Metasploit Framework, Exploit-DB, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Ipswitch IMail Server < 2006.21 Multiple Vulnerabilities vulnerability:

  1. Metasploit: exploit/windows/imap/ipswitch_search
    [Ipswitch IMail IMAP SEARCH Buffer Overflow]
  2. Exploit-DB: exploits/windows/remote/9662.c
    [EDB-9662: IPSwitch IMAP Server 9.20 - Remote Buffer Overflow]
  3. Exploit-DB: exploits/windows/remote/16487.rb
    [EDB-16487: Ipswitch IMail Server - IMAP SEARCH 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: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)

Go back to menu.

Plugin Source


This is the ipswitch_imail_2006_21.nasl nessus plugin source code. This script is Copyright (C) 2007-2022 Tenable Network Security, Inc.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(25737);
  script_version("1.27");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id(
    "CVE-2007-2795",
    "CVE-2007-3925",
    "CVE-2007-3926",
    "CVE-2007-3927"
  );
  script_bugtraq_id(24962);

  script_name(english:"Ipswitch IMail Server < 2006.21 Multiple Vulnerabilities");

  script_set_attribute(attribute:"synopsis", value:
"The remote mail server is affected by multiple vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"The remote host is running Ipswitch IMail, a commercial messaging and
collaboration suite for Windows. 

According to its banner, the version of Ipswitch IMail installed on
the remote host has several buffer overflows in its IMAP service
component, one of which can be exploited prior to authentication to
execute arbitrary code with SYSTEM privileges. 

In addition, there is also a denial of service issue that can cause
the IM Server to crash without authentication.");
  # https://labs.idefense.com/verisign/intelligence/2009/vulnerabilities/display.php?id=563
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?194eb0fd");
  script_set_attribute(attribute:"see_also", value:"https://www.securityfocus.com/archive/1/474040/30/0/threaded");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-07-042/");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-07-043/");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2007/Jul/275");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2007/Jul/277");
  script_set_attribute(attribute:"see_also", value:"http://www.ipswitch.com/support/imail/releases/im200621.asp");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Ipswitch IMail version 2006.21 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_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploit_framework_core", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Ipswitch IMail IMAP SEARCH Buffer Overflow');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_cwe_id(119);

  script_set_attribute(attribute:"vuln_publication_date", value:"2007/03/09");
  script_set_attribute(attribute:"patch_publication_date", value:"2007/07/19");
  script_set_attribute(attribute:"plugin_publication_date", value:"2007/07/19");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:ipswitch:imail");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Windows");

  script_copyright(english:"This script is Copyright (C) 2007-2022 Tenable Network Security, Inc.");

  script_dependencies("smtpserver_detect.nasl", "popserver_detect.nasl", "doublecheck_std_services.nasl");
  script_require_ports("Services/smtp", 25, "Services/pop3", 110, "Services/imap", 143);

  exit(0);
}


include("global_settings.inc");
include("imap_func.inc");
include("pop3_func.inc");
include("smtp_func.inc");

function check(port, proto, ver, banner)
{
  local_var	report;

  if (! ver) return;
  # There's a problem if it's < 9.21 (== 2006.21).
  if (ver =~ "^([0-8]\.|9\.(0[0-9]$|[12]$))")
  {
    if (report_verbosity < 1)
      security_hole(port);
    else
    {
      report = '\n' +
'The installed version is : ' + ver + '\n' +
'The patched version is   : 9.21\n';
      if (report_verbosity > 1)
        report += 'The '+proto+' banner on this port is :\n\n' + banner + '\n';
      security_hole(port:port, extra: report);
    }
# NB: it's possible to customize the banner, but unless thorough checks
#     are enabled, we'll just stop.
    if (! thorough_tests) exit(0);
  }
}


# Do banner checks of various ports.
#
# - SMTP.
pl = get_kb_list("Services/smtp");
if (isnull(pl)) pl = make_list(25);

foreach port (pl)
{
  if (!get_port_state(port)) continue;
  if (get_kb_item('SMTP/'+port+'/broken')) continue;
banner = get_smtp_banner(port:port);
if (banner && " (IMail " >< banner)
{
  pat = "^[0-9][0-9][0-9] .+ \(IMail ([0-9.]+) [0-9]+-[0-9]+\) NT-ESMTP Server";
  matches = egrep(pattern:pat, string:banner);
  if (matches)
  {
    foreach match (split(matches))
    {
      match = chomp(match);
      ver = eregmatch(pattern:pat, string:match);
      if (!isnull(ver))
      {
        ver = ver[1];
        break;
      }
    }
  }

  check(port: port, ver: ver, banner: banner, proto: 'SMTP');
}
}

# - POP3.
pl = get_kb_list("Services/pop3");
if (isnull(pl)) pl = make_list(110);
foreach port(pl)
{
  if (!get_port_state(port)) continue;

banner = get_pop3_banner(port:port);
if (banner && " (IMail " >< banner)
{
  pat = "NT-POP3 Server .+ \(IMail ([0-9.]+) [0-9]+-[0-9]+\)";
  matches = egrep(pattern:pat, string:banner);
  if (matches)
  {
    foreach match (split(matches))
    {
      match = chomp(match);
      ver = eregmatch(pattern:pat, string:match);
      if (!isnull(ver))
      {
        ver = ver[1];
        break;
      }
    }
  }

  check(port: port, ver: ver, banner: banner, proto: 'POP3');
}
}

# - IMAP.
pl = get_kb_list("Services/imap");
if (isnull(pl)) pl = make_list(143);
foreach port(pl)
{
  if (!get_port_state(port)) continue;

banner = get_imap_banner(port:port);
if (banner && " (IMail " >< banner)
{
  pat = "IMAP4 Server \(IMail ([0-9.]+) [0-9]+-[0-9]+\)";
  matches = egrep(pattern:pat, string:banner);
  if (matches)
  {
    foreach match (split(matches))
    {
      match = chomp(match);
      ver = eregmatch(pattern:pat, string:match);
      if (!isnull(ver))
      {
        ver = ver[1];
        break;
      }
    }
  }

  check(port: port, ver: ver, banner: banner, proto: 'IMAP');
}
}

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

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

Go back to menu.

How to Run


Here is how to run the Ipswitch IMail Server < 2006.21 Multiple Vulnerabilities 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 Windows plugin family.
  6. On the right side table select Ipswitch IMail Server < 2006.21 Multiple Vulnerabilities plugin ID 25737.
  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 ipswitch_imail_2006_21.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: CWE | Common Weakness Enumeration:
  • CWE-119 (Weakness) Improper Restriction of Operations within the Bounds of a Memory Buffer
See also: Similar and related Nessus plugins:
  • 15771 - Ipswitch IMail IMAP Service DELETE Command Remote Overflow
  • 62186 - Ipswitch WhatsUp Gold Multiple Vulnerabilities
  • 88097 - Ipswitch WhatsUp Gold < 16.4 Multiple Vulnerabilities
  • 76489 - Ipswitch IMail Server 11.x / 12.x < 12.3 Information Disclosure
  • 76490 - Ipswitch IMail Server 11.x / 12.x < 12.4.1.15 Multiple Vulnerabilities (Heartbleed)
  • 22314 - Ipswitch IMail Server SMTP Service Crafted RCPT String Remote Overflow
  • 18368 - Ipswitch IMail Web Calendaring Server GET Request Traversal Arbitrary File Access
  • 88738 - Ipswitch WhatsUp Gold < 16.4 Multiple Vulnerabilities
  • 11004 - Ipswitch WhatsUp Gold Default Admin Account
  • 15564 - Ipswitch WhatsUp Gold _maincfgret.cgi Remote Overflow

Version


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

Go back to menu.