🇰🇷 한글 설명
Network UPS Tools 2.8.3부터 2.8.5까지의 upsmon은 서버에서 전달된 ups.alarm 값을 검증 없이 notify(), async_notify(), wall() 함수의 셸 명령에 삽입합니다. NOTIFYCMD와 EXEC 설정이 된 환경에서 알람 텍스트에 포함된 셸 메타문자가 실행되어, upsmon 계정(보통 root)으로 임의의 OS 명령이 실행될 수 있습니다. 이 취약점은 2.8.6에서 수정되었습니다.
💡 쉬운 설명
UPS 장비 상태 알림 문자열에 악성 명령이 숨겨지면 서버가 그 명령을 실행해버리는 문제입니다. 공격자가 알림 값을 조작하면 관리자 권한으로 시스템을 장악할 수 있습니다.
🇺🇸 원문 (English)
Network UPS Tools is a collection of programs which provide a common interface for monitoring and administering UPS, PDU and SCD hardware. From 2.8.3 to 2.8.5, upsmon in clients/upsmon.c inserts the server-supplied ups.alarm value into shell commands executed by notify(), async_notify(), and wall(). When a monitored device reports an ALARM state and an operator has configured NOTIFYCMD with EXEC in NOTIFYFLAG ALARM, shell metacharacters in the alarm text are evaluated on POSIX or Windows and can execute arbitrary operating-system commands as the upsmon account, which is commonly root. An attacker can control the value through a malicious or compromised upsd, a man-in-the-middle on a plaintext upsd to upsmon connection, or a compromised UPS device whose driver supplies the alarm upstream of upsd; TLS between upsd and upsmon does not mitigate the compromised-device path. This vulnerability is fixed in 2.8.6.
📍 영향받는 시스템
Network UPS Tools 2.8.3 ~ 2.8.5 (upsmon 사용 환경, POSIX 및 Windows)
⚔️ 공격 벡터
악성 또는 침해된 upsd, 평문 upsd-upsmon 연결에 대한 중간자 공격, 또는 알람 값을 조작하는 손상된 UPS 장치를 통해 알람 텍스트에 셸 메타문자를 주입
🛡️ 대응 방법
Network UPS Tools를 2.8.6 이상으로 업데이트하고, 업데이트 전까지 NOTIFYCMD의 EXEC 플래그 사용을 중단
🔧 검증 코드
출력된 버전이 2.8.3 이상 2.8.5 이하이면 취약하며, 2.8.6 이상이면 패치된 상태입니다.
upsmon -V 2>/dev/null | head -n 1