您现在的位置是:首页 > 文章详情

http TRACE 跨站攻击漏洞测试与防御修复

日期:2019-03-03点击:352
http TRACE 跨站攻击漏洞测试与防御修复
apache关闭方法可以直接在配置文件http.conf添加TraceEnable off 关闭 有版本要求 好像是2.0以上
在httpd.conf下搜索Global 在
### Section 1: Global Environment
下面加 TraceEnable off
保存OK

如何测试呢.这样
在cmd下输入
telnet 127.0.0.1 80
然后在黑屏状态下输入
TRACE / HTTP/1.0
Host: foo
在添加TraceEnable off之前,应返回
HTTP/1.1 200 OK
Date: Sat, 20 Oct 2007 20:39:36 GMT
Server: Apache/2.2.6 (Debian) PHP/4.4.4-9 mod_ruby/1.2.6 Ruby/1.8.6(2007-06-07)
Connection: close
Content-Type: message/http
TRACE / HTTP/1.0
Host: foo
Any text entered here will be echoed back in the response
Connection closed by foreign host.

在添加TraceEnable off之后,应返回

HTTP/1.1 403 Forbidden
Date: Sat, 20 Oct 2007 20:38:31 GMT
Server: Apache/2.2.6 (Debian) PHP/4.4.4-9 mod_ruby/1.2.6 Ruby/1.8.6(2007-06-07)
Content-Length: 320
Connection: close
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML(link) PUBLIC "-//IETF//DTD HTML(link) 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /
on this server.</p>
<hr>
<address>Apache/2.2.6 (Debian) PHP/4.4.4-9 mod_ruby/1.2.6 Ruby/1.8.6(2007-06-07) Server at foo Port 80</address>
</body></html>
Connection closed by foreign host.
至此,可通过安全测试
原文链接:https://yq.aliyun.com/articles/692261
关注公众号

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。

持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。

文章评论

共有0条评论来说两句吧...

文章二维码

扫描即可查看该文章

点击排行

推荐阅读

最新文章