您现在的位置: 无忧电子商务网 >> 信息学院 >> 程序开发 >> asp.net >> 正文

Security Hole In ASP.NET Beta 1 (from angryCoder)

作者:作者:未…    信息学院来源:网络收集    点击数:    更新时间:2006-8-28 我要参与讨论

  Security Hole In ASP.NET Beta 1
Jonathan Goodyear, MCSD, MCP, CLS
4/30/2001

Background
In the Beta 1 version of the .NET Framework, configuration settings for ASP.NET web applications are kept in an XML formatted file named config.web. There is one config.web file at the machine level, with the option of having copies with overriding settings in any directory of your web application. Settings in a config.web file cascade to all sub-directories in your web application, unless overridden by another config.web file.

For Beta 2, Microsoft changed things around. ASP.NET settings at the machine level will now live in a file named computer.config, while settings at the web application level will be contained in files named web.config. Microsoft is encouraging the use of the ".config" file extension for XML based configuration files; Even those that are custom built. Some examples of this are the portal.config file used in the IBuySpy Portal Application, and the ezine_settings.config file used in the eZine.Framework upon which the angryCoder site is built.

The hole
The security hole comes into play due to the fact that the new naming convention for XML based configuration files didn't come about until after Beta 1 was released. This means that the default ASP.NET settings allow files with the ".config" extension to be browsed as clear text. I was made aware of this situation when an angryCoder reader (luckily an honest one) emailed me my user name and password that he had obtained by navigating to my ezine_settings.config with his browser. One of the disadvantages of giving away the source code for the eZine.Framework is that aspiring hackers have a convenient roadmap of my entire site. It gave me a rather unsettling feeling in my gut to find out that I had been careless enough to leave my site so exposed.

The fix
There are two bright spots to this security hole. First, it is limited to Beta 1 because files with the ".config" extension will be guarded by default in Beta 2. Second, there are two different, yet equally easy, fixes for the hole that you can implement right now.

The first fix option is the one that the IBuySpy Portal Application implemented. They placed their portal.config file in a directory that the anonymous user account does not have "read" privileges for. Using this method, their business logic components can still import and use the XML settings in the file, while keeping it from the prying eyes of hackers.

the second fix option is the one that I implemented for angryCoder. The first step is to open up the Internet Services Manager MMC Snap-In and configure files with the ".config" extension to be handled by the ASP.NET ISAPI Application. You do this by right-clicking your web application, and choosing the "Properties&q

[1] [2] 下一页

在google里搜索更多Security Hole In ASP.NET Beta 1 (from angryCoder)

Google
Web www.51ec.org
【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
我来说两句 对此文章发表了评论
  昵 称: *必填    ·注册用户·
  评 分: 1分 2分 3分 4分 5分     严禁发表危害国家安全、政治、黄色淫秽等内容的评论,用户需对自己在使用本网站服务过程中的行为承担法律责任。本站管理员有权保留或删除评论内容,评论内容只代表机友个人观点,与本网站立场无关。  
评 论
内 容

 
评论列表 (最新 评论仅限网友观点!)

供求信息




| 设为首页 | 加入收藏 | 关于我们 | 广告服务 | 联系方式 | 友情链接 | 版权申明