2022-Spring Cloud Gateway 远程代码执行漏洞(CVE-2022-22947)

2022-Spring Cloud Gateway 远程代码执行漏洞(CVE-2022-22947

202246

22:38

今年spring爆出来的漏洞还不少,先从22947开始:

漏洞成因:

Spring官方博客发布了一篇关于Spring Cloud GatewayCVE报告,据公告描述,当启用和暴露 Gateway Actuator 端点时,使用 Spring Cloud Gateway 的应用程序可受到代码注入攻击。攻击者可以发送特制的恶意请求,从而远程执行任意代码。

影响的版本:

3.1.0

3.0.03.0.6

Spring Cloud Gateway 其他已不再更新的版本

修复方案:

修复方案有:

3.1.x 版本用户应升级到 3.1.1+ 版本,3.0.x 版本用户应升级到 3.0.7+ 版本。在不影响业务的前提下,通过将配置选项 management.endpoint.gateway.enabled 设置为 false 禁用 gateway actuator endpoint

搭建好环境:

·

之后使用相关exp反弹shell即可:

exp的位置:

E:\A-note-note\漏洞复现\2022-Spring Cloud Gateway 远程代码执行漏洞(CVE-2022-22947

现在本地起一个nc:

这里可以使用官方带的poc让路由执行下poc,或者使用这个工具CVE-2022-22947-POC

之后可以使用exp进行反弹shell,首先生成反弹shell:

之后攻击机执行,返回root权限:

posted @ 2022-04-06 23:59  逆向菜狗  阅读(685)  评论(0编辑  收藏  举报