🇰🇷 한글 설명
MantisBT 2.5.2 이하 버전에서 설치 후 admin 디렉토리가 삭제되지 않았고 MySQL의 local_infile 설정이 활성화된 경우, MySQL의 파일 읽기 기능을 악용하여 서버의 파일에 원격으로 접근할 수 있는 취약점입니다. 이를 통해 공격자는 인증 없이 민감한 설정 파일이나 소스 코드에 접근할 수 있습니다.
💡 쉬운 설명
MantisBT 설치 후 관리자 폴더를 삭제하지 않으면 해커가 MySQL의 설정을 이용해 서버의 중요한 파일들을 읽을 수 있습니다. 이는 호스팅 서버 설정이 특정 방식으로 되어 있을 때만 발생합니다.
🇺🇸 원문 (English)
If, after successful installation of MantisBT through 2.5.2 on MySQL/MariaDB, the administrator does not remove the 'admin' directory (as recommended in the "Post-installation and upgrade tasks" section of the MantisBT Admin Guide), and the MySQL client has a local_infile setting enabled (in php.ini mysqli.allow_local_infile, or the MySQL client config file, depending on the PHP setup), an attacker may take advantage of MySQL's "connect file read" feature to remotely access files on the MantisBT server.
📍 영향받는 시스템
MantisBT 2.5.2 이하 (MySQL/MariaDB 사용, local_infile 활성화)
⚔️ 공격 벡터
admin 디렉토리에 접근하여 MySQL local_infile을 악용해 원격 파일 읽기 수행
🛡️ 대응 방법
설치 후 admin 디렉토리 삭제, MySQL local_infile 비활성화, MantisBT 2.5.2 이상으로 업그레이드
🔧 검증 코드
패키지 설치 시 버전 확인, 소스 설치 시 설치 경로 확인. 버전이 2.5.2 이하이고 admin 디렉토리가 존재하면 취약함
dpkg -l 2>/dev/null | grep mantis | awk '{print $2,$3}' || find /var/www -name '*mantis*' -type d 2>/dev/null | head -3