Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.

Slides:



Advertisements
Similar presentations
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Advertisements

Defining XML The Document Type Definition. Document Type Definition text syntax for defining –elements of XML –attributes (and possibly default values)
OWASP Secure Coding Practices Quick Reference Guide
XML 6.3 DTD 6. XML and DTDs A DTD (Document Type Definition) describes the structure of one or more XML documents. Specifically, a DTD describes:  Elements.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
XML Document Type Definitions ( DTD ). 1.Introduction to DTD An XML document may have an optional DTD, which defines the document’s grammar. Since the.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Document Type Definitions
Flash Crowds And Denial of Service Attacks: Characterization and Implications for CDNs and Web Sites Aaron Beach Cs395 network security.
Document Type Definitions. XML and DTDs A DTD (Document Type Definition) describes the structure of one or more XML documents. Specifically, a DTD describes:
Web Proxy Server Anagh Pathak Jesus Cervantes Henry Tjhen Luis Luna.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike.
Is Your Website Hackable? Check with Acunetix Web Vulnerability Scanner. Acunetix Web Vulnerability Scanner V9.
Users’ reviews of TuneUp Utilities 2011 A brief Introduction of types of software Install Internet Information Services Install Microsoft Office 2010.
Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes, Harvard University Extension School — Cambridge, MA The Web Wizard’s Guide.
XML What is XML? XML v.s. HTML XML Components Well-formed and Valid Document Type Definition (DTD) Extensible Style Language (XSL) SAX and DOM.
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
XP 1 DECLARING A DTD A DTD can be used to: –Ensure all required elements are present in the document –Prevent undefined elements from being used –Enforce.
SAX. What is SAX SAX 1.0 was released on May 11, SAX is a common, event-based API for parsing XML documents Primarily a Java API but there implementations.
1 Tutorial 13 Validating Documents with DTDs Working with Document Type Definitions.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyrighted material John Tullis 10/17/2015 page 1 04/15/00 XML Part 3 John Tullis DePaul Instructor
XML - DTD Week 4 Anthony Borquez. What can XML do? provides an application independent way of sharing data. independent groups of people can agree to.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike.
Module 8 : Configuration II Jong S. Bok
PwC New Technologies New Risks. PricewaterhouseCoopers Technology and Security Evolution Mainframe Technology –Single host –Limited Trusted users Security.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
Protecting Browsers from Extension Vulnerabilities Paper by: Adam Barth, Adrienne Porter Felt, Prateek Saxena at University of California, Berkeley and.
ITGS Network Architecture. ITGS Network architecture –The way computers are logically organized on a network, and the role each takes. Client/server network.
When we create.rtf document apart from saving the actual info the tool saves additional info like start of a paragraph, bold, size of the font.. Etc. This.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike.
What is XML? eXtensible Markup Language eXtensible Markup Language A subset of SGML (Standard Generalized Markup Language) A subset of SGML (Standard Generalized.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Overview on Web Caching COSC 513 Class Presentation Instructor: Prof. M. Anvari Student name: Wei Wei ID:
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Week-9 (Lecture-1) XML DTD (Data Type Document): An XML document with correct syntax is called "Well Formed". An XML document validated against a DTD is.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
CITA 330 Section 2 DTD. Defining XML Dialects “Well-formedness” is the minimal requirement for an XML document; all XML parsers can check it Any useful.
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
A very brief introduction
Error Message Handling
^ About the.
1Y0-203 Dumps PDF Are You Worried About Citrix XenApp and XenDesktop 7.15 Administration 1y0-203 dumps1y0-203 braindumps1y0-203 study material1y0-203 dumps.
RMS with Microsoft SharePoint
Access Control and Site Security
Presentation transcript:

Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP Foundation OWASP 1 Flash Talk – XML DTD Attacks Jesse Ou Cigital Feb 11 th 2010

OWASP XML DTD Attacks - Overview  Not “new” – has been around since at least 2002 (Gregory Steuck)  XML is used extensively everywhere!  Popularity of these attacks have increased with XML web services 2

OWASP XML DTD Attacks - Overview  Results from weak input validation of user supplied Document Type Definition (DTD) and XML values  Most popular parsers are vulnerable by default – Xerces, SAX, MSXML, etc.  In recent experience, even the most hardened client systems are vulnerable to these attacks  Developers are not very aware of DTD issues, and don’t implement the relevant security controls 3

OWASP XML Entities  In accordance with the XML specification, most XML parsers support entity declarations in a document’s DOCTYPE section  Built in entities include < and > that map to respectively  User defined entities are also possible, and these can be external or internal  The XML parser will try to resolve these entities with their corresponding values 4

OWASP Entity Examples  Internal Entity Example: 5 ]> &copyrightStatement; Warning: This program is protected by copyright law

OWASP Entity Examples  External Entity Example: 6 <!DOCTYPE foo [ ]> &copyrightStmtFromFile; Warning: This program is protected by copyright law

OWASP Decompression Bomb – The Billion Laughs Attack  An attacker can specify entity definitions in terms of another entity: 7 <!DOCTYPE foo [ ]> &laugh1; haha

OWASP Decompression Bomb – The Billion Laughs Attack  An attacker can cause the parser to use up lots of memory (Gigabytes) and CPU (90%+ utilization) in a very short period of time – known as the Billion Laughs Attack 8 <!DOCTYPE billion [ ]> &laugh21;

OWASP Successful XXE Exploitation  In this example, the /etc/passwd file on the server is retrieved by the attacker 9

OWASP Successful Billion Laughs Exploitation  In this screenshot, several seconds after a 24 th order attack, CPU usage increased to 89% and memory spiked to 885 MB. After a few minutes, and 3 GB of RAM later, the server stopped responding! 10

OWASP Detection in Code 11 Vulnerable Java Example – SAX parse() method: Vulnerable.NET Example – MSXML Load() method:

OWASP Remediation  Strong Input Validation of user specified data in the XML message can prevent entity references  Should a user’s name really be ‘&foobar;’ ??  In your design, consider whether the client should really be able to specify full XML messages (including DTDs)  Ideally, disallow DTDs in user-specified XML  Configure XML parsers to limit DTD entity expansion, and in general, XML entity depth  Newer Java parsers have a expansion limit of 64,000. Attackers can still make lots of these expensive requests!  Configure XML parsers to not resolve entities 12

OWASP References  Gregory Steuck “XXE attack”   Elliotte Harold “Configure SAX for secure processing   MSDN – System.XML Security Considerations   More questions? Feel free to ask me offline – 13

OWASP Thank You!  More questions? Feel free to ask me offline – 14