<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>JavaScript Hijacking and How to</title>
<link>http://blog.roodo.com/rocksaying/archives/2955557.html/</link>
<description><![CDATA[Tags: ajax javascript webdev 資安

日前 Fortify 發表了一份文件《Fortify Software Documents Pervasive and Critical Vulnerability in Web 2.0》，描述惡意網站如何透過瀏覽器取得基於 Ajax 及 JSON 規範傳遞之跨網域的隱密資料。它將此方式稱之為 JavaScript Hijacking 。詳細的 Hijacking 內容請至《JavaScript Hijacking Vulnerability Detected》下載文件。


本文將說明 JavaScript Hijacking 概念以及一個範例。
]]>
	</description>
<language>zh-tw</language>
<generator>Roodo Blog System</generator>
<copyright>All Rights Reserved</copyright>
<atom:link href="http://blog.roodo.com/rocksaying/archives/2955557-comment.xml" rel="self" type="application/rss+xml" />
<item>
	<title>回應：JavaScript Hijacking and How to</title>
	<description><![CDATA[對於 JavaScript Hijacking 微軟 ASP.NET AJAX Extension (Altas) 已經有了些初步的回應了: <a href=\'http://weblogs.asp.net/scottgu/archive/2007/04/04/json-hijacking-and-how-asp-net-ajax-1-0-mitigates-these-attacks.aspx\' rel=\'nofollow\'>JSON Hijacking and How ASP.NET AJAX 1.0 Avoids these Attacks</a>]]>
	</description>
	<link>http://blog.roodo.com/rocksaying/archives/2955557.html</link>
	<guid>http://blog.roodo.com/rocksaying/archives/2955557.html#comment-10183323</guid>
		<category>文章回應</category>
	<pubDate>Thu, 03 May 2007 19:26:09 +0800</pubDate>
</item>
<item>
	<title>回應：JavaScript Hijacking and How to</title>
	<description><![CDATA[舊版IE 的 JScript 有很多古怪的行為，我所知道之標準的覆寫方式，不完全適用於舊版IE。我也無意深究。

Fortify 文件中所示範的方式為覆寫後添加 setter 的定義，達到 hijack 的目的。但舊版IE (v5.5/v6) 並不支援 setter ，所以不適用；另一方面，根據規劃中的 ECMA262 第4版草案內容，新版IE 將會支援 setter ，故新版IE (IE7) 理論上可以用 setter 達到 hijack 的目的。但我並未安裝 IE7 ，所以無法證實這一點。

容我提醒，我只說我不知道如何覆寫IE5.5, IE6 的 Object 建構子內容。但其他人，尤其是那些鎖定IE漏洞的 hacker 可能知道怎麼做，所以別誤以為 IE 不受此安全漏洞的影嚮。]]>
	</description>
	<link>http://blog.roodo.com/rocksaying/archives/2955557.html</link>
	<guid>http://blog.roodo.com/rocksaying/archives/2955557.html#comment-4403005</guid>
		<category>文章回應</category>
	<pubDate>Wed, 11 Apr 2007 11:48:11 +0800</pubDate>
</item>
<item>
	<title>回應：JavaScript Hijacking and How to</title>
	<description><![CDATA[您好，文中提到"IE的JScript則用其他方式覆寫建構子"，我嘗試了一下，用prototype也不行，能否請你給個例子，多謝。]]>
	</description>
	<link>http://blog.roodo.com/rocksaying/archives/2955557.html</link>
	<guid>http://blog.roodo.com/rocksaying/archives/2955557.html#comment-4387411</guid>
	<author>gjguo.csie@gmail.com(gjguo)</author>	<category>文章回應</category>
	<pubDate>Tue, 10 Apr 2007 17:42:28 +0800</pubDate>
</item>
<item>
	<title>回應：JavaScript Hijacking and How to</title>
	<description><![CDATA[好文章，谢谢。]]>
	</description>
	<link>http://blog.roodo.com/rocksaying/archives/2955557.html</link>
	<guid>http://blog.roodo.com/rocksaying/archives/2955557.html#comment-4385927</guid>
		<category>文章回應</category>
	<pubDate>Tue, 10 Apr 2007 13:01:14 +0800</pubDate>
</item>
<item>
	<title>回應：JavaScript Hijacking and How to</title>
	<description><![CDATA[谢谢，弥补了我的一些空白]]>
	</description>
	<link>http://blog.roodo.com/rocksaying/archives/2955557.html</link>
	<guid>http://blog.roodo.com/rocksaying/archives/2955557.html#comment-4373049</guid>
		<category>文章回應</category>
	<pubDate>Sun, 08 Apr 2007 21:41:06 +0800</pubDate>
</item>
<item>
	<title>回應：JavaScript Hijacking and How to</title>
	<description><![CDATA[看了一下各方反應，發覺有些人並未查覺危險性，以為這項漏洞也要先在目標網站上植入程式碼。這是錯誤的認知。所以我編輯一次本文，特意在「並不需要入侵目標網站植入任何程式碼」這句話上加上強調記號。

另外，在 session_hijacking.php 的第 24 行產生 JSON 文件的動作中，我特意加上了 ('[', ']') 令其為一個 JSON array 。這是一個語法限制。如果直接回傳一個 JSON object (即 {, }) ，將發生語法錯誤，上述的 hijacking 程式碼便無法運作。在 Dojo team 的 blog 中也有提到這點 (See: <a href="http://dojotoolkit.org/node/619">A Note on "JavaScript Hijacking"</a>)。

不過這項語法限制的可靠度不高，也許有心人士還是有辦法找到突破點。]]>
	</description>
	<link>http://blog.roodo.com/rocksaying/archives/2955557.html</link>
	<guid>http://blog.roodo.com/rocksaying/archives/2955557.html#comment-4359235</guid>
		<category>文章回應</category>
	<pubDate>Sat, 07 Apr 2007 11:55:19 +0800</pubDate>
</item>
</channel>
</rss>