Experts Say Ajax Not Inherently Insecure 82
An anonymous reader writes "Jeremiah Grossman (CTO of WhiteHat Security) has published Myth-Busting - an article dismissing the hyped-up claims that AJAX is insecure. He says: 'The hype surrounding AJAX and security risks is hard to miss. Supposedly, this hot new technology responsible for compelling web-based applications like Gmail and Google Maps harbors a dark secret that opens the door to malicious hackers. Not exactly true ... Word on the cyber-street is that AJAX is the harbinger of larger attack surfaces, increased complexity, fake requests, denial of service, deadly cross-site scripting (XSS) , reliance on client-side security, and more. In reality, these issues existed well before AJAX. And, the recommended security best practices remain unchanged.'"
Strawman (Score:3, Interesting)
Vulnerability in practice is just as bad or worse (Score:5, Insightful)
It's not the (non-existent?) inherent security problems in the bundle of techniques we're referring to, it's the weaknesses that show up in the practice of shoddy implementation, cheezy hosting platforms, etc. There's nothing wrong with AJAX, it's the AJAX-envy among less sophisticated operators that we have to worry about. We just have to quit saying it's 'easy' to implement, because none of the underlying bits and pieces are (in terms of being bullet-proof) are 'easy,' and a browser-agnostic soup of a couple dozen of those bits is that many times harder.
Re:Vulnerability in practice is just as bad or wor (Score:2)
Right, that's what I was about to say. The only vulnerability I've seen that I would say was AJAX-specific was that someone put security on the main page, but on none of the little ajax widgets. It just didn't occur to this person that securing the widgets was necessary - probably because what we're used to when programming on the web is a main page (that is secure) and libraries that can only be called on the server side.
Someone who
Enabling Javascript AT ALL is the main risk (Score:2)
It is of course possible for well-intentioned Javascript or AJAX writers
Time to kill another myth (Score:2)
Without Scripting enabled.
While the developed technique is still quite noisy and fairly obvio
Best security practices (Score:2)
> One of the best ways to protect yourself is to turn off Javascript in your browser settings.
The more things change, the more things stay the same.
Best security practice has always been to turn off ActiveX, Javascript, Flash, and any other means by which untrusted executable content is automatically downloaded to one's machine and then automatically executed.
Re: (Score:3, Interesting)
Is javascript really that horrible? I know it can be used in annoying ways, how difficult is it to do something outside of superficial changes to the browser?
I'm really asking. It seems like you should be able to have a simple scripting language that can only really manipulate superficial aspects of web pages without any real increase to the security risk. I thought this was what javascript was. Am I wrong? If so, why doesn't someone replace javascript with something better.
Re: (Score:2)
That being said, the NET without javascript is one damn boring beast. The only interaction you can then have with your page are links and submit buttons. Might as well read a book.
Re: (Score:2)
As for YouTube, or anything else that requires Flash or something to work, well, I live without.
Re: (Score:2, Insightful)
Is javascript really that horrible?
Yes.
I know it can be used in annoying ways, how difficult is it to do something outside of superficial changes to the browser?
A computer is practically worthless to most people if you cannot use it to browse the internet nowadays. So, forget about things outside the browser, and start thinking about user-website interaction through the browser. You can rely on so many trivial vectors to build an effective attack to manipulate a user's browsing experience, and in the case of most sheeple they'll be none the wiser. And the proliferation of it with the latest AJAX fad simply means more people are likely to have it on globally b
Re: (Score:2)
But it's scope of manipulation is such that it can be effectively used to dupe gullible and/or less tech-savvy users into doing something foolish...
What kind of "something foolish"? I'm just wondering, what are the limits to these sorts of things? Phishing?
I always try to train people to distrust the internet, but you can't keep people from being stupid. Can javascript be used to open software firewall ports, or establish some kind of tunneling? Can it execute arbitrary code on the client machine? Ca
Re: (Score:2)
Re: (Score:2)
I'm not sure about ActiveX. Do we need a replacement, or do we just need to get rid of it?
But web applications and interactive/animated web pages are too useful and popular to expect they'll just go away. If the current mixture of PHP, HTML, CSS, Javascript, and XML is too inefficient and insecure, then by all means, I'd like to encourage people to come up with something better. I'd assume it's a bit harder than it sounds, though.
Re:Best security practices (Score:4, Insightful)
Sites should function without script for accessibility and only the bad guys would stand to lose from a more realistic approach to security by browser vendors.
When you can write a new version of Google's spreadsheet program that uses only HTML and CSS, I'll go along with the idea that we should get rid of javascript.
Re: (Score:2)
Sure, I'm not saying there aren't problems with javascript. I'm saying you can't expect to get rid of it without offering an alternative. Personally, I'm not sure I see a valid justification for javascript being able to make pop-ups or resize windows and such. If there are security problems, they should be addressed.
But Google's spreadsheet program is a terrific example, in that people want web applications. It can be extremely useful to have an application that feels like a desktop application, but ca
Re: (Score:1)
Re: (Score:1)
Re: (Score:2)
While I understand your objection to it -- which is essentially the most common objection to Javascript -- let me rephrase it, albeit in a deliberately provocative manner: "any tool to make the web-browsing experience more advanced than an IBM mainframe terminal can be exploited, and therefore should not be used."
There obviously are dangers to client-side scripting, and our current solutions could arguably handle them better. But are we really going
Re:Best security practices (Score:5, Funny)
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Insightful)
Of course that is true. It's just that it's a real pain in the ass. Well, no mortal being requires ActiveX for any reason, and I block the horror that is Flash with the (truly joyous and wonderful) Flashblock extension - and rarely ever allow it to run, mostly just for YouTube.
It's the Javasc
Re: (Score:1)
1. user gets default web page, like "index.html" that is a combination of HTML/SVG/CSS.
2. user reads web page.
3. user fills out form.
4. user 'submits' form to a web service, (for me, web services are like console programs, but output is to a web browser).
5. web service edits input.
6. web service creates XML with a XSLT preprocessor stateme
Yeah... (Score:1, Offtopic)
Existing Best Practices (Score:2, Insightful)
With open-source, you can examine the source before you run the program, and can take steps to ensure that the program you run is compiled from the source you examined and that it's unchanged since the last time you ran the program. There's no good way to do the same thing with Javascript
"Not trusting someone who
Re: (Score:2)
JavaScript is open plain old text. You're free to review the code for every website you visit before running it.
Re: (Score:1)
Where the heck did this hype come from? (Score:3, Insightful)
All AJAX really gives you is that first 'A': asynchronous. All the other underlying mechanics of client-to-server communications over HTTP apply. This means that your security checklist is absolutely no different than using a good old-fashioned [form].
To slam AJAX as insecure as a technology is just bad thinking to begin with - it's a tool, that's all. Whether or not it's used in a secure fashion is really more a best-practice and/or training issue.
Besides, didn't we already go over all this when Web-Services were a big deal?
Re: (Score:1)
Re: (Score:1)
Sure this is kinda out there and the simple response is to change your modems password or t
Re: (Score:1)
IE 6.0 on the other hand merely says "This page is accessing information that is not under its control" and gives you a Yes/No choice.
Re: (Score:1)
I don't think it's similar to a FORM at all, you can get the user to access other sites that they wouldn't normally access and get a parseable response from that site (as I mentioned above). I plan on testing this out some more with a friend of mine to see if I can grab their modems information remotely.
If you're using AJAX in a legitimate fashion (eg, requesting information from the original server) then yeah, it is as si
That article was a mixed bag (Score:4, Interesting)
His advice about keeping web apps secure is sound and practical but incomplete. The last OWASP conference I went to, one of the speakers pointed out that there's an Ajax development toolkit out there in which you can't tell a priori whether a piece of functionality you program will end up on the client or on the server. "Avoid toolkits like that" should be on the list of security precautions.
>AJAX is a web browser (client-side) technology. It does not execute on the server.
The XMLHttpRequest certainly does execute on the server and allows a range of parser attacks that you were less likely to get with other technologies. Which would you rather validate, a set of CGI parameters or a blob of XML?
Re: (Score:2)
Hm... does it? Wouldn't that require a Javascript interpreter in the web server?
Re: (Score:2)
I doubt it. I suspect that it just needs an XML parser to read data from an HTTP Request.
Re: (Score:2, Informative)
The XMLHttpRequest certainly does execute on the server and allows a range of parser attacks that you were less likely to get with other technologies. Which would you rather validate, a set of CGI parameters or a blob of XML?
The XMLHttpRequest looks to the server just like any other HTTP request, with parameters passed the exact same way as you would pass them to a CGI program. The only side that needs to parse a bunch of XML is the client, which is not much of a security problem.
Re: (Score:1)
So it seems that it was intended for bidirectional XML-based communication.
Re: (Score:2, Insightful)
Um, a blob of XML. Quoting and escape characters are a big source of vulnerabilities. XML has well-defined quoting rules. CGI parameters have no structure, so structure must be done ad hoc. XML structure can be validated on the server using XML Schema or Relax, or other mechanisms.
Fortran in Haskell (Score:4, Interesting)
Put another way, it's a lot easier to not write Fortran in Haskell than it is in C.
Yeah - (Score:1)
Re: (Score:1)
deadly cross-site scripting (Score:3, Insightful)
Attack surfaces plural (Score:2)
Indeed AJAX is not a new technology but a set of existing technologies in combination. Here's the issue though. JavaScript is a known point of vulnerability for clients. Secure clients may be hardened against attacks by disabling JavaScript. Good web design
My experience (Score:2)
My second web game, called Grand Strategy (www.denizengames.com), is a full fledged Ajax application (written using DWR and Dojo) and the game hasn't been hacked (that I know of). Of course, I can only hope if those same Russian hackers hit it, they are as kind as they wer
Re: (Score:2)
It looks like they fed your server polonium this time.
Gmail vs. Outlook Web Access (Score:1)
Gmail and OWA both use AJAX. Heck, Microsoft created the XMLHTTPRequest object. Comparing Gmail to OWA to prove this point just doesn't make sense.
Re: (Score:3, Interesting)
If Bandwidth Were Infinite... (Score:1)
In the long term bandwidth will be (practically) infinite and whether processing is done on the server or the client will become irrelevant except that server-based processing will always be more secure and controllable.
AJAX is a temporary tool to enhance client-server interactivity until almost everyone has a high-speed Internet connection. Once that occurs such hacks as AJAX will disappear.
And good riddance! Because of it's arcane nature, security problems and greater developme
Re: (Score:2)
Although I suppose you could implement that by refreshing the whole page every time. But that would also use up a lot more CPU.
Re: (Score:2)
Lack of understandig (Score:2)
So it is not that using AJAX itself is insecure. It is that probably lot of people will try to make AJAX apps since it is trendy right now. But AJAX *is* quite complicated or just new stuff. Somebody withou
Oh good golly, come on ! (Score:2)
anything relegated to client side is exploitable to hell.
I'll tell you now and I'll tell you again (Score:2)
Avoiding XSS and Drive-by scripting (Score:1)
Two of the mistakes that I've found easier to make with Ajax apps are XSS and drive-by-scripting attacks.
XSS attacks arise when a user can put text on your site that runs with the domain privileges of your site. Once they can do that, it's easy to steal user information, cookies, etc. and send it back, or make modifications to user
It's not that it's inherently insecure (Score:2)
I wish there was some HTML attribute or some simple way of telling the user's browser things like "Don't let any of this part of the DOM tree be scripted from outside", or "this script is only allowed to do AJAX from these domains". Sort of like SELinux for HTML.