首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>漏洞资料>文章内容
Apache mod_disk_cache模块客户端验证信息存储漏洞
来源:vfocus.net 作者:vitter 发布时间:2004-03-29  

Apache mod_disk_cache模块客户端验证信息存储漏洞


受影响系统:
Apache Software Foundation Apache 2.0a9
Apache Software Foundation Apache 2.0.49
Apache Software Foundation Apache 2.0.48
Apache Software Foundation Apache 2.0.47
Apache Software Foundation Apache 2.0.46
Apache Software Foundation Apache 2.0.45
Apache Software Foundation Apache 2.0.44
Apache Software Foundation Apache 2.0.43
Apache Software Foundation Apache 2.0.42
Apache Software Foundation Apache 2.0.41
Apache Software Foundation Apache 2.0.40
Apache Software Foundation Apache 2.0.39
Apache Software Foundation Apache 2.0.38
Apache Software Foundation Apache 2.0.37
Apache Software Foundation Apache 2.0.36
Apache Software Foundation Apache 2.0.35
Apache Software Foundation Apache 2.0.32
Apache Software Foundation Apache 2.0.28
Apache Software Foundation Apache 2.0
描述:
--------------------------------------------------------------------------------
BUGTRAQ ID: 9933

Apache是一款开放源代码流行的Httpd服务程序。

Apache包含的mod_disk_cache模块存在信息泄露问题,远程攻击者可以利用这个漏洞获得客户端验证的敏感信息。

mod_disk_cache模块把所有客户端验证信息存储在磁盘上,问题存在于modules/experimental/mod_disk_cache.c代码中的write_headers()函数:

========================================================================
/* Parse the vary header and dump those fields from the headers_in. */
/* Make call to the same thing cache_select_url calls to crack Vary. */
/* @@@ Some day, not today. */
if (r->headers_in) {
~ int i;
~ apr_table_entry_t *elts = (apr_table_entry_t *)
~ apr_table_elts(r->headers_in)->elts;
~ for (i = 0; i < apr_table_elts(r->headers_in)->nelts; ++i) {
~ if (elts[i].key != NULL) {
~ buf = apr_pstrcat(r->pool, elts[i].key, ": ", elts[i].val,
~ CRLF, NULL);
~ amt = strlen(buf);
~ apr_file_write(hfd, buf, &amt);
~ }
~ }
~ buf = apr_pstrcat(r->pool, CRLF, NULL);
~ amt = strlen(buf);
~ apr_file_write(hfd, buf, &amt);
}
========================================================================

所有r->headers_in字段写入到磁盘上,这个字段包含所有客户端的验证信息。因此攻击者可以借此获得一些验证的明文密码等信息。

<*来源:Andreas Steinmetz (ast@domdv.de)

链接:http://marc.theaimsgroup.com/?l=bugtraq&m=107981737322495&w=2
*>

建议:
--------------------------------------------------------------------------------
临时解决方法:

如果您不能立刻安装补丁或者升级,NSFOCUS建议您采取以下措施以降低威胁:

* Andreas Steinmetz <ast@domdv.de>提供的第三方补丁如下:

diff -rNu httpd-2.0.49.orig/modules/experimental/cache_util.c httpd-2.0.49/modules/experimental/cache_util.c
--- httpd-2.0.49.orig/modules/experimental/cache_util.c 2004-02-09 21:53:16.000000000
+0100
+++ httpd-2.0.49/modules/experimental/cache_util.c 2004-03-20 15:55:51.000000000 +0100
@@ -516,3 +516,25 @@
apr_table_unset(headers_out, "Upgrade");
return headers_out;
}
+
+/* Create a new table consisting of those elements from a request_rec's
+ * headers_in that are allowed to be stored in a cache.
+ */
+CACHE_DECLARE(apr_table_t *)ap_cache_cacheable_hdrs_in(request_rec *r)
+{
+ /* Make a copy of the request headers, and remove from
+ * the copy any hop-by-hop headers, as defined in Section
+ * 13.5.1 of RFC 2616
+ */
+ apr_table_t *headers_in;
+ headers_in = apr_table_copy(r->pool, r->headers_in);
+ apr_table_unset(headers_in, "Connection");
+ apr_table_unset(headers_in, "Keep-Alive");
+ apr_table_unset(headers_in, "Proxy-Authenticate");
+ apr_table_unset(headers_in, "Proxy-Authorization");
+ apr_table_unset(headers_in, "TE");
+ apr_table_unset(headers_in, "Trailers");
+ apr_table_unset(headers_in, "Transfer-Encoding");
+ apr_table_unset(headers_in, "Upgrade");
+ return headers_in;
+}
diff -rNu httpd-2.0.49.orig/modules/experimental/mod_cache.h httpd-2.0.49/modules/experimental/mod_cache.h
--- httpd-2.0.49.orig/modules/experimental/mod_cache.h 2004-02-09 21:53:16.000000000
+0100
+++ httpd-2.0.49/modules/experimental/mod_cache.h 2004-03-20 15:55:51.000000000 +0100
@@ -238,6 +238,11 @@
*/
CACHE_DECLARE(apr_table_t *)ap_cache_cacheable_hdrs_out(apr_pool_t *pool, apr_table_t
*t);

+/* Create a new table consisting of those elements from a request_rec's
+ * headers_in that are allowed to be stored in a cache
+ */
+CACHE_DECLARE(apr_table_t *)ap_cache_cacheable_hdrs_in(request_rec *r);
+
/**
* cache_storage.c
*/
diff -rNu httpd-2.0.49.orig/modules/experimental/mod_disk_cache.c httpd-2.0.49/modules/experimental/mod_disk_cache.c
--- httpd-2.0.49.orig/modules/experimental/mod_disk_cache.c 2004-02-09 21:53:16.000000000
+0100
+++ httpd-2.0.49/modules/experimental/mod_disk_cache.c 2004-03-20 15:55:51.000000000
+0100
@@ -600,8 +600,9 @@
/* @@@ Some day, not today. */
if (r->headers_in) {
int i;
- apr_table_entry_t *elts = (apr_table_entry_t *) apr_table_elts(r->headers_in)-
>elts;
- for (i = 0; i < apr_table_elts(r->headers_in)->nelts; ++i) {
+ apr_table_t* headers_in = ap_cache_cacheable_hdrs_in(r);
+ apr_table_entry_t *elts = (apr_table_entry_t *) apr_table_elts(headers_in)-
>elts;
+ for (i = 0; i < apr_table_elts(headers_in)->nelts; ++i) {
if (elts[i].key != NULL) {
buf = apr_pstrcat(r->pool, elts[i].key, ": ", elts[i].val, CRLF,
NULL);
amt = strlen(buf);

厂商补丁:

Apache Software Foundation
--------------------------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://www.apache.org/



 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·XSOK环境变量本地命令执行漏洞
·N点虚拟主机管理系统 致命漏洞。
·南方数据企业网站管理系统V10.0
·动网(DVBBS)Version 8.2.0 后
·Solaris 10 telnet漏洞及解决
·破解无线路由器密码,常见无线密
·Nginx %00空字节执行php漏洞
·WinWebMail、7I24提权漏洞
·XPCD xpcd-svga本地缓冲区溢出漏
·Struts2多个漏洞简要分析
·ecshop2.72 api.php 文件鸡肋注
·Discuz!后台拿Webshell 0day
  相关文章
·Solaris内核目录遍历漏洞
·SSH Communications Security Te
·MySQL放弃错误报告不安全临时文
·Solaris dtlogin远程堆溢出漏洞
·NexGen FTP Server远程目录遍历
·ISS PAM ICQ通信服务应答处理缓
·OpenSSH SCP客户端文件破坏漏洞
·Solaris dtlogin远程堆溢出漏洞
·Perl win32_stat函数远程缓冲区
·OpenBSD isakmpd负载处理拒绝服
·phpBB admin_words.php多个安全
·Panda ActiveScan 5.0远程缓冲溢
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved