Hacking Facebook

JavaScript Sandboxing and XSS Attacks

Jeff Walden

What is XSS?

d(Ajax)/dt > 0 => d(XSS)/dt > 0

Facebook goes one better

FBJS

FBJS

<div onclick="document.getElementById('out')
                       .setTextValue('hovered');">
This is Facebook application code!
</div>
<div id="out"></div>

Preventing XSS: goals of sandboxing

(Goals initially stated by Neil Mix in a blog post)