I'm looking for a formal characterization of an attack that exploits the prototypical method override feature in Javascript programs. For instance, if an attacker successfully overrides the Object.prototype.toString
method, he/she could get access to objects and data that may be thought to be "hidden" in closures, whenever those "hidden" values have their toString()
methods invoked.
I created a more elaborated example in which an attacking script leaks sensitive information propagated into the Crypto
Javascript API -- see it here in action.
Is this technique/approach a form of XSS attack? If so, is there an established name for it?