28 ms·
A technique from CompSci for reducing risk of malicious JavaScript. Worth posting given many here claim they block ads due to malware risk. The technique needs
by nickpsecurity 10y ago
A technique from CompSci for reducing risk of malicious JavaScript. Worth posting given many here claim they block ads due to malware risk. The technique needs further review for its security and usability.
- Klathmon 10y agoIs this sustainable and comprehensive? Parts like disallowing '_' at the start or end of a method because some browsers have dangerous methods don't fill me with confidence that this is a fool proof solution. It seems like a compiler or iframe would be not only more comprehensive but also wouldn't butcher the language in ways that would make most code need to be adapted.
- pdkl95 10y ago> from CompSci Maybe I'm missing something, but I don't see much that I would consider CS. This is an attempt at an engineering-style workaround. > malware They explicitly include support for spyware with the mouse{over,out} (etc) events. > "ADsafe makes it possible to quickly and reliably determine that script is safe" That's incredibly hard. It's easy to hide arbitrary code even if all you have is a lambda expression[1] ("function () {}" in JavaScript). There are so many sharp corners and inconsistent gotchas in JavaScript - multiplied by the variations between browsers - that identifying a "safe" subset of the language is extremely difficult (or maybe undecidable). Douglas Crockford has been warned[2] almost a decade ago about the insecurity of mixing foreign JavaScript. The language simply wasn't designed with a security model sufficient for running untrusted code. [1] https://codon.com/programming-with-nothing https://codon.com/programming-with-nothing [2] https://www.youtube.com/watch?v=qfBL2sc2zUU https://www.youtube.com/watch?v=qfBL2sc2zUU
- nickpsecurity 10y ago"Maybe I'm missing something, but I don't see much that I would consider CS" It came from CompSci people researching sandboxing of JavaScript. The papers on the left show that. They later turned it into a more engineered solution and convenient web site. Uncommon with CompSci projects. I give them extra credit for that whether the method pans out or not. "They explicitly include support for spyware with the mouse{over,out} (etc) events." Is that limited to the site it executes in or would it have visibility to all sites? And anything you see that would lead to code injection outside hardware-level attacks?
- pdkl95 10y ago> It came from CompSci people researching sandboxing of JavaScript. Ahh! That makes more sense. > site it executes in They seem to be allowing capture of UI events on any element that is selectable through their (limited) query interface. This is probably to allow interactive designs or ad-network "auction" tracking, but it's still spyware.
- alkonaut 10y agoThen just make ADSense2 be a DSL that is translated to js on the client, but which is itself not js? The important thing is to get the major browsers on board so that ad nets have to use it in order not to be blocked by default. (Assuming that browsers have the browser users interests in mind, and not advertisers, this is sketchy at best in the case of Goog)
- jancsika 10y agoThe claim of blocking ads because of malware is likely just a case of people picking the low-hanging fruit to get on with their busy day. If a user actually went to the trouble of searching out and installing an ad-blocker, you can bet there are a plethora of higher-level pains that add-on relieves for them. Properly addressing the malware risk might force them to articulate those higher level reasons (ads eat batteries, delay streaming content, bark sounds, block content, intrude on content, aren't content) but is near 0% likely to convince them to uninstall the blocker.
- SAI_Peregrinus 10y agoIf ads weren't the primary source of malware I'd at least be willing/able to turn the ad blocker off on sites I like and want to support that have non-intrusive ads.
- jancsika 10y agoOk. So you keep the blocker on, but you allow ads on the subset of sites that fit the following criteria: 1. You like and trust the site 2. You want to support the site 3. You trust that the ads displayed on the site are non-intrusive (and if they cease to be that you start blocking ads again) Does anyone know if such a model would generate enough revenue for the web as it exists today to stay in business? Because even if ads become less risky and less intrusive, there's no going back to allowing arbitrary ads from arbitrary sites. Your model seems about as promiscious as a responsible user could be going forward.