4 ms·
Could someone please explain to me why there is so much focus on Spectre vulnerabilities in Javascript and not really any on HTML/CSS, when it seems that a serv
by mehrdadn 9y ago
Could someone please explain to me why there is so much focus on Spectre vulnerabilities in Javascript and not really any on HTML/CSS, when it seems that a server could also be able to cause the client to perform speculative execution via pure HTML? Or is it not possible for some reason? The focus on Javascript as though it's somehow special is rather baffling to me, making me wonder whether I'm really understanding the fundamental issues. (?)
- gaius 9y agoBecause JS is JIT compiled in a way that HTML isn’t - you can guess what machine instructions a+1 will compile into, its not so clear how a table layout say, will actually execute
- Sir_Substance 9y ago>The focus on Javascript as though it's somehow special is rather baffling to me One of the most common ways major ad networks get compromised to the extent that they serve malware to hundreds of thousands of web users (this happens at least once a year) is that they hotlink to JS libraries, that hotlink to JS libraries, that hotlink to more JS libraries. If you use a script blocker, it's not that uncommon to see that once you get down far enough, scripts are being loaded from bare IP addresses rather than domain names. Every now and again, someone compromises one of these deep-nested hotlinked JS files and maliciously modifies the javascript, and random sites all over the web dutifully serve the malware. It's not that I don't trust the first-party website owners, more like I don't trust their friends friends friend.
- dhimes 9y agoThis is so annoyingly true. So when you start to allows scripts because you need the website to work, you reload and then see a bunch of new scripts were loaded that you didn't see before. It's a total shitshow. EDIT: I would love a list of minimum required scripts for certain sites. It's painful to fight through what I need- and I really resent it when I am a PAYING FUCKING CUSTOMER.
- IshKebab 9y agoHow on earth would you exploit spectre using pure HTML?
- em3rgent0rdr 9y agoHTML is code too. Just write the right sequence of HTML that will train the branch predictor to speculative jump to some address in the HTML representing malicious machine code.
- krapp 9y agoThis may be a dumb question but how would one get branch prediction from HTML if HTML doesn't have conditional statements? There shouldn't be any branches to predict.
- coldacid 9y agoThere are plenty of conditionals in the rendering engine of a browser, especially with regards to managing layout.
- krapp 9y agoFair enough.
- AnimalMuppet 9y agoThat would be a browser-specific exploit, though. In fact, it might be specific to the exact build of the browser.
- em3rgent0rdr 9y agoThe browser's html engine will still do conditional jumps based on the HTML. One attack [1]: "Decompressors, especially in HTTP(S) stacks. Data decompression inherently involves a large number of steps of "look up X in a table to get the length of a symbol, then adjust pointers and perform more memory accesses" — exactly the sort of behaviour which can leak information via cache side channels if a branch mispredict results in X being speculatively looked up in the wrong table. Add attacker-controlled inputs to HTTP stacks and the fact that services speaking HTTP are often required to perform request authentication and/or include TLS stacks, and you have all the conditions needed for sensitive information to be leaked." [1] http://www.daemonology.net/blog/2018-01-17-some-thoughts-on-spectre-and-meltdown.html http://www.daemonology.net/blog/2018-01-17-some-thoughts-on-...