🇰🇷 한글 설명
GitHacker 1.1.7 및 이전 버전에서 .git/HEAD 파일의 ref 경로를 검증 없이 처리하여 발생하는 경로 조작 취약점입니다. 공격자는 이를 통해 악성 서버를 대상으로 도구를 실행하는 피해자의 로컬 파일을 임의로 읽고, 특정 16진수 패턴의 존재 여부를 확인하여 파일 내용을 유추할 수 있습니다.
💡 쉬운 설명
Git 저장소를 복구하는 도구를 사용할 때, 공격자가 만든 가짜 서버를 이용해 사용자의 컴퓨터에 있는 중요한 파일을 몰래 훔쳐볼 수 있는 문제입니다. 파일 전체를 가져오지는 못하더라도 파일 안에 어떤 내용이 있는지 일부 알아낼 수 있습니다.
🇺🇸 원문 (English)
GitHacker is a tool that restores Git repositories from exposed .git directories. In 1.1.7 and earlier, add_head_file_tasks parses an attacker-controlled ref path from .git/HEAD and joins unvalidated path segments onto temp_dst/.git/logs/, allowing a malicious server to make GitHacker read an arbitrary local file when a victim runs the tool against the server's URL. add_hashes_parsed then scans the file for 40-character hexadecimal substrings and requests each match through .git/objects using the first two characters and remaining characters as path components, creating an attacker-observable existence oracle and disclosing matching hexadecimal fragments. Complete file contents are not returned, and the add_folder and add_task write path in shipped version 1.1.7 does not permit an escape. This issue is fixed in repository version 1.1.9.
📍 영향받는 시스템
GitHacker version 1.1.7 and earlier
⚔️ 공격 벡터
악성 서버의 .git/HEAD 경로를 조작하여 피해자의 로컬 파일 읽기 유도
🛡️ 대응 방법
GitHacker를 버전 1.1.9 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 1.1.9 미만이면 취약한 상태이며, 1.1.9 이상이면 안전합니다.
python3 -c 'import githacker; print(githacker.__version__)' 2>/dev/null || echo 'version not found'