🇰🇷 한글 설명
Qualys Cloud Agent의 언인스톨 스크립트(qagent_uninstall.sh)가 절대 경로 없이 시스템 명령어를 호출하고 $PATH를 검증하지 않아 보안 취약점을 가집니다. sudo 권한으로 실행 시 공격자가 $PATH를 조작하여 악의적 바이너리를 실행시킬 수 있으며, 이를 통해 로컬 권한 상승 및 임의 명령어 실행이 가능합니다.
💡 쉬운 설명
Qualys 에이전트 제거 스크립트가 프로그램 실행 경로를 안전하게 지정하지 않아서, 관리자가 제거할 때 공격자가 악의적인 프로그램을 대신 실행하도록 속일 수 있습니다. 이를 통해 최고 권한으로 원하지 않는 명령어가 실행될 수 있습니다.
🇺🇸 원문 (English)
The Qualys Cloud Agent included a bundled uninstall script (qagent_uninstall.sh), specific to Mac and Linux supported versions that invoked multiple system commands without using absolute paths and without sanitizing the $PATH environment. If the uninstall script is executed with elevated privileges (e.g., via sudo) in an environment where $PATH has been manipulated, an attacker with root/sudo privileges could cause malicious executables to be run in place of the intended system binaries. This behavior can be leveraged for local privilege escalation and arbitrary command execution under elevated privileges.
📍 영향받는 시스템
Qualys Cloud Agent (Mac, Linux 버전 모두)
⚔️ 공격 벡터
sudo 권한으로 qagent_uninstall.sh 실행 시 $PATH 환경변수 조작을 통한 로컬 권한 상승
🛡️ 대응 방법
Qualys Cloud Agent를 최신 보안 패치가 적용된 버전으로 업데이트하거나 언인스톨 스크립트 사용 시 절대 경로 검증 확인
🔧 검증 코드
Qualys 패키지가 설치된 경우 버전 정보가 표시되며, 보안 패치 버전 이상으로 업데이트 필요
dpkg -l 2>/dev/null | grep -i qualys || rpm -qa 2>/dev/null | grep -i qualys