Apache httpOnly Cookie 泄露漏洞修复方法 您所在的位置:网站首页 十大漏洞原理 Apache httpOnly Cookie 泄露漏洞修复方法

Apache httpOnly Cookie 泄露漏洞修复方法

#Apache httpOnly Cookie 泄露漏洞修复方法| 来源: 网络整理| 查看: 265

by thanks

insightlabs里看到

http://insight-labs.org/?p=267

 

漏洞原理分析就不多说了,文章里都有

但并未提到漏洞修补方法,正好在这做个补充。

 

漏洞原理和过程:

1. 受害者中了跨站,浏览器发出携带超大cookies的包

2. 服务器返回400错误,并会在response包里返回cookies内容

其中也包括httponly的。如图,xss0被设置为httpony依然显示出来

 

 

 

 

解决方案:

于是可以通过错误处理来屏蔽。

Apache官方提供4种错误处理方式(http://httpd.apache.org/docs/2.0/mod/core.html#errordocument),如下

In the event of a problem or error, Apachecan be configured to do one of four things,

1. output asimple hardcoded error message输出一个简单生硬的错误代码信息

2. output acustomized message输出一段信息

3. redirect to alocal URL-path to handle the problem/error转向一个本地的自定义页面

4. redirect to an external URL to handle theproblem/error转向一个外部URL

经测试,对于400错误只有方法2有效,返回包不会再包含cookie内容

Apache配置:

ErrorDocument400 " security test"

当然,升级apache到最新也可:)。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有