3 ms·
The sandbox design makes it very impractical to hack wasm, though. Okay you've got code execution in my browser tab, but now you can't send network requests, re
by jeroenhd 4y ago
The sandbox design makes it very impractical to hack wasm, though. Okay you've got code execution in my browser tab, but now you can't send network requests, read the file system, access contacts, what are you going to do? Run a cryptominer?
I suppose you could access and maybe even exfiltrate data from the application itself but unless you get some kind of reflected XSS down to autoload your malware, your infection clears the second I refresh. When the application authors fix the hole and the user reloads your persistence vanishes.
Wasm won't solve C(++) memory management flaws but it can severely limit the impact they have in practice. In my opinion that's the strong suit of wasm as an application format.
- pjmlp 4y agoWASM authentication module reusing code from something like Heartbleed. Great it doesn't affect the host code, yet it affects the authentication, thus now a plain user might eventually be upgraded into admin. And who knows it doesn't send network request? It is all a matter of what the JavaScript functions imported into the module are capable of, or the code that happens to call into the module and what decisions it does in regards to the returned values.
- jeroenhd 4y agoI don't really understand the scenario you pose. WASM isn't exactly something you run on the backend. If you're writing code that you need to compile to run, what's the point of compiling to WASM when you can generate native binaries that are much faster and much less complex? To me, this stuff only makes sense for optimizing some kind of core logic in a browser game or heavy web application, which hopefully doesn't need to do any authentication at all. I suppose developers could be foolish enough to break the WASM security model by exposing function to connect to arbitrary hosts but code running in the browser is still subject to CORS/CSP. You need to actively work around those to break the security layer and if someone is foolish enough to sabotage their own security that way then I don't think it matters much whether you use WASM or not.
- pjmlp 4y agoThis is on the browser scenario. As for the backend, WebAssembly startups want to bring back Application Servers. As how foolish one might be, as we often discover during pentesting of Web applications, quite often.
- jeroenhd 4y ago> As for the backend, WebAssembly startups want to bring back Application Servers. We're really moving back to the early 2000s. I wonder when websites start working without Javascript again! WASM on the backend makes sense in a few cases (i.e. let customers upload modules in a sandboxed, heavily restricted environment, or whatever) but building your entire application around a speedup format for a Javascript engine while writing low-level code is a new level of ridiculous I didn't even see coming.
- discreteevent 4y agoThere is a good chance that it will happen eventually. Atwood's law is: "Any application that can be written in JavaScript, will eventually be written in JavaScript." But the root cause of this is really that when you get enough volume of activity in some area then the lowest common denominator tends to take over. "Worse is better" should have been written as "Worse is better for adoption" because it is definitely worse for every other attribute. In general, network effects are lowering the quality of everything.
- pjmlp 4y agoHere, for your amusement, WASM modules as Kubernetes containers. https://krustlet.dev/ https://krustlet.dev/ As for your JavaScript remark, well SPAs are now rediscovering SSR, naturally with newer buzzwords like hydration.