0x00 漏洞概述
2021年10月5日,Apache官方发布了一批漏洞信息,其中Apache HTTP Server路径穿越漏洞CVE-2021-41773。
满足条件:
-
版本等于2.4.49
-
穿越的目录允许被访问,比如配置了
Require all granted
。(默认情况下是不允许的)
0x01环境搭建
使用docker搭建Apache HTTPd 2.4.49版本服务器:
Dockerfile
FROM vulhub/httpd:2.4.49 LABEL maintainer="phithon <root@leavesongs.com>" RUN set -ex \ && sed -i "s|#LoadModule cgid_module modules/mod_cgid.so|LoadModule cgid_module modules/mod_cgid.so|g" /usr/local/apache2/conf/httpd.conf \ && sed -i "s|#LoadModule cgi_module modules/mod_cgi.so|LoadModule cgi_module modules/mod_cgi.so|g" /usr/local/apache2/conf/httpd.conf \ && sed -i "s|#Include conf/extra/httpd-autoindex.conf|Include conf/extra/httpd-autoindex.conf|g" /usr/local/apache2/conf/httpd.conf \ && cat /usr/local/apache2/conf/httpd.c