
CVE-2021-41773 に対して脆弱なホストを確認するための概念実証スクリプトです。
Apache HTTP Server 2.4.49-2.4.50 のパス正規化の変更に欠陥が見つかりました。
攻撃者はパストラバーサル攻撃を使用して、想定されたドキュメントルート外のファイルに URL をマッピングできる可能性があります。ドキュメントルート外のファイルが "require all denied" で保護されていない場合、これらのリクエストは成功する可能性があります。さらに、この欠陥により、CGI スクリプトなどの解釈されたファイルのソースが漏洩する可能性があります。
この問題は Apache 2.4.49 と 2.4.50 のみに影響し、それ以前のバージョンには影響しません。
現在、2 つの方法があります。
/etc/apache2/apache2.conf に以下を編集します。<!-- Vulnerable (Require all granted in '/') -->
<Directory />
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<!-- Patched (Require all denied in '/') -->
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
スクリプトは次のように使用します:
CVE-2021-41773.py [-h] [--nosslcheck] [--cores CORES] [--file TARGETFILE] host
Checks if an apache server is vulnerable to CVE-2021-41773.
optional arguments:
-h, --help show this help message and exit
--host HOST ip/domain to be checked e.g. 'https://google.com/'.
--nosslcheck, -n Do not verify ssl certificates.
--cores CORES, -C CORES
Specify number of cores that should be dedicated to the task, default: 1
--file TARGETFILE, -f TARGETFILE
Specify file to fetch list of hosts from, example: "/home/user/Desktop/myfile.txt"
--rce, -r When toggled checks if target is susceptible to RCE (NOT YET IMPLEMENTED!)