by tptacek · 13y ago · 0 comments
But I wouldn't want to dignify the notion that one piece of Javascript can "validate" other Javascript "files" anyways; the whole notion of Javascript validation is dubious, because what you need to validate is the whole JS runtime, not just individual files. Browsers don't provide tools to do that.
I tried googling javascript runtime (primarily v8) exploitation and haven't been able to find any examples of this ever happening.
Edit: I'm not saying its not plausible, but wouldn't it require root/user access? What benefit would it provide over other type of attacks with that level of access? Just because there's no browser tools to check for it?
http://www.adambarth.com/papers/2009/barth-weinberger-song.p... Cross-Origin JavaScript Capability Leaks: Detection, Exploitation, and Defense
Although these vulnerabilities are imple- mentation errors in WebKit, the presence of the bugs illustrates the fragility of the general architec- ture. (Other browsers have historically had similar vulnerabilities [17, 18, 19].) We detail these vulner- abilities and construct proof-of-concept exploits to demonstrate how an attacker can leverage a leaked JavaScript pointer to inject a malicious script into an honest security origin.
I get what you're driving at, but can't infer what you're conspicuously not explaining in full.
you can probably drive a nail with a screwdriver handle if you try hard enough.
without going back and looking at the mega js, i recall it working as follows
password --> CBC-MAC --> master key --> decrypt RSA private key with derived master key
if you're deriving a key from a password, seems to make sense to use a password-based key derivation function.