Full Disclosure mailing list archives

Re: JavaScript exploits via source code disclosure


From: Nick FitzGerald <nick () virus-l demon co uk>
Date: Fri, 07 May 2010 00:17:43 +1200

Ed Carp wrote:

We've got a lot of JQuery code that calls back-end web services, and
we're worried about exposing the web services to the outside world -
anyone can "view source" and see exactly how we're calling our web
services.

Are there any suggestions or guidelines regarding protecting one's
source from such disclosure?  Thanks in advance!

If the details have to be in the JS (really?) then accept that they 
have to be exposed to all and sundry and design to that constraint 
(which may mean deciding that you really don't want to drink the web 
2.0 Kool-Aid after all...).

There are all manner of weaselly described/advertised code "encryptors" 
and such, which are really just obfuscators.  If the code has to run in 
the (JS interpreter of the) client browser, it is necessarily available 
to any marginally competent "attacker" (or even me).  Anyone motivated 
enough (and that will not have to be terribly motivated) will be able 
to untangle the results of such and then try to make sense of the 
remaining representation of your code.



Regards,

Nick FitzGerald


_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/


Current thread: