{"id":103,"date":"2010-07-19T10:07:52","date_gmt":"2010-07-19T09:07:52","guid":{"rendered":"http:\/\/www.floyd.ch\/?p=103"},"modified":"2011-07-28T12:27:04","modified_gmt":"2011-07-28T11:27:04","slug":"location-based-xss-attacks","status":"publish","type":"post","link":"https:\/\/www.floyd.ch\/?p=103","title":{"rendered":"Location based XSS attacks"},"content":{"rendered":"<p>There is always something new to learn&#8230; Didn&#8217;t know <a href=\"http:\/\/www.thespanner.co.uk\/2008\/12\/01\/location-based-xss-attacks\/\">this<\/a> little trick. A very simple example:<\/p>\n<p>A website has a reflected XSS vulnerability (echoes the parameter abc in this example), but escapes &quot; to &amp;quot;. We use the property that web browser do not send the fragment part of an URI (everything after the hash character #) to the web server:<\/p>\n<p>http:\/\/example.com\/index.php?abc=&lt;script&gt;eval(location.hash.slice(1))&lt;\/script&gt;#alert(&#8220;XSS!!!&#8221;);<\/p>\n<p>See <a href=\"http:\/\/www.thespanner.co.uk\/2008\/12\/01\/location-based-xss-attacks\/\">the page above<\/a> for more advanced examples. This technique solves the escaping problem and the server logs never show the Javascript attack code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is always something new to learn&#8230; Didn&#8217;t know this little trick. A very simple example: A website has a reflected XSS vulnerability (echoes the parameter abc in this example), but escapes &quot; to &amp;quot;. We use the property that &hellip; <a href=\"https:\/\/www.floyd.ch\/?p=103\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-103","post","type-post","status-publish","format-standard","hentry","category-web-penetration-testing"],"_links":{"self":[{"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/posts\/103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=103"}],"version-history":[{"count":8,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/posts\/103\/revisions"}],"predecessor-version":[{"id":263,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/posts\/103\/revisions\/263"}],"wp:attachment":[{"href":"https:\/\/www.floyd.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}