🇰🇷 한글 설명
Apache::Session::Generate::ModUniqueId 1.54~1.94 버전은 mod_unique_id 플러그인의 UNIQUE_ID 환경변수를 세션 ID로 사용하는데, 이 값에는 암호화나 난독화가 없어 공격자가 세션 ID를 추측할 수 있습니다. 서버 IP, 프로세스 ID, 타임스탐프는 공개되거나 쉽게 추측 가능하여 세션 가로채기 공격에 취약합니다.
💡 쉬운 설명
웹 서버의 세션 ID가 암호화되지 않은 환경변수에서 생성되어, 공격자가 이를 쉽게 추측할 수 있습니다. 서버 정보와 시간 정보를 조합하면 유효한 세션 ID를 만들 수 있게 되는 것입니다.
🇺🇸 원문 (English)
Apache::Session::Generate::ModUniqueId versions from 1.54 through 1.94 for Perl session ids are insecure.
Apache::Session::Generate::ModUniqueId (added in version 1.54) uses the value of the UNIQUE_ID environment variable for the session id. The UNIQUE_ID variable is set by the Apache mod_unique_id plugin, which generates unique ids for the request. The id is based on the IPv4 address, the process id, the epoch time, a 16-bit counter and a thread index, with no obfuscation.
The server IP is often available to the public, and if not available, can be guessed from previous session ids being issued. The process ids may also be guessed from previous session ids. The timestamp is easily guessed (and leaked in the HTTP Date response header).
The purpose of mod_unique_id is to assign a unique id to requests so that events can be correlated in different logs. The id is not designed, nor is it suitable for security purposes.
📍 영향받는 시스템
Apache::Session::Generate::ModUniqueId 1.54~1.94 버전
⚔️ 공격 벡터
서버 IP, 프로세스 ID, HTTP Date 헤더로부터 타임스탐프를 수집하여 UNIQUE_ID 값을 재구성하거나 추측함으로써 다른 사용자의 세션 ID를 위조
🛡️ 대응 방법
Apache::Session을 1.95 이상으로 업그레이드하거나 mod_unique_id를 사용하지 않는 세션 생성 방식으로 변경
🔧 검증 코드
버전이 1.94 이하이면 취약 버전입니다. 버전이 출력되지 않으면 모듈이 미설치된 상태입니다.
perl -e 'use Apache::Session::Generate::ModUniqueId; print $Apache::Session::Generate::ModUniqueId::VERSION' 2>/dev/null || echo 'Not installed'