XML entity expansion

XML entity expansion

En informatique, l'XML entity expansion ou Billion laughs ou lol flow est une attaque de type déni de service visant les parseurs XML. Cette attaque peut aussi servir de vecteur pour faciliter des attaques par dépassement de tampon

Sommaire

Principe de l'attaque

L'attaque XML entity expansion repose sur une particularité du standard XML qui permet la déclaration récursive d'entités XML sans aucune limite de profondeur ou de longueur des éléments. L'attaquant peut donc donner une très grande longueur au résultat censé être produit lors de l'analyse lexicale du document XML. Ainsi, le déni de service est provoqué par le parseur XML tentant de lire le document avec toutes ses entités décrites de manière récursive, ce qui peut potentiellement provoquer un dépassement des capacités de la machine ciblée.

Exemple de code

Dans cet exemple, 128 entités XML sont déclarées dans le doctype du document. Elle contiennent chacune deux appels à l'entité déclarée précédemment, sauf la première qui affiche simplement la chaine "Ha !". Dans le document, la dernière entité déclarée est appelée et, par conséquent, toutes les autres sont appelées en cascade jusqu'à afficher 2^129 caractères au final (680564733841876926926749214863536422912).

<!DOCTYPE root [
<!ENTITY ha "Ha !">
<!ENTITY ha2 "&ha; &ha;">
<!ENTITY ha3 "&ha2; &ha2;">
<!ENTITY ha4 "&ha3; &ha3;">
<!ENTITY ha5 "&ha4; &ha4;">
...
<!ENTITY ha128 "&ha127; &ha127;">
]>
<root>&ha128;</root>

Notons que c'est de cet exemple que l'attaque tient ses surnoms de "Billion laughs" ("milliards de rires" en anglais) et "lol flow" ("inondation de lol" en anglais) puisqu'il afficherait réellement des milliards de "Ha !" en résultat.


Voir aussi

Articles connexes

Liens externes



Wikimedia Foundation. 2010.

Contenu soumis à la licence CC-BY-SA. Source : Article XML entity expansion de Wikipédia en français (auteurs)

Игры ⚽ Поможем написать курсовую

Regardez d'autres dictionnaires:

  • XML — Infobox file format name = Extensible Markup Language icon = logo = extension = .xml mime = application/xml, text/xml (deprecated) type code = uniform type = public.xml magic = owner = World Wide Web Consortium genre = Markup language container… …   Wikipedia

  • List of XML and HTML character entity references — In SGML, HTML and XML documents, the logical constructs known as character data and attribute values consist of sequences of characters, in which each character can manifest directly (representing itself), or can be represented by a series of… …   Wikipedia

  • Push Access Protocol — PAP is a protocol defined in WAP 164 of the Wireless Application Protocol suite from the [http://www.wapforum.org Open Mobile Alliance] . PAP is used for communicating with the Push Proxy Gateway, which is usually part of a WAP Gateway.PAP is… …   Wikipedia

  • billion laughs — n. An online attack that attempts to disable a website by sending a specially formatted sequence of characters such as lol and ha . Example Citations: This is called the Billion Laughs attack without going too far into the nuances of XML trickery …   New words

  • Tax haven — A tax haven is a place where certain taxes are levied at a low rate or not at all. Individuals and/or firms can find it attractive to move themselves to areas with lower tax rates. This creates a situation of tax competition among governments.… …   Wikipedia

  • YAML — (IPAEng|ˈjæməl, rhymes with camel ) is a human readable data serialization format that takes concepts from languages such as XML, C, Python, Perl, as well as the format for electronic mail as specified by RFC [http://www.rfc… …   Wikipedia

  • XBRL — infobox file format name = eXtensible Business Reporting Language name = extension = .xbrl, .xml mime = application/xml owner = XBRL International genre = Markup language extendedfrom = XML standard = [http://www.xbrl.org/Specifications/ XBRL 2.1 …   Wikipedia

  • Spore (2008 video game) — Spore Spore box art (2008) Developer(s) Maxis Publisher(s) Electronic Arts …   Wikipedia

  • Help:Template — Wiki markup Basic markup Text, links, and talk pages Visual files Sound files Tables Template editing Using HTML …   Wikipedia

  • History of Pakistan — also see History of AJK · Balochistan · G B · KPK · Punjab · Sindh Timeline of Pakistan …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”