漏洞修复之关闭 TRACE and/or TRACK methods

漏洞描述:

The remote web server supports the TRACE and/or TRACK methods. TRACE and TRACK are HTTP methods which are used to debug web server connections.

The web server has the following HTTP methods enabled: TRACE
Impact
An attacker may use this flaw to trick your legitimate web users to give him their credentials.
Solution:
Solution type: Mitigation
Disable the TRACE and TRACK methods in your web server conguration.
Please see the manual of your web server or the references for more information.
Aected Software/OS
Web servers with enabled TRACE and/or TRACK methods.
Vulnerability Insight
It has been shown that web servers supporting this methods are subject to cross-site-scripting
attacks, dubbed XST for Cross-Site-Tracing, when used in conjunction with various weaknesses
in browsers.
Vulnerability Detection Method
Checks if HTTP methods such as TRACE and TRACK are enabled and can be used.
Details: HTTP Debugging Methods (TRACE/TRACK) Enabled
OID:1.3.6.1.4.1.25623.1.0.11213
Version used: 2022-05-12T09:32:01Z
References
cve: CVE-2003-1567
cve: CVE-2004-2320
cve: CVE-2004-2763
cve: CVE-2005-3398
cve: CVE-2006-4683
cve: CVE-2007-3008
cve: CVE-2008-7253
cve: CVE-2009-2823
cve: CVE-2010-0386
cve: CVE-2012-2223
cve: CVE-2014-7883

漏洞解决:根据建议关闭 TRACE and TRACK methods

处理方法:Apache版本大于2.2,在 httpd.conf 末尾添加 TraceEnable off

1、查看Apache版本:httpd -v

[root@ecs-9408 conf]# httpd -v
-bash: httpd: command not found
[root@ecs-9408 conf]# export PATH=/usr/local/apache/bin:$PATH
[root@ecs-9408 conf]# echo $PATH
/usr/local/apache/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root@ecs-9408 conf]# httpd -v
Server version: Apache/2.4.54 (Unix)
Server built:   Nov  6 2022 20:58:09

2、编辑 httpd.conf

vi /usr/local/apache/conf/httpd.conf

末尾添加如下内容

TraceEnable off

注:路径或者为/etc/httpd/conf/httpd.conf


3、重启Apache

/usr/local/apache/bin/apachectl restart

4、测试

关闭前

telnet xxx.xxx.xxx.xx 8092
TRACE / HTTP/1.0
X-Test:abcde

结果会返回 200 OK

关闭后测试会返回 405 Method Not Allowed

HTTP/1.1 405 Method Not Allowed
Date: Thu, 08 Dec 2022 02:30:05 GMT
Server: Apache
Allow:
Content-Length: 348
Connection: close
Content-Type: text/html; charset=iso-8859-1
  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序员大佬超

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值