🇰🇷 한글 설명
GeoVision GV-VMS V20 20.0.2의 WebCam Server 로그인 기능에 스택 오버플로우 취약점이 존재합니다. 특수하게 조작된 HTTP 요청으로 인증 없이 임의 코드 실행이 가능합니다. 원인은 sscanf 호출 시 추출 문자열의 길이 제한이 없어 40바이트 스택 버퍼를 초과하는 데 있습니다.
💡 쉬운 설명
로그인 과정에서 입력값의 길이를 확인하지 않아 저장 공간을 넘치게 만들 수 있습니다. 공격자는 로그인 없이 악성 요청을 보내 서버를 장악할 수 있습니다.
🇺🇸 원문 (English)
A stack overflow vulnerability exists in the WebCam Server Login functionality of GeoVision GV-VMS V20 20.0.2. A specially crafted HTTP request can lead to an arbitrary code execution. An attacker can make an unauthenticated HTTP request to trigger this vulnerability.
#### Stack-overflow via unconstrained sscanf
The call to `sscanf` at [1] to split the `Buffer` variable into the `username` and `password` variables doesn't limit the size of the extracted content to match the destination buffers' sizes. In this case, if either the username or password decoded from the authorization string exceeds `40` characters (the size the stack variables `username` and `password`) then a stack overflow will occur.
The data is controlled by an attacker, but sronger constraints (e.g. no null bytes) may make exploitation harder. A successful attack could lead to full code execution as SYSTEM on the machine running the service.
📍 영향받는 시스템
GeoVision GV-VMS V20 20.0.2 (WebCam Server 로그인 기능)
⚔️ 공격 벡터
인증되지 않은 공격자가 조작된 HTTP Authorization 헤더를 전송하여 스택 오버플로우를 유발하고 SYSTEM 권한으로 임의 코드를 실행
🛡️ 대응 방법
GeoVision 공식 패치 버전으로 업데이트하고, 패치 전까지 WebCam Server 서비스에 대한 외부 접근을 네트워크 레벨에서 차단
🔧 검증 코드
출력된 버전이 20.0.2이면 취약하므로 즉시 패치가 필요하며, 설치되지 않았거나 다른 버전이 표시되면 해당 시스템은 이 취약점의 영향을 받지 않습니다.
wmic product where "name like '%GV-VMS%'" get name,version 2>nul || powershell -c "Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName -like '*GV-VMS*'} | Select-Object DisplayName,DisplayVersion"