Apache mod_status /server-status Information Disclosure

1. 漏洞报告

image

2. 漏洞介绍

     Apache Web服务器模块mod_status提供有关Apache服务器活动和性能的信息。该模块使用位于/ server-status的可公开访问的网页来提供实时流量日志以及主机信息,包括CPU使用率,当前HTTP请求,客户端IP地址,请求的路径和已处理的虚拟主机。此类信息可能会给潜在的攻击者信息以帮助进一步的攻击,并且可能会泄露敏感的流量信息。利用此信息泄露漏洞不需要身份验证。

3. 漏洞危害

      Apache Web Server包含一个缺陷,可能会导致未经授权的信息泄露。当攻击者从远程主机请求/ server-status指令时,就会触发此问题,该主机将泄露各种各样的Web服务器信息,包括Web流量,CPU负载,服务器版本,当前连接等等。

4. 漏洞检测

直接在浏览器中访问域名或者IP,然后在后边输入/server-status即可,如 http://192.168.43.58/server-status

image

5. 漏洞修复

当前没有已知的升级或补丁程序可以纠正此问题。通过实施以下变通办法,可以纠正该缺陷:在httpd.conf中编辑<Location / server-status>,以仅允许从受信任的IP地址进行访问。

root@bee-box:~# cat /etc/apache2/httpd.conf | grep "<Location /server-status>" -A 4
<Location /server-status>
  Order allow,deny
  Allow from 192.168.43.58
</Location>

root@bee-box:~# /etc/init.d/apache2 restart
 * Restarting web server apache2                                                            [ OK ] 
root@bee-box:~# curl -I http://192.168.43.58/server-status
HTTP/1.1 200 OK
Date: Mon, 19 Apr 2021 11:52:51 GMT
Server: Apache/2.2.8 (Ubuntu) DAV/2 mod_fastcgi/2.4.6 PHP/5.2.4-2ubuntu5 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g
Content-Length: 3582
Content-Type: text/html; charset=ISO-8859-1

## 使用其他IP的电脑访问
λ ipconfig | grep -a '192.168.43.232'
   IPv4 地址 . . . . . . . . . . . . : 192.168.43.232

λ curl -I http://192.168.43.58/server-status
HTTP/1.1 403 Forbidden
Date: Mon, 19 Apr 2021 12:00:14 GMT
Server: Apache/2.2.8 (Ubuntu) DAV/2 mod_fastcgi/2.4.6 PHP/5.2.4-2ubuntu5 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g
Content-Type: text/html; charset=iso-8859-1


如果不需要,可以禁用此功能。注释掉 httpd.conf 中的 <Location /server-status> 部分。


## 
root@bee-box:~# cat /etc/apache2/httpd.conf | grep "<Location /server-status>" -A 5
#<Location /server-status>
# SetHandler server-status
# Order deny,allow
# Allow from all
#</Location>

root@bee-box:~# /etc/init.d/apache2 restart
 * Restarting web server apache2                                                            [ OK ] 
root@bee-box:~# curl http://192.168.43.58/server-status
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /server-status
on this server.</p>
<hr>
<address>Apache/2.2.8 (Ubuntu) DAV/2 mod_fastcgi/2.4.6 PHP/5.2.4-2ubuntu5 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g Server at 192.168.43.58 Port 80</address>
</body></html>

posted @ 2021-04-19 20:02  一曲天地远  阅读(345)  评论(0编辑  收藏  举报