关于asp.net:Oracle padding exploit – 如何下载web.config?

Oracle padding exploit - how does it download the web.config?

我知道已经有一些关于Oracle填充漏洞的问题,但是没有一个能解释它是如何下载web.config的。我运行了几个ASP.NET应用程序,我已经使用微软推荐的缓解因素进行了测试,但我仍然害怕人们能够得到web.config。

有人能解释一下他们是如何做到这一点的,或者甚至提供一个链接到一个我可以用来测试我的网站的工具吗?我发现对这部分攻击的官方解释确实缺乏。

The attack that was shown in the
public relies on a feature in ASP.NET
that allows files (typically
javascript and css) to be downloaded,
and which is secured with a key that
is sent as part of the request.
Unfortunately if you are able to forge
a key you can use this feature to
download the web.config file of an
application (but not files outside of
the application).


回答是有一次他们找到了机器,他们可以用另一个特征在ASP

"In asp.net 3.5 service pack 1 and asp.net 4.0 there is a feature that is used to serve files from the application.这是机器钥匙通常保护的特性。然而,如果机器钥匙被破坏,那么这一特性就会受到损害。This goes directly to asp.net and not their so their security settings do not apply.一旦这个特征被破坏,进攻者可以从您的应用程序下载文件,包括Web.Config文件,通常包含密码。

Versions of ASP.Net prior to ASP.Net 3.5 SP1 do not have this feature,but are still vulnerable to the main machine key attack."

(See the post at the bottom of here:http://forums.asp.net/t/t/1603799.aspx from the asp.net team)


FYI,a patch for this bug has been released on windows update.

http://weblogs.asp.net/scottgu/archive/2010/09/30/asp-net-security-fix-now-on-windows-update.aspx


The following post may be interesting for this thread:

http://blog.mindedsecurity.com/2010/10/breaking-net-encryption-with-or-without.html


Afaik it goes like this:

  • 这些是HIT:webresource.axd and scriptresource.axd,both use an encrypted/signed value that ASP.net tries to check if its valid
  • 因为在文件有效或无效的情况下,不同的反应,它们可以进行攻击。
  • 一旦攻击成功,他们就可以提出一项资源请求,如最初是从ASP.Net发射的。

如今,正如我所知,这些资源本来都是用来提供嵌入式资源的,但我猜,这并不是个案(Scott Gu在他的邮件评论中提到了在攻击中使用的那些人)。


这个博客很有意思:http://www.gdssecurity.com/l/b/。

ALSO read this:这个新的ASP.Net安全脆弱性是什么样的严肃性,以及我如何能够在这一点上发挥作用?How serious is this new ASP.Net security vulnerability and how can I work around it?


Scott Guthrie有一份邮件解释了这一点。