html5 for security folks
DESCRIPTION
null Delhi Chapter - August 2013 MeetTRANSCRIPT
![Page 1: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/1.jpg)
HTML5 for Security folks!!
Have you upgraded your skillset?
Vaibhav Gupta Security Researcher - Adobe
Twitter: @vaibhavgupta_1
![Page 2: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/2.jpg)
What is HTML5?
• The next revision for HTML
• Tons of new features/technologies/APIs
• Rich multimedia support
• Its just an update….old HTML still works!
• Blah blah…….“Work in progress”
![Page 3: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/3.jpg)
Information Security Impact
• Most attacks are already possible, HTML5 simply makes them easier or more powerful
• Great majority of these vulnerabilities affect the browser and doesn’t have any direct impact on the server
![Page 4: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/4.jpg)
Interesting Features
• Cross Origin Resource Sharing (CORS)
• Web Storage
• IFRAME Sandboxing
• Web Messaging
• Multimedia & Graphics
• Getlocation
• …… many more!
![Page 5: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/5.jpg)
![Page 6: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/6.jpg)
Cross Origin Resource Sharing
![Page 7: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/7.jpg)
![Page 8: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/8.jpg)
![Page 9: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/9.jpg)
![Page 10: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/10.jpg)
OPTIONS /usermail HTTP/1.1
Origin: mail.example.com
Content-Type: text/html
HTTP/1.0 200 OK
Access-Control-Allow-Origin: http://www.example.com,
https://login.example.com
Access-Control-Allow-Methods: POST, GET, OPTIONS
Access-Control-Allow-Headers: X-Prototype-Version, X-Requested-With,
Content-Type, Accept
Access-Control-Max-Age: 86400
Content-Type: text/html; charset=US-ASCII
Connection: keep-alive
Content-Length: 0
Configuring CORS correctly
![Page 11: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/11.jpg)
![Page 12: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/12.jpg)
![Page 13: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/13.jpg)
• Session Hijacking
• Confidential Information Risk
• User Tracking
• Persistent Attack Vectors
![Page 14: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/14.jpg)
IFRAM Sandboxing
• Really good security feature !
• “sandbox” attribute disables form submissions,
scripts, popups etc. <iframe sandbox src=“http://e.com”></iframe>
• Can be relaxed with few tokens <iframe sandbox=“allow-scripts” src=“http://e.com”></iframe>
• !! Disables JS based frame busting defense !!
![Page 15: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/15.jpg)
Content Security Policy (CSP)
![Page 16: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/16.jpg)
![Page 17: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/17.jpg)
![Page 18: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/18.jpg)
![Page 19: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/19.jpg)
Enough of CRAP !
![Page 20: Html5 for Security Folks](https://reader034.vdocument.in/reader034/viewer/2022042700/557c9edad8b42aee3b8b47fb/html5/thumbnails/20.jpg)
References:
• Examples: slides.html5rocks.com
• Slides content: prezi.com/k2ibkogftt2i/understanding-html5-security
• And……google.com