web-dev-qa-db-ja.com

ASP.NET HTTP応答分割攻撃

既定では、Response.Redirectを実行すると、ASP.NETはHTTP Response Splitting攻撃をチェックします。

Response.Redirect("/MySite/Default.aspx?lang=foobar%0d%0aContentLength:%200%0d%0a%0d%0aHTTP/1.1%20200%20OK%0d%0aContentType:%20text/html%0d%0aContentLength:%2019%0d%0a%0d%0a<html>Shazam</html>");

結果-エラーページ:

A potentially dangerous Request.QueryString value was detected from the client (lang="...th: 19

<html>Shazam</html>").

Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case. 

デフォルトのASP.NET Webサイト構成でHTTP応答分割攻撃を実行する他の方法はありますか? ASP.NET MVCはどうですか?

8

これは迷惑なほど簡単な答えになるでしょう[〜#〜] but [〜#〜] ...

更新されたASP.NET(またはMVC)サーバーで応答分割攻撃を実行する唯一の方法は、アプリケーション自体が生のHTTP応答を書き戻す場合です。 。
はい、もちろん当然のことながらプログラマはそうしません...しかし、60%のプログラマがでない場合彼らの正しい心の中で、それは 可能 そのような実装は脆弱になる可能性があります。

それ以外の場合、いいえ、アプリケーションはHRSに対して脆弱ではありません。

7
AviD