Vulnerabilities > CVE-2004-1211 - Buffer Errors vulnerability in David Harris Mercury 4.0.1A

047910
CVSS 10.0 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
low complexity
david-harris
CWE-119
critical
nessus
exploit available
metasploit

Summary

Multiple buffer overflows in the IMAP service in Mercury/32 4.01a allow remote authenticated users to cause a denial of service (application crash) and possibly execute arbitrary code via long arguments to the (1) EXAMINE, (2) SUBSCRIBE, (3) STATUS, (4) APPEND, (5) CHECK, (6) CLOSE, (7) EXPUNGE, (8) FETCH, (9) RENAME, (10) DELETE, (11) LIST, (12) SEARCH, (13) CREATE, or (14) UNSUBSCRIBE commands.

Vulnerable Configurations

Part Description Count
Application
David_Harris
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Exploit-Db

  • descriptionMercury Mail 4.01 (Pegasus) IMAP Buffer Overflow v2 (c code). CVE-2004-1211,CVE-2004-2513. Remote exploit for windows platform
    idEDB-ID:670
    last seen2016-01-31
    modified2004-12-01
    published2004-12-01
    reporterJohnH
    sourcehttps://www.exploit-db.com/download/670/
    titleMercury Mail 4.01 - Pegasus IMAP Buffer Overflow 2 c code
  • descriptionMercury/32 Mail Server <= 4.01a (check) Buffer Overflow Exploit. CVE-2004-1211,CVE-2004-2513. Dos exploit for windows platform
    idEDB-ID:1159
    last seen2016-01-31
    modified2004-12-01
    published2004-12-01
    reporterReed Arvin
    sourcehttps://www.exploit-db.com/download/1159/
    titleMercury/32 Mail Server <= 4.01a check Buffer Overflow Exploit
  • descriptionMercury Mail 4.01 (Pegasus) IMAP Buffer Overflow Exploit. CVE-2004-1211,CVE-2004-2513. Remote exploit for windows platform
    fileexploits/windows/remote/663.py
    idEDB-ID:663
    last seen2016-01-31
    modified2004-11-29
    platformwindows
    port143
    published2004-11-29
    reportermuts
    sourcehttps://www.exploit-db.com/download/663/
    titleMercury Mail 4.01 - Pegasus IMAP Buffer Overflow Exploit
    typeremote
  • descriptionMercury/32 v4.01a IMAP RENAME Buffer Overflow. CVE-2004-1211. Remote exploit for windows platform
    idEDB-ID:16484
    last seen2016-02-01
    modified2010-05-09
    published2010-05-09
    reportermetasploit
    sourcehttps://www.exploit-db.com/download/16484/
    titleMercury/32 4.01a - IMAP RENAME Buffer Overflow
  • descriptionMercury Mail 4.01 (Pegasus) IMAP Buffer Overflow Exploit (c code). CVE-2004-1211,CVE-2004-2513. Remote exploit for windows platform
    idEDB-ID:668
    last seen2016-01-31
    modified2004-11-30
    published2004-11-30
    reporterJohnH
    sourcehttps://www.exploit-db.com/download/668/
    titleMercury Mail 4.01 Pegasus IMAP Buffer Overflow Exploit c code

Metasploit

descriptionThis module exploits a stack buffer overflow vulnerability in the Mercury/32 v.4.01a IMAP service.
idMSF:EXPLOIT/WINDOWS/IMAP/MERCURY_RENAME
last seen2020-03-11
modified2017-07-24
published2005-12-05
references
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/windows/imap/mercury_rename.rb
titleMercury/32 v4.01a IMAP RENAME Buffer Overflow

Nessus

NASL familyGain a shell remotely
NASL idMERCURY_MAIL_STACK.NASL
descriptionThe remote host is running Mercury Mail server, an IMAP server for Windows. According to its banner, the version of Mercury Mail running on the remote host has multiple stack-based buffer overflow vulnerabilities. A remote, authenticated attacker could exploit these issues to crash the service or execute arbitrary code.
last seen2020-06-01
modified2020-06-02
plugin id15867
published2004-11-30
reporterThis script is Copyright (C) 2004-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/15867
titleMercury Mail Remote IMAP Server Remote Overflow
code
#
# (C) Tenable Network Security, Inc.
#


include("compat.inc");


if(description)
{
 script_id(15867);
 script_version ("1.17");

 script_cve_id("CVE-2004-1211");
 script_bugtraq_id(11775, 11788);
  script_xref(name:"EDB-ID", value:"1375");
 script_xref(name:"Secunia", value:"13348");

 script_name(english:"Mercury Mail Remote IMAP Server Remote Overflow");
 script_summary(english:"Checks for version of Mercury Mail");

 script_set_attribute(
   attribute:"synopsis",
   value:"The remote IMAP server has multiple buffer overflow vulnerabilities."
 );
 script_set_attribute(attribute:"description",  value:
"The remote host is running Mercury Mail server, an IMAP server for
Windows.

According to its banner, the version of Mercury Mail running on the
remote host has multiple stack-based buffer overflow vulnerabilities.
A remote, authenticated attacker could exploit these issues to crash
the service or execute arbitrary code." );
 script_set_attribute(
   attribute:"see_also",
   value:"https://seclists.org/fulldisclosure/2004/Dec/45"
 );
 script_set_attribute(
   attribute:"see_also",
   value:"https://seclists.org/fulldisclosure/2004/Dec/116"
 );
 script_set_attribute(
   attribute:"solution",
   value:"Upgrade to the latest version of this software."
 );
 script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/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:"metasploit_name", value:'Mercury/32 v4.01a IMAP RENAME Buffer Overflow');
 script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
 script_cwe_id(119);
 script_set_attribute(attribute:"plugin_publication_date", value: "2004/11/30");
 script_set_attribute(attribute:"vuln_publication_date", value: "2004/11/29");
 script_cvs_date("Date: 2018/11/15 20:50:22");
 script_set_attribute(attribute:"plugin_type", value:"remote");
 script_end_attributes();

 script_category(ACT_GATHER_INFO);
 script_family(english:"Gain a shell remotely");

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

 script_dependencie("find_service2.nasl");
 script_require_ports("Services/imap", 143);
 script_exclude_keys("imap/false_imap");

 exit(0);
}

#
# The script code starts here
#

include("imap_func.inc");
port = get_kb_item("Services/imap");
if(!port) port = 143;

banner = get_imap_banner(port:port);
if ( ! banner ) exit(0);

if(egrep(pattern:"^\* OK.*IMAP4rev1 Mercury/32 v([0-3]\..*|4\.(00.*|01[^b-z].*))server ready.*", string:banner))
{
  security_hole(port);
}    

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/83124/mercury_rename.rb.txt
idPACKETSTORM:83124
last seen2016-12-05
published2009-11-26
reporterMC
sourcehttps://packetstormsecurity.com/files/83124/Mercury-32-v4.01a-IMAP-RENAME-Buffer-Overflow.html
titleMercury/32 v4.01a IMAP RENAME Buffer Overflow

Saint

bid11775
descriptionMercury Mail IMAP DELETE command buffer overflow
idmail_imap_mercury
osvdb12508
titlemercury_imap_delete
typeremote