新足迹

 找回密码
 注册

精华好帖回顾

· 撞车及事故处理实录!(澳洲版) (2006-8-30) 麦嘟 · 旅行笔记摘抄- 日本 (2007-10-30) astina
· DIY 白蚁防治--92#有升级版,感谢LIAOTANG (2010-11-24) hsqhugh · [Karen's Kitchen Time ] Homemade 黑胡椒牛排 (2008-10-10) Tiger_Karen
Advertisement
Advertisement
查看: 1963|回复: 18

ASP.NET Form authentication被攻破-安全更新推出 [复制链接]

发表于 2010-9-15 17:11 |显示全部楼层
此文章由 flyspirit 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 flyspirit 所有!转贴必须注明作者、出处和本声明,并保持内容完整
Security Hack Exposes Forms Authentication in ASP.NET

    * By Peter Vogel
    * 09/14/2010

Two security researchers, Thai Duong and Juliano Rizzo, have discovered a bug in the default encryption mechanism used to protect the cookies normally used to implement Forms Authentication in ASP.NET. Using their tool (the Padding Oracle Exploit Tool or POET), they can repeatedly modify an ASP.NET Forms Authentication cookie encrypted using AES and, by examining the errors returned, determine the Machine Key used to encrypt the cookie. The process is claimed to be 100 percent reliable and takes between 30 and 50 minutes for any site.

Once the Machine Key is determined, attackers can create bogus forms authentication cookies. If site designers have chosen the option to embed role information in the security cookie, then attackers could arbitrarily assign themselves to administrator roles. This exposure also affects other membership provider features, spoofing protection on the ViewState, and encrypted information that might be stored in cookies or otherwise be made available at the client.

While the exposure is both wide and immediate, the fix is simple. The hack exploits a bug in .NET's implementation of AES encryption. The solution is to switch to one of the other encryption mechanisms -- to 3DES, for instance. Since encryption for the membership and roles providers is handled by ASP.NET, no modification of existing code should be required for Forms Authentication.

The encryption method can be set in the web.config file for a site, in IIS 7 for a Web server, or in the config file for .NET on a server in %SYSTEMROOT%\Microsoft.NET\Framework\version\CONFIG\. On 64-bit systems, it must also be set in %SYSTEMROOT%\Microsoft.NET\Framework64\version\CONFIG\. A typical entry would look like this:

    <machineKey validationKey="AutoGenerate,IsolateApps"         
                           validation="3DES"                           
                           decryptionKey="AutoGenerate,IsolateApps"
                           decryption="3DES" />  

On a Web farm, this setting will have to be made on all the servers in the farm.

These settings are also used to prevent spoofing (ViewState data is encoded but not encrypted), so making this change will also switch the ViewState to using 3DES. Developers who are using AES in their code to encrypt information made available at the client should consider modifying their code to use a different encryption mechanism.

Duong and Rizzo intend to provide more information at the ekoparty Security Conference on Friday, Sept. 17 in Buenos Aires.

原文连接http://visualstudiomagazine.com/ ... -security-hack.aspx

[ 本帖最后由 flyspirit 于 2010-9-30 09:57 编辑 ]

评分

参与人数 2积分 +11 收起 理由
bulaohu + 8 谢谢奉献
乱码 + 3 感谢分享

查看全部评分

Advertisement
Advertisement

发表于 2010-9-15 17:25 |显示全部楼层
此文章由 乱码 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 乱码 所有!转贴必须注明作者、出处和本声明,并保持内容完整
Padding Oracle Exploit Tool 比较牛B

http://www.youtube.com/v/euujmKDxmC4

评分

参与人数 1积分 +4 收起 理由
flyspirit + 4 感谢分享

查看全部评分

发表于 2010-9-15 17:41 |显示全部楼层
此文章由 bulaohu 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 bulaohu 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 flyspirit 于 2010-9-15 17:11 发表
Security Hack Exposes Forms Authentication in ASP.NET

    * By Peter Vogel
    * 09/14/2010

Two security researchers, Thai Duong and Juliano Rizzo, have discovered a bug in the default encryption me ...


3DES is weaker but hell, still better than flawed implementation of AES

发表于 2010-9-15 22:05 |显示全部楼层
此文章由 flyspirit 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 flyspirit 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 乱码 于 2010-9-15 17:25 发表
Padding Oracle Exploit Tool 比较牛B

http://www.youtube.com/v/euujmKDxmC4


确实牛B, 有没有可能搞到这工具?

发表于 2010-9-15 22:07 |显示全部楼层
此文章由 flyspirit 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 flyspirit 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 bulaohu 于 2010-9-15 17:41 发表


3DES is weaker but hell, still better than flawed implementation of AES


Yes, but maybe there is some ways out there to hack 3DES as well.

发表于 2010-9-16 13:51 |显示全部楼层
此文章由 bulaohu 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 bulaohu 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 flyspirit 于 2010-9-15 22:07 发表


Yes, but maybe there is some ways out there to hack 3DES as well.


Have you found one?
Advertisement
Advertisement

发表于 2010-9-16 15:48 |显示全部楼层
此文章由 huazhb 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 huazhb 所有!转贴必须注明作者、出处和本声明,并保持内容完整
这个好像没有什么大问题, 只是针对那些把角色用户信息放在cookie中的网站, 如果你要到后台去validation的话应该问题就不大了

发表于 2010-9-16 16:23 |显示全部楼层
此文章由 flyspirit 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 flyspirit 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 bulaohu 于 2010-9-16 13:51 发表


Have you found one?


I did some search on the web, but couldn't find this tool. Maybe it's not free.

2007 年度奖章获得者

发表于 2010-9-24 13:56 |显示全部楼层
此文章由 coolioo 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 coolioo 所有!转贴必须注明作者、出处和本声明,并保持内容完整

发表于 2010-9-26 14:25 |显示全部楼层
此文章由 乱码 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 乱码 所有!转贴必须注明作者、出处和本声明,并保持内容完整
老赵的这篇文章可能更容易理解一些。

http://www.cnblogs.com/JeffreyZh ... ity-in-asp-net.html

评分

参与人数 1积分 +3 收起 理由
flyspirit + 3 谢谢奉献

查看全部评分

发表于 2010-9-27 14:09 |显示全部楼层
此文章由 flyspirit 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 flyspirit 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 乱码 于 2010-9-26 14:25 发表
老赵的这篇文章可能更容易理解一些。

http://www.cnblogs.com/JeffreyZh ... ity-in-asp-net.html


Scott Gu的原文是说得很简单。
Advertisement
Advertisement

发表于 2010-9-30 09:58 |显示全部楼层
此文章由 flyspirit 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 flyspirit 所有!转贴必须注明作者、出处和本声明,并保持内容完整
Scott Gu的Blog里有。

发表于 2010-9-30 10:22 |显示全部楼层
此文章由 chech28 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 chech28 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 bulaohu 于 2010-9-15 17:41 发表


3DES is weaker but hell, still better than flawed implementation of AES

粗粗看了下原文blog,换3des应该不解决问题,问题出在padding,而不是aes本身的实现
子非路人

发表于 2010-9-30 11:14 |显示全部楼层
此文章由 乱码 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 乱码 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 chech28 于 2010-9-30 10:22 发表

粗粗看了下原文blog,换3des应该不解决问题,问题出在padding,而不是aes本身的实现


padding本身也没有问题,问题出在如果padding错或者对,错误code有很强的特性(对是500,错是404),这些code对于熟悉burp suite的人太简单了,用payload来穷举那个service,只用观察return code就可以。

如何来设置payloads,就看出水平高低了,经验丰富的高手用小的set来穷举,所以的时间短,新手时间久,payload设置的不科学,可能要几天的时间,但只要service不deny,都可以hack出来。

评分

参与人数 1积分 +3 收起 理由
flyspirit + 3 谢谢奉献

查看全部评分

发表于 2010-9-30 14:02 |显示全部楼层
此文章由 flyspirit 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 flyspirit 所有!转贴必须注明作者、出处和本声明,并保持内容完整
看来研究过啊。

发表于 2010-9-30 14:29 |显示全部楼层
此文章由 乱码 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 乱码 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 flyspirit 于 2010-9-30 14:02 发表
看来研究过啊。


谢谢加分,我没研究过这个issue,不过比较能理解他说的那些东西。

我对http tools比较熟,hack web site有些东西还是很相似,尤其是return code,是一样的。
Advertisement
Advertisement

发表于 2010-9-30 14:53 |显示全部楼层
此文章由 cdfei 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 cdfei 所有!转贴必须注明作者、出处和本声明,并保持内容完整
是不是我理解的问题,我觉得按照这个machineKey的长度,即使能持续获得响应,理论上用尝试密钥的方法应该不是几天几个月能完成破解的啊。

发表于 2010-9-30 14:55 |显示全部楼层
此文章由 cdfei 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 cdfei 所有!转贴必须注明作者、出处和本声明,并保持内容完整
http://ethicalhackingaspnet.codeplex.com/
大家可以去下个工具,看看自己的程序有没有问题

评分

参与人数 1积分 +4 收起 理由
乱码 + 4 谢谢奉献

查看全部评分

发表于 2010-9-30 15:06 |显示全部楼层
此文章由 乱码 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 乱码 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 cdfei 于 2010-9-30 14:53 发表
是不是我理解的问题,我觉得按照这个machineKey的长度,即使能持续获得响应,理论上用尝试密钥的方法应该不是几天几个月能完成破解的啊。


我觉得不是尝试密钥的方法,否则有点太蠢了点,虽然现在计算机及其强大,但毕竟是http request,花上几年时间是肯定的,他们对这个问题介绍的不够详细。

发表回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Advertisement
Advertisement
返回顶部