4 ms·
> You can take over the browser by chaining exploits. Sections 5.1 and 5.2 show two examples. 5.1 is XSS due to using document.write with a user provided strin
by magicalist 6y ago
> You can take over the browser by chaining exploits. Sections 5.1 and 5.2 show two examples.
5.1 is XSS due to using document.write with a user provided string. That's not taking over the browser and is very much possible from JS (it's basically the prototypical XSS example from well before there was wasm).
5.2 is more serious but in node, not the browser, and is barely a chain (two exploits?). It's a way to get a string to eval() if eval() is available in one of the indirect functions. I think the authors also overstate the benefits of ASLR in that case. If that same code was running natively in a server and exposed to direct user input like that, it's very possible an RCE could be made to work.
These examples are simple by design since they're just demonstrations that it's possible, so more sophisticated attacks are possible, but we also shouldn't over extrapolate from them.
- chubot 6y agoYeah I wasn't precise enough, I wrote a better summary here: https://news.ycombinator.com/item?id=26996738 https://news.ycombinator.com/item?id=26996738 tl;dr A bad case is if something like Figma stores your credit card info on the server. If they have a buffer overflow + document.write() of HTML derived from wasm code, the person who controls the image data could steal your credit card info. This is basically example 5.1; Figma is a huge chunk of C++ compiled to wasm, which may process images from other users.