Google Groups Home
Help | Sign in
Web 2.0 is vulnerable to attack
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  24 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Kush Murod  
View profile
 More options Apr 3 2007, 1:55 am
From: Kush Murod <kmu...@sensorynetworks.com>
Date: Tue, 03 Apr 2007 15:55:44 +1000
Local: Tues, Apr 3 2007 1:55 am
Subject: Web 2.0 is vulnerable to attack
Hi guys,

Article below says all big JS Libraries are vulnerable including JQuery
I didn't quite understand the article, but was hoping for some feedback
on it

http://www.cbronline.com/article_news.asp?guid=484BC88B-630F-4E74-94E...

Cheers,

--
Kush Murod, Web applications developer
Sensory Networks
[E] kmu...@sensorynetworks.com
[W] www.sensorynetworks.com
[T] +61 2 8302 2745
[F] +61 2 9475 0316
[A] Level 6, 140 William Street East Sydney 2011


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Karl Rudd  
View profile
 More options Apr 3 2007, 2:07 am
From: "Karl Rudd" <karl.r...@gmail.com>
Date: Tue, 3 Apr 2007 16:07:59 +1000
Local: Tues, Apr 3 2007 2:07 am
Subject: Re: [jQuery] Web 2.0 is vulnerable to attack
Bah, it's not a new vulnerability, it's always been there and always
been known about.

I call FUD on this.

The following is an excerpt that is the keystone of the whole thing:

"In an example attack, a victim who has already authenticated
themselves to an Ajax application, and has the login cookie in their
browser, is persuaded to visit the attacker's web site. This web site
contains JavaScript code that makes calls to the Ajax app. Data
received from the app is sent to the attacker."

Firstly _don't visit suspect sites_.

Secondly their "example attack" is flawed. As far as I'm aware
JavaScript code on one page does not have access to the cookies of
other webpages. If it does it's a security flaw in the browser,
nothing a JavaScript library can do about it.

Karl Rudd

On 4/3/07, Kush Murod <kmu...@sensorynetworks.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pedro Luz  
View profile
 More options Apr 3 2007, 2:12 am
From: "Pedro Luz" <narvenb...@gmail.com>
Date: Mon, 02 Apr 2007 23:12:54 -0700
Local: Tues, Apr 3 2007 2:12 am
Subject: Re: Web 2.0 is vulnerable to attack
Nice article...

AJAX, as Kevin Murphy said ... "Since Ajax is in its infancy, this is
fair less of a problem than, say, buffer overflows were when they
first came to light, Chess noted. There are not a lot of legacy Ajax
applications that will need to be fixed. So, Fortify wants to
publicize its finding as loudly as possible now to nip the problem in
the bud."... is still a very young way to do things... there will be
alot of things to discover (good and bad), and its "cool" that this
things be found in such and early stage, so that they can be
corrected.

The team beyind jQuery and other libs are already working on that :)
im sure.

On Apr 3, 6:55 am, Kush Murod <kmu...@sensorynetworks.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ⓙⓐⓚⓔ  
View profile
 More options Apr 3 2007, 2:14 am
From: "Ⓙⓐⓚⓔ" <jakeci...@gmail.com>
Date: Mon, 2 Apr 2007 23:14:35 -0700
Local: Tues, Apr 3 2007 2:14 am
Subject: Re: [jQuery] Re: Web 2.0 is vulnerable to attack
Or is it the old problem with domain wide cookies? I give a cookie for
x.com on jake.x.com and you read my cookie on karl.x.com? You still
can't ajax to jake.x.com.

It sounds like disinformation to me!

On 4/2/07, Karl Rudd <karl.r...@gmail.com> wrote:

--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Karl Rudd  
View profile
 More options Apr 3 2007, 2:19 am
From: "Karl Rudd" <karl.r...@gmail.com>
Date: Tue, 3 Apr 2007 16:19:08 +1000
Local: Tues, Apr 3 2007 2:19 am
Subject: Re: [jQuery] Re: Web 2.0 is vulnerable to attack
Yes, sorry, that's what I was refering too about the "old problem".
Should have been a bit clearer.

It only works on "shared" sites.

Karl Rudd

On 4/3/07, Ⓙⓐⓚⓔ <jakeci...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Beeson  
View profile
 More options Apr 3 2007, 2:23 am
From: "Erik Beeson" <erik.bee...@gmail.com>
Date: Mon, 2 Apr 2007 23:23:39 -0700
Local: Tues, Apr 3 2007 2:23 am
Subject: Re: [jQuery] Re: Web 2.0 is vulnerable to attack
Agreed. This comes up every few months. In this case, it looks like
they're talking about JSON data being readable from any host. I guess
they mean if you're getting data via the remote script tag and
callback technique, other sites could do the same thing and access
your data? Seems like a pretty poor way for a legitimate site to work.

IMHO, the fact that forms can be submitted via javascript (no ajax
involved) is a much bigger issue, but if you design correctly, it
isn't a problem.

Regardless, this thread will likely get huge :)

--Erik

On 4/2/07, Karl Rudd <karl.r...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pedro Luz  
View profile
 More options Apr 3 2007, 2:26 am
From: "Pedro Luz" <narvenb...@gmail.com>
Date: Mon, 02 Apr 2007 23:26:20 -0700
Local: Tues, Apr 3 2007 2:26 am
Subject: Re: Web 2.0 is vulnerable to attack
javascript also as the SOP (same origin policy)

On Apr 3, 7:23 am, "Erik Beeson" <erik.bee...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wil Stuckey  
View profile
 More options Apr 3 2007, 3:13 am
From: "Wil Stuckey" <wil.stuc...@gmail.com>
Date: Tue, 3 Apr 2007 02:13:04 -0500
Local: Tues, Apr 3 2007 3:13 am
Subject: Re: [jQuery] Re: Web 2.0 is vulnerable to attack
On 4/3/07, Pedro Luz <narvenb...@gmail.com> wrote:

> javascript also as the SOP (same origin policy)

 actually it doesn't, this is how google adsense for example works.

w


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kenneth  
View profile
 More options Apr 3 2007, 3:27 am
From: Kenneth <jqu...@kenman.net>
Date: Tue, 3 Apr 2007 02:27:39 -0500
Local: Tues, Apr 3 2007 3:27 am
Subject: Re: [jQuery] Web 2.0 is vulnerable to attack

I don't doubt that someone put alot of time into this particular FUD piece,
but once again (just like all the other articles on this subject), no proof
is given. If it's so easy, have it read an arbitrary email from my GMail and
THEN I will take the arguments seriously.

In the mean time, I laugh at all the "the sky is falling" cries.

On 4/3/07, Kush Murod <kmu...@sensorynetworks.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Markus Peter  
View profile
(1 user)  More options Apr 3 2007, 6:56 am
From: Markus Peter <w...@spin.de>
Date: Tue, 3 Apr 2007 12:56:09 +0200
Local: Tues, Apr 3 2007 6:56 am
Subject: Re: [jQuery] Re: Web 2.0 is vulnerable to attack
On 03.04.2007, at 08:07, Karl Rudd wrote:

I would not call this only FUD - the newspaper article is bad and  
FUD, especially the conclusion that the libraries are "vulnerable"  
where in reality the developers using them were probably clueless,  
but the original paper it refers to has a point. It maybe helps if  
you read the original paper at http://www.fortifysoftware.com/servlet/
downloads/public/JavaScript_Hijacking.pdf

You're right in so far as it's an old hat - nevertheless most people  
don't think of these kind of attacks even though Google already fell  
prey to it several times.

Unfortunately, many people seem to misunderstand the way, the attack  
works:
Cookies are not accessed by "other webpages" by this attack. Instead,  
the attack relies on the fact, that browsers will always  
automatically send cookies to the original domain. It's just plain  
old cookie-based XSS applied to JSON data.

What happens is, that if you e.g. have a JSON-outputting URL on your  
page like /api/ultrasecretdata which is secured by cookies and  
another page simply does

<script src="http://yourdomain/api/ultrasecretdata"></script>

then the browser will load the page and execute it as JavaScript. As  
the request goes to your server, your cookie will rightfully be sent  
with it and the request is authenticated, so the server will output  
the data.

Now, it's of course "only data" but what most people forget is, that  
JSON data is executable JavaScript Code: Arrays and Objects are  
constructed, and therefore, their constructors are called. If you  
override the constructor before the script tag, you'll receive the  
data in your own code.

Of course, you could still say, that browsers should not allow  
scripts of different pages interact that way - but they do work that  
way at the moment and it will likely never be changed as too many  
things nowadays rely on the fact that scripts from different servers  
can interact with each-other if they're loaded on the same page - so  
you _have_ to fix it in your application.

There are basically two ways to fix it:
1. Include a secret into the URL. Our own application for example  
always includes the Session ID of an authenticated user as a request  
parameter to the API calls, because then the URL is not guessable  
anymore and it's not possible to include the data on other pages
2. Include some breaker code in the output of your APIs before the  
actual data like e.g. /* */ comments and then remove that data before  
evaling your JSON code.

The second fix is rather easily applied to legacy code, but it's  
plain UGLY and it somehow destroys the reason for using a standard  
format like JSON.

What these guys obviously mean, when they say that frameworks are  
"vulnerable" is, that no frameworks support the developer with that  
task (solution 2) by offering automatic support to throw away the  
execution breakers. I'm actually glad about that - JSON should stay  
JSON and data exchange formats should stay standardized - otherwise  
we're thrown back straight into the 90ies with proprietary APIs.

Now, solution 1 is easily done with jQuery and probably all the other  
libraries mentioned - simply include your secret, most probably the  
session id, as a parameter with every request to APIs which should be  
secured. My suggestion would be to actually extend the jQuery AJAX  
documentation (or include a link to some tutorial in the Wiki or so)  
to point out the issue, if you use JSON only secured by cookies.  
That's the most sensible change to do - I do not think this issue  
justifies any changes to the jQuery code itself as it's only an issue  
of most application developers not thinking about a certain type of  
attack.

--
Markus Peter - w...@spin.de                      http://www.spin-ag.de/
SPiN AG, Bischof-von-Henle-Str. 2b, 93051 Regensburg, HRB 6295  
Regensburg
Aufsichtsratsvors.: Dr. Christian Kirnberger
Vorstände: Fabian Rott, Paul Schmid


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Karl Rudd  
View profile