query regarding the security of JavaScript

md <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Organization http://groups.google.com
Message-ID <[email protected]>
Hi All,

I am working with the Mozilla source code and have a query regarding
the security of JavaScript on a web page.

I'm trying to replicate the Greasemonkey vulnerability of version
0.3.3  (for some testing purposes) that allowed user scripts to steal
information using GM_XmlHttprequest API. The key to the Greasemonkey
vulnerability was to watch the window object for the point at which
Greasemonkey adds the API functions using the object.watch()
functionality, something like this:

-> window.watch('GM_log', exploit);

I ported the GM 0.3.3 version for Firefox2 but when I "watch" for the
'GM_log' variable, it turns out to be NULL. I guess this is because
Mozilla have fixed this vulnerability long back and therefore 'GM_log'
variable of the extension is not visible to the scripts on the web
page.

Is there a way that I can override the security permissions and access
the "GM_log" defined in the extension?

Thanks,
mohan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.