
CVE-2020-28243 Local Privledge Escalation Exploit in SaltStack Minion
A command injection vulnerability in SaltStack's Salt allows for privilege escalation via specially crafted process names on a minion when the master calls restartcheck. For a full writeup please see this blog post
Affected Versions: All versions between 2016.3.0rc2 and 3002.2
For this exploit to work the following are needed:
restartcheck.restartcheck on this minion to trigger the exploit./exploit.sh -w PATH -c 'COMMAND'
-w PATH writable path (and not blocked by SaltStack)
-c COMMAND command to execute

When gcc is not available to compile the helper binary on the target machine, you can compile it on your machine and copy the binary over.
gcc helper.c -o ./helper -static
# Or for 32 bit:
gcc helper.c -o ./helper -m32 -static
Alternatively static binaries have been provided in this repo that you can use in the static folder.