关联漏洞
介绍
# 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付费,感谢您的支持。