🇰🇷 한글 설명
MCCMS v2.7.0의 sys\apps\controllers\api\Gf.php 파일 내 index() 메서드에서 SSRF 취약점이 발견되었습니다. 공격자는 하드코딩된 암호화 키를 이용해 조작된 pic 파라미터를 전달함으로써 내부 네트워크 주소나 로컬 파일 시스템(file:// 프로토콜 등)에 접근할 수 있습니다. 이를 통해 민감한 설정 파일이나 로그 파일을 탈취하여 정보 유출 및 시스템 침해를 일으킬 수 있습니다.
💡 쉬운 설명
웹사이트의 특정 기능을 악용해 서버 내부의 비밀 파일이나 다른 컴퓨터에 몰래 접근할 수 있는 보안 약점입니다. 공격자가 가짜 주소를 암호화해서 보내면 서버가 이를 믿고 내부 정보를 공격자에게 넘겨줄 수 있습니다.
🇺🇸 원문 (English)
MCCMS v2.7.0 has an SSRF vulnerability located in the index() method of the sys\apps\controllers\api\Gf.php file, where the pic parameter is processed. The pic parameter is decrypted using the sys_auth($pic, 1) function, which utilizes a hard-coded key Mc_Encryption_Key (bD2voYwPpNuJ7B8), defined in the db.php file. The decrypted URL is passed to the geturl() method, which uses cURL to make a request to the URL without proper security checks. An attacker can craft a malicious encrypted pic parameter, which, when decrypted, points to internal addresses or local file paths (such as http://127.0.0.1 or file://). By using the file:// protocol, the attacker can access arbitrary files on the local file system (e.g., file:///etc/passwd, file:///C:/Windows/System32/drivers/etc/hosts), allowing them to read sensitive configuration files, log files, and more, leading to information leakage or system exposure. The danger of this SSRF vulnerability includes accessing internal services and local file systems through protocols like http://, ftp://, and file://, which can result in sensitive data leakage, remote code execution, privilege escalation, or full system compromise, severely affecting the system's security and stability.
⚔️ 공격 벡터
하드코딩된 키로 암호화된 조작된 pic 파라미터를 전달하여 내부 서비스 및 로컬 파일에 접근
🛡️ 대응 방법
하드코딩된 암호화 키를 제거하고, 입력된 URL에 대한 화이트리스트 기반의 프로토콜 및 도메인 검증 로직을 구현하십시오.
🔧 검증 코드
명령어 실행 결과 해당 파일에서 하드코딩된 암호화 키가 발견되면 취약한 상태입니다.
grep -r "Mc_Encryption_Key" sys/apps/controllers/api/Gf.php