__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN PDF XSS vulnerability announced at CCC [Handler's Diary January 3rd 2007] January 3, 2007 18:00 GMT Number R-096 [REVISED 05 Jan 2007] [REVISED 10 Jan 2007] [REVISED 17 Jan 2007] [REVISED 15 Mar 2007] [REVISED 31 Jul 2007] ______________________________________________________________________________ PROBLEM: A new cross-site scripting attack was announced at the 23rd CCC by Stefano Di Paola and Giorgio Fedon. The gist of the attack is that you are able to get javascript executed by simple having it appended to the PDF's URL. PLATFORM: Adobe Reader 7.0.8 and earlier versions Adobe Acrobat Standard, Professional and Elements 7.0.8 and earlier versions Adobe Acrobat 3D Red Hat Enterprise Linux Extras (v. 4) Solaris 10 Operating System Debian GNU/Linux 3.1 (sarge) DAMAGE: Could allow a remote attacker to execute arbitrary code with the privileges of the targeted user. SOLUTION: At this time, it does not appear Adobe version 8 is affected. ______________________________________________________________________________ VULNERABILITY The risk is MEDIUM. Could allow a remote attacker to execute ASSESSMENT: arbitrary code. ______________________________________________________________________________ LINKS: CIAC BULLETIN: http://www.ciac.org/ciac/bulletins/r-096.shtml ORIGINAL BULLETIN: http://isc.sans.org/diary.php?storyid=1999 ADDITIONAL LINKS: Adobe Security Advisory APSA07-01 http://www.adobe.com/support/security/advisories/apsa07-01.html Adobe Security Advisory APSA07-02 http://www.adobe.com/support/security/advisories/apsa07-02.html Red Hat RHSA-2007:0017-2 https://rhn.redhat.com/errata/RHSA-2007-0017.html Sun Alert ID: 102847 http://www.sunsolve.sun.com/search/document.do?assetkey=1-26-102847-1 Debian Security Advisory DSA-1336-1 http://www.debian.org/security/2007/dsa-1336 CVE: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name= CVE-2006-5857, CVE-2007-0045, CVE-2007-0046, CVE-2007-0048 ______________________________________________________________________________ REVISION HISTORY: 01/05/2007 - added a link to Adobe Security Advisory APSA07-01 addressing the cross-site scripting vulnerability in versions 7.0.8 and earlier of Adobe Reader. 01/10/2007 - updated to note that Adobe Security Advisory APSA07-01 has released a solution. Also, to add a link to Adobe Security Advisory APSA07-02 for server-side workarounds to prevent potential cross-site scripting vulnerabilities in versions 7.0.8 and earlier of Adobe Reader and Acrobat. 01/17/2007 - revised to add a link to Red Hat RHSA-2007:0017-2 for Red Hat Enterprise Linux Extras (v. 4). 03/15/2007 - revised R-096 to add a link to Sun Alert ID: 102847 for Solaris 10 Operating System. 07/31/2007 - revised R-096 to add a link Debian Security Advisory DSA-1336-1 for Debian GNU/Linux 3.1 (sarge). [***** Start Handler's Diary January 3rd 2007 *****] Handler's Diary January 3rd 2007 previous - PDF XSS vulnerability announced at CCC (NEW) Published: 2007-01-03, Last Updated: 2007-01-03 17:40:26 UTC by Toby Kohlenberg (Version: 1) A new cross-site scripting attack was announced at the 23rd CCC by Stefano Di Paola and Giorgio Fedon: http://events.ccc.de/congress/2006/Fahrplan/events/1602.en.html The gist of the attack is that you are able to get javascript executed by simple having it appended to the PDF's URL. This is an example (from GNU Citizen): (line breaks added for aesthetic value) www.google.com/librariancenter/downloads/Tips_Tricks_85×11.pdf#something \ =javascript:function createXMLHttpRequest(){ try{ return new \ ActiveXObject('Msxml2.XMLHTTP'); }catch(e){} try{ return new \ ActiveXObject('Microsoft.XMLHTTP'); }catch(e){} try{ return new \ XMLHttpRequest(); }catch(e){} return null;}var xhr = createXMLHttpRequest(); \ xhr.onreadystatechange = function(){ if (xhr.readyState == 4) \ alert(xhr.responseText);};xhr.open('GET', 'http://www.google.com', true)\ ;xhr.send(null); This doesn't require the ability to write the PDF, just the ability to generate a URL that is based on a PDF hosted on some site. There are a number of good explanations on this. I liked this one: http://www.disenchant.ch/blog/hacking-with-browser-plugins/34 The original paper talks about more than this specific flaw and is certainly worth reading as well. Mitigation: Turning off javascript seems effective at mitigating this. Militant use of the NoScript extension for Firefox would be my recommendation. Of course you have to turn off javascript for _everything_ (specifically the target domains, not the website setting up the attack. in the Disenchant examples you would have to disable scripting for Google, MySpace, Microsoft, Ebay and BofA) but.... [***** End Handler's Diary January 3rd 2007 *****] _______________________________________________________________________________ CIAC wishes to acknowledge the contributions of SANS for the information contained in this bulletin. _______________________________________________________________________________ CIAC, the Computer Incident Advisory Capability, is the computer security incident response team for the U.S. Department of Energy (DOE) and the emergency backup response team for the National Institutes of Health (NIH). CIAC is located at the Lawrence Livermore National Laboratory in Livermore, California. CIAC is also a founding member of FIRST, the Forum of Incident Response and Security Teams, a global organization established to foster cooperation and coordination among computer security teams worldwide. CIAC services are available to DOE, DOE contractors, and the NIH. CIAC can be contacted at: Voice: +1 925-422-8193 (7x24) FAX: +1 925-423-8002 STU-III: +1 925-423-2604 E-mail: ciac@ciac.org Previous CIAC notices, anti-virus software, and other information are available from the CIAC Computer Security Archive. World Wide Web: http://www.ciac.org/ Anonymous FTP: ftp.ciac.org PLEASE NOTE: Many users outside of the DOE, ESnet, and NIH computing communities receive CIAC bulletins. If you are not part of these communities, please contact your agency's response team to report incidents. Your agency's team will coordinate with CIAC. The Forum of Incident Response and Security Teams (FIRST) is a world-wide organization. A list of FIRST member organizations and their constituencies can be obtained via WWW at http://www.first.org/. This document was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. LAST 10 CIAC BULLETINS ISSUED (Previous bulletins available from CIAC) R-086: LiveConnect Crase Finalizing JS Objects R-087: XSS by Setting img.src to JavaScript: URI R-088: Mozilla SVG Processing Remote Code Execution R-089: Mail Header Processing Heap Overflows R-090: XSS Using Outer Window's Function Object R-091: Tar Security Update R-092: Novell NetWare Client for Windows Vulnerabilities R-093: Security Vulnerabilities in the Java Runtime Environment R-094: Crashes with Evidence of Memory Corruption R-095: Apple QuickTime RTSP buffer overflow