🇰🇷 한글 설명
Simple Machines Forum의 index.php에서 theme_dir 필드의 경로 탐색을 통해 인증된 사용자가 임의의 로컬 파일을 실행하도록 설정할 수 있는 취약점입니다. 공격자는 attachments 디렉토리에 업로드된 PHP 파일을 통해 원격 코드 실행이 가능합니다.
💡 쉬운 설명
Simple Machines Forum 게시판에서 인증된 사용자가 특수한 입력값으로 서버의 임의 파일을 실행시킬 수 있는 결함입니다. 공격자는 PHP 파일을 업로드하고 실행하여 서버를 완전히 제어할 수 있습니다.
🇺🇸 원문 (English)
Directory traversal vulnerability in index.php in Simple Machines Forum (SMF) 1.0 before 1.0.15 and 1.1 before 1.1.7 allows remote authenticated users to configure arbitrary local files for execution via directory traversal sequences in the value of the theme_dir field during a jsoption action, related to Sources/QueryString.php and Sources/Themes.php, as demonstrated by a local .gif file in attachments/ with PHP code that was uploaded through a profile2 action to index.php.
📍 영향받는 시스템
Simple Machines Forum 1.0 (1.0.15 이전), SMF 1.1 (1.1.7 이전)
⚔️ 공격 벡터
인증된 사용자가 jsoption 액션에서 theme_dir에 경로 탐색 시퀀스(../)를 입력하고, 프로필 업로드로 PHP 코드를 .gif 파일로 위장하여 attachments에 업로드 후 실행
🛡️ 대응 방법
SMF 1.0.15 또는 1.1.7 이상으로 즉시 업그레이드
🔧 검증 코드
파일이 출력되면 취약한 SMF가 설치되어 있으며, 아무것도 출력되지 않으면 SMF가 설치되어 있지 않거나 이미 패치되었습니다.
find /var/www/html -name 'index.php' -path '*/smf/*' 2>/dev/null | xargs grep -l 'theme_dir' 2>/dev/null | head -1