请问关于ASP.NET最新安全漏洞的最新跟进和详细说明是什么?

2026-05-27 04:341阅读0评论SEO教程
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计1214个文字,预计阅读时间需要5分钟。

请问关于ASP.NET最新安全漏洞的最新跟进和详细说明是什么?

今天自由互联,看到了关于ASP.NET的安全漏洞,内容大致是:黑客可下载ASP.NET网站的内核文件(WEB.CONFIG),我估计还可以下载任意文件,例如数据库。这个BUG基本上是致命的。

今天上自由互联,看见了关于ASP.NET的安全漏洞,内容大致是:黑客可以下载ASP.NET网站的核心文件(WEB.CONFIG),我估计还可以下载任意文件,例如数据库。

这个BUG基本上是致命的,可是自由互联的描述却非常的少,我看了半天也没有明白什么意思,如何攻击,于是挖掘下去。现在把一些明细写出来。

微软原文:

weblogs.asp.net/scottgu/archive/2010/09/18/important-asp-net-security-vulnerability.aspx

黑客如何发起攻击:

代码Tounderstandhowthisvulnerabilityworks,youneedtoknowaboutcryptographicoracles.Anoracleinthecontextofcryptographyisasystemwhichprovideshintsasyouaskitquestions.Inthiscase,thereisavulnerabilityinASP.NETwhichactsasapaddingoracle.Thisallowsanattackertosendciphertexttothewebserverandlearnifitwasdecryptedproperlybyexaminingwhicherrorcodewasreturnedbythewebserver.Bymakingmanysuchrequests(andwatchingwhaterrorsarereturned)theattackercanlearnenoughtosuccessfullydecrypttherestoftheciphertext.

大致意思是关于 cryptographic oracle. 黑客通过不断重复发送信息,检测返回的错误信息,然后了解加密算法,最后实现攻击。可是这段话还是没有明白,于是继续搜索:

visualstudiomagazine.com/articles/2010/09/14/aspnet-security-hack.aspx

这篇文章说明了大致的攻击流程。由于这个问题影响非常大,我就不翻译中文了,只是简单概述一下:

代码theycanrepeatedlymodifyanASP.NETFormsAuthenticationcookieencryptedusingAESand,byexaminingtheerrorsreturned,determinetheMachineKeyusedtoencryptthecookie.Theprocessisclaimedtobe100percentreliableandtakesbetween30and50minutesforanysite.

2个研究员发现,通过一个工具,能够 修改被AES加密过的 ASP.NET窗体验证cookie;然后检查返回错误信息;获取Machine Key。这个过程100%成功而且只需要30分钟。

代码OncetheMachineKeyisdetermined,attackerscancreatebogusformsauthenticationcookies.Ifsitedesignershavechosentheoptiontoembedroleinformationinthesecuritycookie,thenattackerscouldarbitrarilyassignthemselvestoadministratorroles.Thisexposurealsoaffectsothermembershipproviderfeatures,spoofingprotectionontheViewState,andencryptedinformationthatmightbestoredincookiesorotherwisebemadeavailableattheclient.

一旦machine key被破解出来了,黑客就能够模拟出验证 cookie。如果网站设计者启动了选项,让安全信息放入 security cookie,那么攻击者就能够获取了 管理员权限。 包含的影响范围包括:membership provider, viewstate, 保存在security cookie里面的所有信息。

代码Whiletheexposureisbothwideandimmediate,thefixissimple.Thehackexploitsabugin.NET'simplementationofAESencryption.Thesolutionistoswitchtooneoftheotherencryptionmechanisms--to3DES,forinstance.SinceencryptionforthemembershipandrolesprovidersishandledbyASP.NET,nomodificationofexistingcodeshouldberequiredforFormsAuthentication.

这个bug源于AES加密算法中的一个bug。因此解决方案就是:使用DES(后来被验证是错误的解决方案)。

第一部分小结

请问关于ASP.NET最新安全漏洞的最新跟进和详细说明是什么?

--------------------

问题的关键字包括:

security cookie, ASP.NET Forms Authentication cookie,Machine Key,role information in the security cookie.

大概意思就是,启动了asp.net的验证,并且启动了使用AES加密算法保存敏感信息在验证框架的cookie中后,黑客能够获取machinekey,然后获得管理员权限。

现在问题就是,具体是asp.net中什么操作、部署、框架会受到这个影响。于是我进一步搜索。

攻击方式:padded oracle attack

---------------------------------------

文章下载地址:usenix.org/events/woot10/tech/full_papers/Rizzo.pdf

具体我没有太明白,也不知道和oracle是什么关系。不过有个回复说的比较详细:

代码Beforeworryingtoomuch,gotousenix.org/events/woot10/tech/full_papers/Rizzo.pdfandreadtheoriginalpaperfromRizzoandDuong(May25th,2010).The"paddedoracleattack"reliesonachainingblockcypher(common)butalsorequiresthe"oracle".Assomehavecorrectlypointedoutabove,weneedtohaveASP.NET(orJavasincethisisnotuniqueto.NET)returnthepaddingerrorexception.Withoutthatinformation,theexploitdoesn'twork.Bydefault,thisexceptioninformationisnotreportedbyASP.NETandthisisconfigurablebehaviorforJava.Ifyougototheaforementionedlink,Ithinkyou'llfindmoreinterestingreadingrelatedtocrackingCAPTCHAusingthisexploit.However,thattoorequirescooperationfromthewebsite.It'sgreatlearningaboutexploitsandevenalittlefunbutthemediasurescaresalotofpeople(andscaresupalotofclicks)byprovidingthishyperbole.OneguyabovesaidhewashappyheusedJava.ReadthePDFaboveandyouwillfindRizzoandDuongfoundtheproblemwithJava(JSFbutalsoRubyonRails)andthenturnedtoseeifthesameexploitwouldworkwithASP.NET.Technically,itisanexploitbutifitdoesn'thappenwithproperlyconfiguredservers(orthedefaultASP.NETconfiguration),it'smuchadoaboutnothing.

大致意思是,这个问题不仅仅存在在asp.net,而且还有java等。技术上,如果使用了asp.net的默认配置,是不需要担心的(所谓默认配置,就是新建一个asp.net项目的配置,没有做任何修改)。

窗体验证:Asp.net Form Authentication:

--------------------------------------------------

www.codeproject.com/KB/aspnet/Forms_Auth_Internals.aspx

这次受影响的,主要是因为启动了asp.net的权限框架,就是这个所谓的窗体验证。 这个窗体验证的原理在上面的连接给出了。

全文小结

------------------------------------

浏览了很多页面,浪费了1个小时,终于有点头绪。

问题在于如果用户使用了微软提供的窗体验证框架,就会出现安全漏洞,被黑客破解了保存安全信息的算法(machine key), 然后获取了管理员权限,下载服务器的文件。

如果整个权限框架是自己写的,那么就不需要担心了。

幸好,我的所有项目代码、框架代码都是自己写的。哈哈哈!

后续补充

--------------------------------------

tech.ddvip.com/2008-12/1230195492102937.html

这篇文章是08年发的,非常详细的说明了asp.net的窗体验证中存在的严重安全漏洞。希望各位有时间好好看下。主要是微软的加密算法脑残了,导致黑客容易复制一个验证cookie。

本文共计1214个文字,预计阅读时间需要5分钟。

请问关于ASP.NET最新安全漏洞的最新跟进和详细说明是什么?

今天自由互联,看到了关于ASP.NET的安全漏洞,内容大致是:黑客可下载ASP.NET网站的内核文件(WEB.CONFIG),我估计还可以下载任意文件,例如数据库。这个BUG基本上是致命的。

今天上自由互联,看见了关于ASP.NET的安全漏洞,内容大致是:黑客可以下载ASP.NET网站的核心文件(WEB.CONFIG),我估计还可以下载任意文件,例如数据库。

这个BUG基本上是致命的,可是自由互联的描述却非常的少,我看了半天也没有明白什么意思,如何攻击,于是挖掘下去。现在把一些明细写出来。

微软原文:

weblogs.asp.net/scottgu/archive/2010/09/18/important-asp-net-security-vulnerability.aspx

黑客如何发起攻击:

代码Tounderstandhowthisvulnerabilityworks,youneedtoknowaboutcryptographicoracles.Anoracleinthecontextofcryptographyisasystemwhichprovideshintsasyouaskitquestions.Inthiscase,thereisavulnerabilityinASP.NETwhichactsasapaddingoracle.Thisallowsanattackertosendciphertexttothewebserverandlearnifitwasdecryptedproperlybyexaminingwhicherrorcodewasreturnedbythewebserver.Bymakingmanysuchrequests(andwatchingwhaterrorsarereturned)theattackercanlearnenoughtosuccessfullydecrypttherestoftheciphertext.

大致意思是关于 cryptographic oracle. 黑客通过不断重复发送信息,检测返回的错误信息,然后了解加密算法,最后实现攻击。可是这段话还是没有明白,于是继续搜索:

visualstudiomagazine.com/articles/2010/09/14/aspnet-security-hack.aspx

这篇文章说明了大致的攻击流程。由于这个问题影响非常大,我就不翻译中文了,只是简单概述一下:

代码theycanrepeatedlymodifyanASP.NETFormsAuthenticationcookieencryptedusingAESand,byexaminingtheerrorsreturned,determinetheMachineKeyusedtoencryptthecookie.Theprocessisclaimedtobe100percentreliableandtakesbetween30and50minutesforanysite.

2个研究员发现,通过一个工具,能够 修改被AES加密过的 ASP.NET窗体验证cookie;然后检查返回错误信息;获取Machine Key。这个过程100%成功而且只需要30分钟。

代码OncetheMachineKeyisdetermined,attackerscancreatebogusformsauthenticationcookies.Ifsitedesignershavechosentheoptiontoembedroleinformationinthesecuritycookie,thenattackerscouldarbitrarilyassignthemselvestoadministratorroles.Thisexposurealsoaffectsothermembershipproviderfeatures,spoofingprotectionontheViewState,andencryptedinformationthatmightbestoredincookiesorotherwisebemadeavailableattheclient.

一旦machine key被破解出来了,黑客就能够模拟出验证 cookie。如果网站设计者启动了选项,让安全信息放入 security cookie,那么攻击者就能够获取了 管理员权限。 包含的影响范围包括:membership provider, viewstate, 保存在security cookie里面的所有信息。

代码Whiletheexposureisbothwideandimmediate,thefixissimple.Thehackexploitsabugin.NET'simplementationofAESencryption.Thesolutionistoswitchtooneoftheotherencryptionmechanisms--to3DES,forinstance.SinceencryptionforthemembershipandrolesprovidersishandledbyASP.NET,nomodificationofexistingcodeshouldberequiredforFormsAuthentication.

这个bug源于AES加密算法中的一个bug。因此解决方案就是:使用DES(后来被验证是错误的解决方案)。

第一部分小结

请问关于ASP.NET最新安全漏洞的最新跟进和详细说明是什么?

--------------------

问题的关键字包括:

security cookie, ASP.NET Forms Authentication cookie,Machine Key,role information in the security cookie.

大概意思就是,启动了asp.net的验证,并且启动了使用AES加密算法保存敏感信息在验证框架的cookie中后,黑客能够获取machinekey,然后获得管理员权限。

现在问题就是,具体是asp.net中什么操作、部署、框架会受到这个影响。于是我进一步搜索。

攻击方式:padded oracle attack

---------------------------------------

文章下载地址:usenix.org/events/woot10/tech/full_papers/Rizzo.pdf

具体我没有太明白,也不知道和oracle是什么关系。不过有个回复说的比较详细:

代码Beforeworryingtoomuch,gotousenix.org/events/woot10/tech/full_papers/Rizzo.pdfandreadtheoriginalpaperfromRizzoandDuong(May25th,2010).The"paddedoracleattack"reliesonachainingblockcypher(common)butalsorequiresthe"oracle".Assomehavecorrectlypointedoutabove,weneedtohaveASP.NET(orJavasincethisisnotuniqueto.NET)returnthepaddingerrorexception.Withoutthatinformation,theexploitdoesn'twork.Bydefault,thisexceptioninformationisnotreportedbyASP.NETandthisisconfigurablebehaviorforJava.Ifyougototheaforementionedlink,Ithinkyou'llfindmoreinterestingreadingrelatedtocrackingCAPTCHAusingthisexploit.However,thattoorequirescooperationfromthewebsite.It'sgreatlearningaboutexploitsandevenalittlefunbutthemediasurescaresalotofpeople(andscaresupalotofclicks)byprovidingthishyperbole.OneguyabovesaidhewashappyheusedJava.ReadthePDFaboveandyouwillfindRizzoandDuongfoundtheproblemwithJava(JSFbutalsoRubyonRails)andthenturnedtoseeifthesameexploitwouldworkwithASP.NET.Technically,itisanexploitbutifitdoesn'thappenwithproperlyconfiguredservers(orthedefaultASP.NETconfiguration),it'smuchadoaboutnothing.

大致意思是,这个问题不仅仅存在在asp.net,而且还有java等。技术上,如果使用了asp.net的默认配置,是不需要担心的(所谓默认配置,就是新建一个asp.net项目的配置,没有做任何修改)。

窗体验证:Asp.net Form Authentication:

--------------------------------------------------

www.codeproject.com/KB/aspnet/Forms_Auth_Internals.aspx

这次受影响的,主要是因为启动了asp.net的权限框架,就是这个所谓的窗体验证。 这个窗体验证的原理在上面的连接给出了。

全文小结

------------------------------------

浏览了很多页面,浪费了1个小时,终于有点头绪。

问题在于如果用户使用了微软提供的窗体验证框架,就会出现安全漏洞,被黑客破解了保存安全信息的算法(machine key), 然后获取了管理员权限,下载服务器的文件。

如果整个权限框架是自己写的,那么就不需要担心了。

幸好,我的所有项目代码、框架代码都是自己写的。哈哈哈!

后续补充

--------------------------------------

tech.ddvip.com/2008-12/1230195492102937.html

这篇文章是08年发的,非常详细的说明了asp.net的窗体验证中存在的严重安全漏洞。希望各位有时间好好看下。主要是微软的加密算法脑残了,导致黑客容易复制一个验证cookie。