🇰🇷 한글 설명
Go의 "go get" 명령어가 Subversion과 Git 저장소를 혼합한 악의적인 도메인을 통해 .git/hooks/의 실행 스크립트를 자동으로 실행하는 원격 코드 실행 취약점입니다. 공격자는 저장소 구조를 조작하여 패키지 다운로드 시 악성 명령어를 실행할 수 있습니다.
💡 쉬운 설명
Go 프로그래밍 언어의 패키지 설치 도구가 속지 않은 출처의 코드를 자동으로 실행합니다. 공격자가 특별한 웹사이트를 만들어 프로그래머가 패키지를 설치할 때 악의적인 프로그램을 몰래 실행하게 할 수 있습니다.
🇺🇸 원문 (English)
Go before 1.8.4 and 1.9.x before 1.9.1 allows "go get" remote command execution. Using custom domains, it is possible to arrange things so that example.com/pkg1 points to a Subversion repository but example.com/pkg1/pkg2 points to a Git repository. If the Subversion repository includes a Git checkout in its pkg2 directory and some other work is done to ensure the proper ordering of operations, "go get" can be tricked into reusing this Git checkout for the fetch of code from pkg2. If the Subversion repository's Git checkout has malicious commands in .git/hooks/, they will execute on the system running "go get."
📍 영향받는 시스템
Go 1.8.4 이전 및 Go 1.9.x 1.9.1 이전 버전
⚔️ 공격 벡터
커스텀 도메인에서 Subversion/Git 저장소 혼합 후 .git/hooks/에 악성 스크립트를 배치하여 go get 실행 시 자동 실행 유도
🛡️ 대응 방법
Go를 1.8.4 또는 1.9.1 이상으로 업데이트
🔧 검증 코드
명령이 버전을 출력하면 취약한 버전이며, 아무 출력이 없으면 안전한 버전입니다.
go version | grep -oE 'go1\.[0-8]|go1\.9\.0'