http://lifehacker.com/5615739/notscript ... -to-chrome
NotScripts Brings Real Script Blocking to Chrome

Yes, it would be nice if Chrome allowed access to more of its internal security APIs but I don't think that will happen anytime soon because I believe they want people to just run javascript by default.Giorgio Maone wrote:You must be joking
This uses the same method (onbeforeload) of recent adblock versions, and does not integrate with Chrome's internal script blocking (which was the API I was and still am waiting for).
In other words, it's too clunky and disconnected (it can't block inline scripts, for instance) to provide enough security value for the hassle.
Furthermore, it doesn't provide any of the security features offered by NoScript beyond 3rd party script blocking, and it can be bypassed in many ways. Therefore it cannot be relied upon as a security protection.
Been there, done that. You'll discover it's much difficult than you think, if you want this to be reasonably hard to bypassoptimalcycling wrote: Also, I believe I have a solution for "indirectly" blocking inline scripts. Since inline scripts don't fire onbeforeload events, I will simply remove the references to the core javascript functions, ie, I will inject code like document.write=null;eval=null;unescape=null;..... This will essentially disable inline scripts because they will not be able to do anything expect simple arithmetic and comparisons.
What was the problem you encountered? Since I'm using an content script that gets run before the real webpage runs and can get an opportunity to reference anything, I have first control and can remove the references to the core javascript functions. Did you find ways to recover references to the core javascript functions after they are nulled?Giorgio Maone wrote:Been there, done that. You'll discover it's much difficult than you think, if you want this to be reasonably hard to bypassoptimalcycling wrote: Also, I believe I have a solution for "indirectly" blocking inline scripts. Since inline scripts don't fire onbeforeload events, I will simply remove the references to the core javascript functions, ie, I will inject code like document.write=null;eval=null;unescape=null;..... This will essentially disable inline scripts because they will not be able to do anything expect simple arithmetic and comparisons.
Some objects just can't be nulled or made inaccessible (e.g. window, document, location), functions can be retrieved by creating a parent object of the same kind or accessing a prototype, and so on.optimalcycling wrote: Did you find ways to recover references to the core javascript functions after they are nulled?
<emphasis is mine>Giorgio Maone wrote:I've been months trying to come up with something half decent, but I gave up because it was not possible releasing something and calling it "NoScript" without deceiving people.