POC详情: db48077128817aca5e9f995ae53637b433c9394f

来源
关联漏洞
标题: Apache HTTP Server 路径遍历漏洞 (CVE-2021-41773)
描述:Apache HTTP Server是美国阿帕奇(Apache)基金会的一款开源网页服务器。该服务器具有快速、可靠且可通过简单的API进行扩充的特点。 Apache HTTP Server 2.4.49版本存在路径遍历漏洞,攻击者可利用该漏洞使用路径遍历攻击将URL映射到预期文档根以外的文件。
介绍
# POC-CVE-2021-41773

On the 5th of October 2021, a CVE detailing a path traversal attack on Apache HTTP Server v2.4.49 was released. Assigned the number CVE-2021-41773, it was released with the following description:

A flaw was found in a change made to path normalization in Apache HTTP Server 2.4.49. An attacker could use a path traversal attack to map URLs to files outside the expected document root. If files outside of the document root are not protected by "require all denied" these requests can succeed. Additionally (sic) this flaw could leak the source of interpreted files like CGI scripts. This issue is known to be exploited in the wild. This issue only affects Apache 2.4.49 and not earlier versions.

[+] Apache 2.4.49 without CGI enabled, we can only read files. We simply access the files that we want, url-encoding one of the . in each path segment.

[+] Apache 2.4.49 with CGI enabled
CGI will complicate the matter as the module will attempt to execute the retrieved file. For plaintext, like /etc/passwd, this can be problematic :). In order to execute or code, we can simply call sh or bash with the command in the body. Note that the Content-Type response header will also have to be emitted so that the client will know how to display the results.

[+] Apache 2.4.50
This particular example was fixed in version 2.4.50. However, the fix was incomplete and failed to account for a double-encoding of the URL. 

Ref. https://nvd.nist.gov/vuln/detail/CVE-2021-41773
文件快照

[4.0K] /data/pocs/db48077128817aca5e9f995ae53637b433c9394f ├── [1.9K] exploit-cve2021.py ├── [ 18K] LICENSE └── [1.5K] README.md 0 directories, 3 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。