
Jasmin 랜섬웨어 웹 패널 경로 탐색 PoC
#EducationalPurposes
https://github.com/codesiddhant/Jasmin-Ransomware
Jasmin Ransomware 웹 패널에서 사전 인증 경로 탐색 취약점(CVE-2024-30851)을 발견했습니다. 이를 통해 공격자는 패널 운영자의 익명성을 해제하고 암호 해독 키를 덤프할 수 있습니다. Jasmin ransomware는 최근 TeamCity(CVE-2024-27198, CVE-2024-27199) 악용 캠페인에서 관찰되었습니다(https://twitter.com/brody_n77/status/1765145148227555826)
Screencast from 2024-04-04 18-51-07.webm
영향을 받는 엔드포인트(Jasmin-Ransomware/Web Panel/download_file.php)는 Location 헤더를 전송한 후 die() 호출에 실패합니다. 이로 인해 공격자는 인증 요구 사항을 우회할 수 있습니다. readfile 호출이 살균되지 않아 공격자가 임의 파일을 읽을 수 있습니다.
<?php
session_start();
if(!isset($_SESSION['username']) ){
header("Location: login.php");
}
$file=$_GET['file'];
if(!empty($file)){
// Define headers
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Disposition: attachment; filename=$file");
header("Content-Type: text/encoded");
header("Content-Transfer-Encoding: binary");
// Read the file
readfile($file);
또한 다수의 SQLi가 있으며, 그 중 하나가 악용되어 로그인을 우회하고 암호 해독 키의 파일 이름을 획득할 수 있습니다.