Exchange XEXCH50 Remote Buffer Overflow - Nessus

High   Plugin ID: 11889

This page contains detailed information about the Exchange XEXCH50 Remote Buffer Overflow Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 11889
Name: Exchange XEXCH50 Remote Buffer Overflow
Filename: exchange_xexch50_overflow.nasl
Vulnerability Published: 2003-10-15
This Plugin Published: 2003-10-16
Last Modification Time: 2018-11-15
Plugin Version: 1.30
Plugin Type: remote
Plugin Family: SMTP problems
Dependencies: smtpserver_detect.nasl

Vulnerability Information


Severity: High
Vulnerability Published: 2003-10-15
Patch Published: N/A
CVE [?]: CVE-2003-0714
CPE [?]: N/A

Synopsis

The remote mail server is prone to a buffer overflow or denial of service attack.

Description

The remote mail server appears to be running a version of the Microsoft Exchange SMTP service that is vulnerable to a flaw in the XEXCH50 extended verb. This flaw can be used to completely crash Exchange 5.5 or to execute arbitrary code on Exchange 2000.

Solution

Apply the one of the workarounds listed in the vendor's advisory.

Public Exploits


Target Network Port(s): 25
Target Asset(s): Services/smtp
Exploit Available: True (Metasploit Framework, Exploit-DB, Immunity Canvas)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Exchange XEXCH50 Remote Buffer Overflow vulnerability:

  1. Metasploit: exploit/windows/smtp/ms03_046_exchange2000_xexch50
    [MS03-046 Exchange 2000 XEXCH50 Heap Overflow]
  2. Exploit-DB: exploits/windows/remote/16820.rb
    [EDB-16820: Microsoft Exchange Server 2000 - XEXCH50 Heap Overflow (MS03-046) (Metasploit)]
  3. Immunity Canvas: CANVAS

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 exchange_xexch50_overflow.nasl nessus plugin source code. This script is Copyright (C) 2003-2018 Digital Defense Inc.

#
# This script was written by H D Moore <[email protected]>
# See the Nessus Scripts License for details
#
#
# Improved by John Lampe to see if XEXCH is an allowed verb
# Changes by Tenable:
# - Add MSKB script_xref (8/29/17)


include("compat.inc");

if(description)
{
     script_id(11889);
     script_bugtraq_id(8838);
     script_cve_id("CVE-2003-0714");
     script_version("1.30");
     name["english"] = "Exchange XEXCH50 Remote Buffer Overflow";
 script_xref(name:"MSFT", value:"MS03-046");
 script_xref(name:"MSKB", value:"323166");

     script_name(english:name["english"]);

 script_set_attribute(attribute:"synopsis", value:
"The remote mail server is prone to a buffer overflow or denial of
service attack." );
 script_set_attribute(attribute:"description", value:
"The remote mail server appears to be running a version of the
Microsoft Exchange SMTP service that is vulnerable to a flaw in the
XEXCH50 extended verb.  This flaw can be used to completely crash
Exchange 5.5 or to execute arbitrary code on Exchange 2000." );
 script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2003/Oct/216" );
 script_set_attribute(attribute:"see_also", value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2003/ms03-046" );
 script_set_attribute(attribute:"solution", value:
"Apply the one of the workarounds listed in the vendor's advisory." );
 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:'MS03-046 Exchange 2000 XEXCH50 Heap Overflow');
 script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
 script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
 script_set_attribute(attribute:"canvas_package", value:'CANVAS');
 script_set_attribute(attribute:"plugin_publication_date", value: "2003/10/16");
 script_set_attribute(attribute:"vuln_publication_date", value: "2003/10/15");
 script_cvs_date("Date: 2018/11/15 20:50:24");

script_set_attribute(attribute:"plugin_type", value:"remote");
script_end_attributes();


    summary["english"] = "Tests to see if authentication is required for the XEXCH50 command";
    script_summary(english:summary["english"]);
 
    script_category(ACT_GATHER_INFO);
 
    script_copyright(english:"This script is Copyright (C) 2003-2018 Digital Defense Inc.");
 
    family["english"] = "SMTP problems";
    script_family(english:family["english"]);
    
    script_dependencies("smtpserver_detect.nasl");
    script_require_ports("Services/smtp", 25);
    exit(0);
}

include("global_settings.inc");
include("misc_func.inc");
include("smtp_func.inc");

port = get_service(svc: "smtp", default: 25, exit_on_fail: 1);
if (get_kb_item('SMTP/'+port+'/broken')) exit(0);

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


greeting = smtp_recv_banner(socket:soc);
debug_print("GREETING: ", greeting, "\n");

# look for the exchange banner, removing this may get us through some proxies
if (! egrep(string:greeting, pattern:"microsoft", icase:TRUE)) exit(0);

send(socket:soc, data: 'EHLO X\r\n');
ok = smtp_recv_line(socket:soc);
if (! ok) exit(0);
debug_print("HELO: ", ok, "\n");
if("XEXCH50" >!< ok)exit(0);

send(socket:soc, data:'MAIL FROM: Administrator\r\n');
ok = smtp_recv_line(socket:soc);
if (! ok) exit(0);
debug_print("MAIL: ", ok, "\n");

send(socket:soc, data:'RCPT TO: Administrator\r\n');
ok = smtp_recv_line(socket:soc);
if (! ok) exit(0);
debug_print("RCPT: ", ok, "\n");

send(socket:soc, data:'XEXCH50 2 2\r\n');
ok = smtp_recv_line(socket:soc);
if (! ok) exit(0);
debug_print("XEXCH50: ", ok, "\n");

if (egrep(string:ok, pattern:"^354 Send binary")) security_hole(port: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/exchange_xexch50_overflow.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\exchange_xexch50_overflow.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/exchange_xexch50_overflow.nasl

Go back to menu.

How to Run


Here is how to run the Exchange XEXCH50 Remote Buffer 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 SMTP problems plugin family.
  6. On the right side table select Exchange XEXCH50 Remote Buffer Overflow plugin ID 11889.
  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 exchange_xexch50_overflow.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: MSKB | Microsoft Knowledge Base: MSFT | Microsoft Security Bulletin:
  • MS03-046
See also: Similar and related Nessus plugins:
  • 147171 - Microsoft Exchange Server Authentication Bypass
  • 152458 - Microsoft Exchange Server RCE (ProxyShell)
  • 72666 - Apple iOS 6.x < 6.1.6 'SSLVerifySignedServerKeyExchange' Certificate Validation Weakness
  • 72667 - Apple iOS 7.x < 7.0.6 'SSLVerifySignedServerKeyExchange' Certificate Validation Weakness
  • 137835 - Cisco IOS Internet Key Exchange Version 2 DoS (cisco-sa-ikev2-9p23Jj2a)
  • 137836 - Cisco IOS XE Internet Key Exchange Version 2 DoS (cisco-sa-ikev2-9p23Jj2a)
  • 137654 - Cisco IOS, IOS XE, and NX-OS Software Security Group Tag Exchange Protocol Denial of Service Vulnerability (cisco-sa-sxp-68TEVzR)
  • 137655 - Cisco IOS, IOS XE, and NX-OS Software Security Group Tag Exchange Protocol Denial of Service Vulnerability (cisco-sa-sxp-68TEVzR)
  • 137656 - Cisco IOS, IOS XE, and NX-OS Software Security Group Tag Exchange Protocol Denial of Service Vulnerability (cisco-sa-sxp-68TEVzR)
  • 99240 - FreeBSD : xen-kernel -- broken check in memory_exchange() permits PV guest breakout (90becf7c-1acf-11e7-970f-002590263bf5)
  • 21580 - freeSSHd Key Exchange Algorithm String Remote Overflow
  • 147193 - Potential exposure to Hafnium Microsoft Exchange targeting
  • 106394 - Juniper Junos Key Exchange Initialization Handling Memory Exhaustion Remote DoS (JSA10837)
  • 106459 - Weak DH Key Exchange Supported (PCI DSS)
  • 21332 - MS06-019: Vulnerability in Microsoft Exchange Could Allow Remote Code Execution (916803)
  • 61533 - MS12-058: Vulnerabilities in Microsoft Exchange Server WebReady Document Viewing Could Allow Remote Code Execution (2740358)
  • 71320 - MS13-105: Vulnerabilities in Microsoft Exchange Server Could Allow Remote Code Execution (2915705)
  • 103139 - Security Updates for Exchange (September 2017)
  • 118978 - Microsoft Exchange Server Elevation of Privilege Vulnerability (November 2018)
  • 143566 - Security Update for Microsoft Exchange Server 2010 SP 3 (December 2020)
  • 143557 - Security Updates for Microsoft Exchange Server (December 2020)
  • 133617 - Security Updates for Exchange (February 2020)
  • 142888 - Security Updates for Exchange (November 2020)
  • 140427 - Security Updates for Exchange (September 2020)
  • 148476 - Security Updates for Microsoft Exchange Server (April 2021)
  • 146343 - Security Updates for Microsoft Exchange Server (February 2021)
  • 151664 - Security Updates for Exchange (July 2021)
  • 147024 - Security Update for Microsoft Exchange Server 2010 SP 3 (March 2021)
  • 147003 - Security Updates for Microsoft Exchange Server (March 2021)
  • 149393 - Security Updates for Exchange (May 2021)
  • 154999 - Security Updates for Exchange (November 2021)
  • 155962 - Security Updates for Exchange (November 2021) (Remote)
  • 104354 - Trend Micro ScanMail for Exchange 12.x < SP1 Patch 1 CP1755
  • 99399 - Xen Hypervisor XENMEM_exchange Memory Disclosure (XSA-212)

Version


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

Go back to menu.