forked from gnuboard/gnuboard5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
17 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
241848a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
회원정보찾기 인증키에서 임시비번(
mb_lost_certify
)과 가입일시(mb_datetime
)의 해시값(sql_password
)을 빼고, 그 대신 랜덤으로 생성된 일회용 난수(nonce)를 사용하여 인증 URL을 통한 개인정보 유출의 가능성을 차단하는 패치입니다.현재는 임시비밀번호의 해시값과 가입일시의 해시값을 인증키에 그대로 넣고 있어 메일 계정과 브라우저 히스토리를 통해 이런 정보가 유출될 우려가 있습니다. 당장 심각한 취약점은 아니지만, 그누보드는 기본적으로 보안이 약한 MySQL
PASSWORD()
함수로 해싱을 하고 있으며, 발급된 임시비밀번호를 변경하지 않는 회원도 많다는 점에서 약간의 위험성이 있다고 할 수 있습니다. 가입일시와 임시비밀번호는 경우의 수가 얼마 되지 않으므로, 해시값이 포함된 URL을 공격자가 손에 넣는다면 불과 몇 분만에 무차별 대입 공격에 성공할 수도 있습니다.그러나 인증키에 반드시 비번과 가입일시를 사용해야 한다는 법은 없습니다. 정보찾기를 요청한 회원 본인 외에는 클릭하지 못하도록 하는 것이 목적이므로, 타인이 추측하기 어렵고 중복되지 않는 값이라면 어떤 것이든 상관없습니다.
이 패치에서는
rand()
함수를 반복 호출하여 124비트 내외의 무의미한 데이터를 수집한 후, 16진수 32자리의 형태로 정리하여 인증키로 사용하도록 하였습니다. 이렇게 생성한 일회용 난수(mb_nonce
) 하나만을 URL에 넣어 전달함으로써 개인정보 유출의 위험도 낮추고 URL의 길이도 다소 줄였습니다.