Latest Comments
"mihuleemyuta@hotmail.com"
by baran | Nov 21, 2008 2:53 AM
 
"Hi this is the mail I received Brett Karpman show details Nov 17 (3 days ago) Reply Atten..."
by Rodney Churchyard | Nov 20, 2008 6:13 PM
 
"security through obscurity...shows how detached HIPAA is from reality."
by priceOfFishInChina | Nov 20, 2008 1:19 PM
 
"Umm. no. The 6.5 product is mounting the offline VM image and performing a scan for patch ..."
by eric | Nov 20, 2008 8:15 AM
 
"it's great i tried it"
by divyacharan | Nov 20, 2008 12:24 AM

JavaScript hijacking - a new vulnerability

  • Email a Friend
  • Print Page
JavaScript hijacking - a new vulnerability
By Jacob West,
Sep 13, 2007 7:19 AM
Tags: JavaScript | hijacking | - | a | new | vulnerability
The vulnerability, which can occur in any application that uses JavaScript as a data transport mechanism, can compromise the integrity of the vulnerable website, as well as expose user's sensitive private information.

JavaScript hijacking represents a new and critical attack vector that organisations developing Web 2.0 applications should take immediate steps to avoid. In other words, it's hot.

JavaScript Hijacking allows an attacker to bypass the Same Origin Policy (SOP) in web applications that use JavaScript, often in the form of JavaScript Object Notation (JSON), to communicate confidential information.

The loophole in the SOP is that it allows JavaScript from any website to be included and executed in the context of any other website. Even though a malicious site cannot directly examine data loaded from a vulnerable site on the client, it can still take advantage of this loophole by setting up an environment that allows it to witness the execution of the JavaScript from the vulnerable site.

When JavaScript is used to transport data, this gives the attacker access to values stored in JavaScript data structures and can compromise sensitive information.

There are two fundamental ways to defend against JavaScript Hijacking: (1) Decline malicious requests and (2) prevent direct execution of the JavaScript response.

For an application to detect malicious requests, every request should include a parameter that is difficult for an attacker to guess, such as adding a session cookie to the request as a parameter.

When the server receives a request, it can check to be certain the session cookie matches the value in the request parameter. The second technique for protecting against JavaScript hijacking involves preventing the direct execution of responses that convey information using JavaScript notation.

There are many possible approaches to preventing a JavaScript statement from executing, one of which is to include comment characters around the JavaScript that must be removed before the JavaScript is evaluated.

This technique is effective because the legitimate client application can take advantage of the fact that it is allowed to modify the data it receives before executing it, while a malicious application can only execute it as-is using a

Secure Computing Magazine

 
Ads by Google
Thoughts on this article? Add a comment below.
Be the first to comment on this article.

Report this comment as offensive:

   * Indicates information we require to process your submission.

Name: *
Email: *
Reason for offense: *
Your report will not be displayed.  
Name:
*
 
Email:
(will not be displayed)
*
 
Comment:
(HTML not permitted)
*
 
Validation
*

Enter the code you see below:

 

 
 
 
 
 
Tripwire - Click here to win an iTouch
 
 
 
Vulnerabilities & Exploits Whitepapers