🇰🇷 한글 설명
Emlog는 오픈 소스 웹사이트 빌딩 시스템입니다. Emlog v2.6.1 및 이전 버전은 미디어 파일 업로드를 위한 REST API 엔드포인트(/index.php?rest-api=upload)를 노출합니다. 이 엔드포인트는 파일 유형, 확장자 및 내용에 대한 적절한 유효성을 검사하지 못하여 인증된 공격자(유효한 API 키 또는 관리자 세션 쿠키가 있는 경우)가 任意 파일(包括 악성 PHP 스크립트)을 서버에 업로드할 수 있습니다. 공격자는 관리자 액세스를 얻거나 정보 공개 취약점을 통해 API 키를 얻을 수 있습니다. 업로드된 악성 PHP 파일은 원격 코드 실행(RCE)을 수행하여 대상 서버를 완전히 손상시킬 수 있습니다.
💡 쉬운 설명
Emlog 웹사이트 빌딩 시스템의 취약점으로 인해 악성 파일을 업로드하여 서버를 손상시킬 수 있습니다. 공격자는 유효한 API 키 또는 관리자 세션 쿠키가 필요합니다. 이 취약점을 이용하여 원격 코드 실행이 가능해집니다.
🇺🇸 원문 (English)
Emlog is an open source website building system. emlog v2.6.1 and earlier exposes a REST API endpoint (/index.php?rest-api=upload) for media file uploads. The endpoint fails to implement proper validation of file types, extensions, and content, allowing authenticated attackers (with a valid API key or admin session cookie) to upload arbitrary files (including malicious PHP scripts) to the server. An attacker can obtain the API key either by gaining administrator access to enable the REST API setting, or via information disclosure vulnerabilities in the application. Once uploaded, the malicious PHP file can be executed to gain remote code execution (RCE) on the target server, leading to full server compromise.
📍 영향받는 시스템
Emlog v2.6.1 및 이전 버전
⚔️ 공격 벡터
인증된 공격자가 REST API 엔드포인트를 이용하여 악성 파일을 업로드
🛡️ 대응 방법
Emlog를 최신 버전으로 업데이트하고, REST API 설정을 비활성화하거나, 관리자 세션 쿠키를 안전하게 관리
🔧 검증 코드
로컬에서 Emlog가 설치되어 있는 경우, Python을 사용하여 REST API 엔드포인트의 노출 여부를 확인할 수 있습니다. 코드를 실행하기 전에 Python이 설치되어 있는지 확인하세요. 코드는 REST API 엔드포인트에 GET 요청을 보내고, 상태 코드를 확인하여 취약점 여부를 판단합니다.
python -c "import requests; r = requests.get('http://localhost/index.php?rest-api=upload'); print(r.status_code)"
if [ $? -eq 0 ]; then echo '{"result": "취약", "reason": "REST API 엔드포인트가 노출됨"}'; else echo '{"result": "양호", "reason": "REST API 엔드포인트가 비노출됨"}'; fi