SlideShare a Scribd company logo
HTML 5The good, the bad, the ugly
A presentation by Mario Heiderich, 2010
Introduction
● Mario Heiderich
➔ Based in Cologne
➔ Grad. Eng. and PhD student
➔ Freelancer and researcher at the RUB
➔ JavaScript, markup and malware research
➔ International speaker
➔ HTML5 Security Cheatsheet [heideri.ch/jso]
➔ PHPIDS [php­ids.org]
➔ @0x6D6172696F [twitter.com]
This Presentation
● HTML5 and DOM Level 3
● Overview and History
● HTML5 and current Browsers
● The Good
● The Bad
● The Ugly
● Discussion
HTML5
„It must be admitted that many aspects of HTML
appear at first glance to be nonsensical and
inconsistent.“
[w3.org/TR/html5/introduction.html#introduction]
History lesson
● 1990 – 1995 :: first revisions derived from SGML and hosted by
CERN and IETF
● 1995 :: W3C took over releasing HTML3.0
● 1997 :: HTML3.2 - many new extensions
● 1998 :: HTML4 - still used today - and DOM Level 1
● 2000 :: DOM Level 2 Core
● 2003 :: DOM Level 2 HTML, XForms
● 2004 :: The idea for HTML5 was born - WHATWG founded
● 2006 - 2007 :: W3C redecided - particiapted in HTML5
● 2007 - now :: WHATWG and W3C collaborate on HTML5
Current Status
● HTML5 is not ready yet – work in progress
● Same for vendor support
● No child of SGML anymore
● W3C != WHATWG, HTML5 != HTML5
● New DOM interfaces
● Webforms 2.0 enhanced
● XHTML5
In short words
● HTML5 brings us
➔ A pile of new tags and structural elements
➔ Many new attributes
➔ Easier ways to create usable websites
➔ Generally a lack of strictness
➔ New form elements
➔ New DOM interfaces and methods
➔ And many more things - we cannot enumerate
them all in two.5 hours...
Browsers
● HTML5 develops
● So do the user agents. Or at least have to.
➔ Opera :: advantage through supporting a dead
specification
➔ Chrome :: release often - release early
➔ IE9 :: a lot of catching up to do – but apparently
motivated!
➔ Firefox :: finally a new parser -
html5.enable=true
Consistency?
● Impossible!
● W3C HTML5 specs are 4.4 MB of text
● WHATWG HTML5 specs – 707 A4 pages
● This is a lot of implementation work
● Don't we forget about
➔ CSS3
➔ ECMAScript 5
➔ SVG
➔ Canvas etc. etc.
So... security?
● Some say HTML5 itself is a vulnerability
● Not that funny - not that wrong
● Secure implementations require
➔ Clear specifications X
➔ Manageable amount of work X
➔ Thorough and diverse testing X
➔ Fast and precise feedback loops X
➔ Quick and comprehensive patch deployment X
Results
● Inconsistent and ever-evolving specs
● Browsers rush for implementation
– [html5test.com] and others
● Webdevs still build buggy websites
● Necessary legacy support
– IE6 is still around … UK gov, PayPal, etc.
● But now for some actual goodies!
The Good
● New form elements and element types enhance
usability
● <input type=“
– range, tel, color, datetime­local, email, url, …
● New <output> tag
● Autofocus and active form elements
● Client-side validation and placeholders
● Form elements - outside the form
More good
● Iframe restrictions <iframe sandbox />
● Seemlessness for iframes
● Local storage mechanisms
● Client side databases
● Geolocation services
● Notification interfaces
● Interaction with USB and RS232 devices
● Multimedia and inline SVG
So good!
● Animations and transformations
● WebGL and 3D acceleration inside the browser
● Video and audio support
● New webfont technologies
● Less Flash and Silverlight – more open
standards
● Accessibility and document structuring
Any bad?
● W3C and WHATWG mean HTML5 to be
➔ An easy way to create interactive and rich
content for everyone
➔ Less XMLish strictness – more open structure
and fun
➔ Simplification instead of over-specification
➔ The focus is neither the server nor the browser
– but the user
➔ HTML4 was screen, XHTML was open –
HTML5 is web
Bad stuff please!
● Hijacking forms with the new form attribute #1
● Stealing personal data via autofill
● Stealing focus and keystrokes #8
● Dossing the client with bad validation regex #14
● Bypassing blacklists with new event handlers #23
● Using harmless attributes to execute JavaScript #10
● Disabling framebusters with sandboxes
● Enough already? No?
The Ugly
● Abusing the history.pushState() API
➔ URL spoofing #103
➔ Redirection to infected websites
➔ Overflowing users history
● Abusing local storage on non-FQDN
●
about:blank is not a domain - or is it?
➔ Cross-medium attacks on Opera
➔ Payload hiding and obfuscation
More Ugliness
● SQL injections on the client
➔
openDatabase() uses SQLite
➔ An 0-day in SQLite affects all user agents
➔ SQL injections in the DOM
➔ DOMSQLI superseding DOMXSS
● Circumventing protection mechanisms with
sandboxed iframes
● Using evil SVG chameleons ?svg
Roundup
● HTML5 does ship awesomeness
● But it also is an actual vulnerability nest
● We now know why
● HTML4 was static - few new vulnerabilities for
years (except for vendor specific extensions like HTML+TIME, Data Islands, HTA, HTC,
ActiveX, -moz-binding, -o-link-source and many many more)
● HTM5 is dynamic - forcing vendors to progress
● That by design leverages insecurity
Discussion
● How to improve the situation?
● Where will we be in two years? Or five?
● How to make the average user understand
risks in the www?
● And what will the average user be like?
● Will there be too many web developers in five
years - or just mashup architects?
● Will we still have servers - or just CDNs?
Questions
● Please feel free to ask and comment!
● Or mail me later on mario.heiderich@rub.de
● Thanks for your time!
Links
● http://simon.html5.org/html5-elements Overview on HTML tags and elements
● http://www.w3.org/TR/html5/ The W3C spec draft
● http://www.whatwg.org/specs/web-apps/current-work/multipage/ The WHATWG spec draft
● http://heideri.ch/jso/ The HTML5 Security Cheatsheet
● http://www.w3.org/TR/html5-diff/ W3C differences between HTML4 and HTML5
● http://en.wikipedia.org/wiki/HTML5 Wikipedia page on HTML5
● http://jeremiahgrossman.blogspot.com/2010/08/breaking-browsers-hacking-auto-complete.html Attacks
against autocomplete and specific input field types
● http://seclab.stanford.edu/websec/framebusting/ Busting frame busting – a paper on framebusting and
clickjacking
● http://code.google.com/p/html5security/w/list Articles on HTML5 security
● http://lists.w3.org/Archives/Public/public-web-security/ W3C HTML security mailing list

More Related Content

PDF
Locking the Throne Room - How ES5+ might change views on XSS and Client Side ...
PDF
Dev and Blind - Attacking the weakest Link in IT Security
PDF
An Abusive Relationship with AngularJS
PDF
Generic Attack Detection - ph-Neutral 0x7d8
PDF
I thought you were my friend - Malicious Markup
PDF
Scriptless Attacks - Stealing the Pie without touching the Sill
PDF
In the DOM, no one will hear you scream
PDF
The innerHTML Apocalypse
Locking the Throne Room - How ES5+ might change views on XSS and Client Side ...
Dev and Blind - Attacking the weakest Link in IT Security
An Abusive Relationship with AngularJS
Generic Attack Detection - ph-Neutral 0x7d8
I thought you were my friend - Malicious Markup
Scriptless Attacks - Stealing the Pie without touching the Sill
In the DOM, no one will hear you scream
The innerHTML Apocalypse

What's hot (20)

PDF
The Image that called me - Active Content Injection with SVG Files
PDF
JavaScript From Hell - CONFidence 2.0 2009
PDF
Copy & Pest - A case-study on the clipboard, blind trust and invisible cross-...
PDF
The Ultimate IDS Smackdown
PDF
Locking the Throneroom 2.0
PDF
ECMAScript 6 from an Attacker's Perspective - Breaking Frameworks, Sandboxes,...
PDF
The Future of Web Attacks - CONFidence 2010
PDF
A XSSmas carol
PDF
Breaking AngularJS Javascript sandbox
PDF
Defcon 20-zulla-improving-web-vulnerability-scanning
PDF
Ruxmon feb 2013 what happened to rails
PDF
Introduccion a HTML5
PPTX
Flash it baby!
PDF
Automated JavaScript Deobfuscation - PacSec 2007
PDF
Biting into the forbidden fruit. Lessons from trusting Javascript crypto.
PDF
The Bleeding Edge
PDF
Defcon CTF quals
PDF
Reverse Engineering Malicious Javascript
ODP
Security and why you need to review yours.
PDF
Finding Needles in Haystacks
The Image that called me - Active Content Injection with SVG Files
JavaScript From Hell - CONFidence 2.0 2009
Copy & Pest - A case-study on the clipboard, blind trust and invisible cross-...
The Ultimate IDS Smackdown
Locking the Throneroom 2.0
ECMAScript 6 from an Attacker's Perspective - Breaking Frameworks, Sandboxes,...
The Future of Web Attacks - CONFidence 2010
A XSSmas carol
Breaking AngularJS Javascript sandbox
Defcon 20-zulla-improving-web-vulnerability-scanning
Ruxmon feb 2013 what happened to rails
Introduccion a HTML5
Flash it baby!
Automated JavaScript Deobfuscation - PacSec 2007
Biting into the forbidden fruit. Lessons from trusting Javascript crypto.
The Bleeding Edge
Defcon CTF quals
Reverse Engineering Malicious Javascript
Security and why you need to review yours.
Finding Needles in Haystacks
Ad

Similar to HTML5 - The Good, the Bad, the Ugly (20)

PPTX
PDF
You Can Work on the Web Patform! (GOSIM 2023)
PDF
"The working architecture of NodeJs applications" Viktor Turskyi
PDF
HTML5 and friends
ODP
PHP South Coast - Don't code bake, an introduction to CakePHP 3
PDF
Making sense of the front-end, for PHP developers
PDF
HTML5 in IE9
PDF
SPDY and What to Consider for HTTP/2.0
PDF
resume
PDF
2014 HTML5 총정리
PDF
Website & Internet + Performance testing
PDF
Why Go Lang?
PDF
Apache Flex and the imperfect Web
PDF
Full stack development
PDF
Cross-platform Desktop application with AngularJS and build with Node-webkit
PDF
Hinting at a better web
PDF
Client vs Server Templating: Speed up initial load for SPA with Angular as an...
PPTX
Instant developer onboarding with self contained repositories
PDF
Behaviour Testing and Continuous Integration with Drupal
PDF
A Period of Transition
You Can Work on the Web Patform! (GOSIM 2023)
"The working architecture of NodeJs applications" Viktor Turskyi
HTML5 and friends
PHP South Coast - Don't code bake, an introduction to CakePHP 3
Making sense of the front-end, for PHP developers
HTML5 in IE9
SPDY and What to Consider for HTTP/2.0
resume
2014 HTML5 총정리
Website & Internet + Performance testing
Why Go Lang?
Apache Flex and the imperfect Web
Full stack development
Cross-platform Desktop application with AngularJS and build with Node-webkit
Hinting at a better web
Client vs Server Templating: Speed up initial load for SPA with Angular as an...
Instant developer onboarding with self contained repositories
Behaviour Testing and Continuous Integration with Drupal
A Period of Transition
Ad

Recently uploaded (20)

PDF
KodekX | Application Modernization Development
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Approach and Philosophy of On baking technology
PPTX
Spectroscopy.pptx food analysis technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Cloud computing and distributed systems.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
MYSQL Presentation for SQL database connectivity
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation theory and applications.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development
“AI and Expert System Decision Support & Business Intelligence Systems”
Approach and Philosophy of On baking technology
Spectroscopy.pptx food analysis technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Mobile App Security Testing_ A Comprehensive Guide.pdf
Cloud computing and distributed systems.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
MYSQL Presentation for SQL database connectivity
The AUB Centre for AI in Media Proposal.docx
sap open course for s4hana steps from ECC to s4
Per capita expenditure prediction using model stacking based on satellite ima...
Electronic commerce courselecture one. Pdf
Encapsulation theory and applications.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Review of recent advances in non-invasive hemoglobin estimation
Diabetes mellitus diagnosis method based random forest with bat algorithm
Programs and apps: productivity, graphics, security and other tools
Unlocking AI with Model Context Protocol (MCP)
Building Integrated photovoltaic BIPV_UPV.pdf

HTML5 - The Good, the Bad, the Ugly

  • 1. HTML 5The good, the bad, the ugly A presentation by Mario Heiderich, 2010
  • 2. Introduction ● Mario Heiderich ➔ Based in Cologne ➔ Grad. Eng. and PhD student ➔ Freelancer and researcher at the RUB ➔ JavaScript, markup and malware research ➔ International speaker ➔ HTML5 Security Cheatsheet [heideri.ch/jso] ➔ PHPIDS [php­ids.org] ➔ @0x6D6172696F [twitter.com]
  • 3. This Presentation ● HTML5 and DOM Level 3 ● Overview and History ● HTML5 and current Browsers ● The Good ● The Bad ● The Ugly ● Discussion
  • 4. HTML5 „It must be admitted that many aspects of HTML appear at first glance to be nonsensical and inconsistent.“ [w3.org/TR/html5/introduction.html#introduction]
  • 5. History lesson ● 1990 – 1995 :: first revisions derived from SGML and hosted by CERN and IETF ● 1995 :: W3C took over releasing HTML3.0 ● 1997 :: HTML3.2 - many new extensions ● 1998 :: HTML4 - still used today - and DOM Level 1 ● 2000 :: DOM Level 2 Core ● 2003 :: DOM Level 2 HTML, XForms ● 2004 :: The idea for HTML5 was born - WHATWG founded ● 2006 - 2007 :: W3C redecided - particiapted in HTML5 ● 2007 - now :: WHATWG and W3C collaborate on HTML5
  • 6. Current Status ● HTML5 is not ready yet – work in progress ● Same for vendor support ● No child of SGML anymore ● W3C != WHATWG, HTML5 != HTML5 ● New DOM interfaces ● Webforms 2.0 enhanced ● XHTML5
  • 7. In short words ● HTML5 brings us ➔ A pile of new tags and structural elements ➔ Many new attributes ➔ Easier ways to create usable websites ➔ Generally a lack of strictness ➔ New form elements ➔ New DOM interfaces and methods ➔ And many more things - we cannot enumerate them all in two.5 hours...
  • 8. Browsers ● HTML5 develops ● So do the user agents. Or at least have to. ➔ Opera :: advantage through supporting a dead specification ➔ Chrome :: release often - release early ➔ IE9 :: a lot of catching up to do – but apparently motivated! ➔ Firefox :: finally a new parser - html5.enable=true
  • 9. Consistency? ● Impossible! ● W3C HTML5 specs are 4.4 MB of text ● WHATWG HTML5 specs – 707 A4 pages ● This is a lot of implementation work ● Don't we forget about ➔ CSS3 ➔ ECMAScript 5 ➔ SVG ➔ Canvas etc. etc.
  • 10. So... security? ● Some say HTML5 itself is a vulnerability ● Not that funny - not that wrong ● Secure implementations require ➔ Clear specifications X ➔ Manageable amount of work X ➔ Thorough and diverse testing X ➔ Fast and precise feedback loops X ➔ Quick and comprehensive patch deployment X
  • 11. Results ● Inconsistent and ever-evolving specs ● Browsers rush for implementation – [html5test.com] and others ● Webdevs still build buggy websites ● Necessary legacy support – IE6 is still around … UK gov, PayPal, etc. ● But now for some actual goodies!
  • 12. The Good ● New form elements and element types enhance usability ● <input type=“ – range, tel, color, datetime­local, email, url, … ● New <output> tag ● Autofocus and active form elements ● Client-side validation and placeholders ● Form elements - outside the form
  • 13. More good ● Iframe restrictions <iframe sandbox /> ● Seemlessness for iframes ● Local storage mechanisms ● Client side databases ● Geolocation services ● Notification interfaces ● Interaction with USB and RS232 devices ● Multimedia and inline SVG
  • 14. So good! ● Animations and transformations ● WebGL and 3D acceleration inside the browser ● Video and audio support ● New webfont technologies ● Less Flash and Silverlight – more open standards ● Accessibility and document structuring
  • 15. Any bad? ● W3C and WHATWG mean HTML5 to be ➔ An easy way to create interactive and rich content for everyone ➔ Less XMLish strictness – more open structure and fun ➔ Simplification instead of over-specification ➔ The focus is neither the server nor the browser – but the user ➔ HTML4 was screen, XHTML was open – HTML5 is web
  • 16. Bad stuff please! ● Hijacking forms with the new form attribute #1 ● Stealing personal data via autofill ● Stealing focus and keystrokes #8 ● Dossing the client with bad validation regex #14 ● Bypassing blacklists with new event handlers #23 ● Using harmless attributes to execute JavaScript #10 ● Disabling framebusters with sandboxes ● Enough already? No?
  • 17. The Ugly ● Abusing the history.pushState() API ➔ URL spoofing #103 ➔ Redirection to infected websites ➔ Overflowing users history ● Abusing local storage on non-FQDN ● about:blank is not a domain - or is it? ➔ Cross-medium attacks on Opera ➔ Payload hiding and obfuscation
  • 18. More Ugliness ● SQL injections on the client ➔ openDatabase() uses SQLite ➔ An 0-day in SQLite affects all user agents ➔ SQL injections in the DOM ➔ DOMSQLI superseding DOMXSS ● Circumventing protection mechanisms with sandboxed iframes ● Using evil SVG chameleons ?svg
  • 19. Roundup ● HTML5 does ship awesomeness ● But it also is an actual vulnerability nest ● We now know why ● HTML4 was static - few new vulnerabilities for years (except for vendor specific extensions like HTML+TIME, Data Islands, HTA, HTC, ActiveX, -moz-binding, -o-link-source and many many more) ● HTM5 is dynamic - forcing vendors to progress ● That by design leverages insecurity
  • 20. Discussion ● How to improve the situation? ● Where will we be in two years? Or five? ● How to make the average user understand risks in the www? ● And what will the average user be like? ● Will there be too many web developers in five years - or just mashup architects? ● Will we still have servers - or just CDNs?
  • 21. Questions ● Please feel free to ask and comment! ● Or mail me later on mario.heiderich@rub.de ● Thanks for your time!
  • 22. Links ● http://simon.html5.org/html5-elements Overview on HTML tags and elements ● http://www.w3.org/TR/html5/ The W3C spec draft ● http://www.whatwg.org/specs/web-apps/current-work/multipage/ The WHATWG spec draft ● http://heideri.ch/jso/ The HTML5 Security Cheatsheet ● http://www.w3.org/TR/html5-diff/ W3C differences between HTML4 and HTML5 ● http://en.wikipedia.org/wiki/HTML5 Wikipedia page on HTML5 ● http://jeremiahgrossman.blogspot.com/2010/08/breaking-browsers-hacking-auto-complete.html Attacks against autocomplete and specific input field types ● http://seclab.stanford.edu/websec/framebusting/ Busting frame busting – a paper on framebusting and clickjacking ● http://code.google.com/p/html5security/w/list Articles on HTML5 security ● http://lists.w3.org/Archives/Public/public-web-security/ W3C HTML security mailing list