{"id":524,"date":"2012-04-09T19:17:57","date_gmt":"2012-04-09T18:17:57","guid":{"rendered":"http:\/\/www.phillips321.co.uk\/?p=524"},"modified":"2012-04-10T19:33:52","modified_gmt":"2012-04-10T18:33:52","slug":"leveraging-html5-to-turbocharge-clickjacking-attacks","status":"publish","type":"post","link":"https:\/\/www.phillips321.co.uk\/2012\/04\/09\/leveraging-html5-to-turbocharge-clickjacking-attacks\/","title":{"rendered":"Leveraging HTML5 to turbocharge clickjacking attacks"},"content":{"rendered":"<p>You have a website and you\u2019ve proven it\u2019s vulnerable to clickjacking, but what use is fooling a user into submitting a form unless you can specify some of the data that the user is submitting within those fields?<\/p>\n<p>We\u2019ve all played games online where you have to match up words to phrases or maybe things like the \u201cimpossible game\u201d where you drag the words to the respective colours.<\/p>\n<p>What about turning a harmless game such as the above into a form submission machine of awesome. Well now with HTML5 \u2013 you can!<\/p>\n<p>It\u2019s all thanks to the drag-and-drop method and in particular the ondragstart method.<\/p>\n<div class=\"codecolorer-container text vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">draggable=\u201dtrue\u201d ondragstart=\u201devent.dataTransfer.setData(\u2018text\/plain\u2019, \u2018Rick Astley\u2019)\u201d<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Use that on anything you want to make draggable \u2013 in my testing I opted for a simple div containing a string, and ask the players to drag and drop the string onto the correct corresponding sentence.<\/p>\n<p>When they click the \u201canswer\u201d button, it submits the jacked site.<\/p>\n<p>So.. users drag the word CSS across to Cascading Style Sheets \u2013 enters \u201cRick Astley\u201d into the search field of videos.yahoo.com then users click the \u201canswer\u201d button \u2013 submits the video search<\/p>\n<p>Now ideally if google didn\u2019t have x- headers set that forbid the use of google in an iframe I\u2019d have gone and \u201ci\u2019m feeling lucky\u201dd it but sadly no autoplaying rick astley for me.<\/p>\n<p>Still the premise is proven.<\/p>\n<p><strong>Edit:<\/strong><br \/>\nNow with added code and a demonstration video.<br \/>\n[youtube=http:\/\/www.youtube.com\/watch?v=u5EBlxTqj_M]<br \/>\nI\u2019m no web developer and quickly ran out of patience when working on the positioning issues so feel free to take, improve and build on it. I was merely creating this just to play with some of the features of HTML5.<\/p>\n<p>Code available here: <a href=\"http:\/\/pastebin.com\/BeenqC19\" target=\"_blank\">http:\/\/pastebin.com\/BeenqC19<\/a><\/p>\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You have a website and you\u2019ve proven it\u2019s vulnerable to clickjacking, but what use is fooling a user into submitting a form unless you can specify some of the data that the user is submitting within those fields? We\u2019ve all played games online where you have to match up words to phrases or maybe things [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/524"}],"collection":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/comments?post=524"}],"version-history":[{"count":25,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/524\/revisions"}],"predecessor-version":[{"id":562,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/524\/revisions\/562"}],"wp:attachment":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/media?parent=524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/categories?post=524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/tags?post=524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}