(description='Poc CVE-2022-22947:') 54 parameter.add_argument('--file',help='url file',required=False) 55 parameter.add_argument('--url',help='ip:port',required=False) 56 para = parameter.parse_args() 57 58 if para.url: 59 exploit(para.url) 60 exit() 61 else: 62 parameter....
当 Spring Cloud Gateway 的 Actuator 端点启用、公开且不安全时,使用 Spring Cloud Gateway 的应用程序容易受到代码注入攻击,从而触发 CVE-2022-22947 漏洞。 3. PoC(Proof of Concept)的 YAML 格式示例 以下是一个针对 CVE-2022-22947 的 PoC 示例,采用 YAML 格式: yaml spring: cloud: gateway: routes: -...
Spring Cloud Gateway是Spring Cloud的一个全新项目,该项目是基于 Spring Framework 和 Spring Boot 构建的 API 网关,它旨在为微服务架构提供一种简单、有效、统一的 API 路由管理方式。近日,新华三攻防实验室威胁预警团队监测到网上爆发了Spring Cloud Gateway代码注入漏洞(CVE-2022-22947),成功利用此漏洞可以在受害主机...
Spring Cloud Gateway 是Spring Cloud 生态中的API网关,包含限流、过滤等API治理功能。 Spring官方在2022年3月1日发布新版本修复了Spring Cloud Gateway中的一处代码注入漏洞。当actuator端点开启或暴露时,可以通过http请求修改路由,路由中包含的恶意filter参数会经过SPEL表达式解析,从而导致远程主机执行任意代码。 影响范围...
spring cloud gateway rce(CVE-2022-22947)分析 环境搭建 https://github.com/spring-cloud/spring-cloud-gateway/releases/tag/v3.0.6 漏洞分析 该漏洞造成原因是因为配置可写+SPEL表达式的解析导致的 SpEL表达式的触发方式有3种,xml,注释,直接传参。这里基本不可能是将恶意poc传到注释中,或者写入到xml中,所以...
CVE-2022-22947 SpringCloud GateWay SPEL RCE分析 环境 git clone https://github.com/spring-cloud/spring-cloud-gateway cd spring-cloud-gateway git checkout v3.1.0 POC POST/actuator/gateway/routes/new_routeHTTP/1.1Host:127.0.0.1:8080Connection:closeContent-Type:application/json{"id":"hacktest","...
函数参数args再对应到上一个函数调用的properties参数。回顾前面的Poc可知,即"filters"的"args"。 再向上回溯,发现是在bind()的流程中会进行一个参数解析的触发。那么查看Callers of bind即可知道有哪些触发机会。其中橘色方框的loadGatewayFilters触发链即为前面AddResponseHeader Filter的触发链,绿色的combinePredicates链...
近日,绿盟科技CERT监测到Spring发布报告修复Spring Cloud Gateway代码注入漏洞(CVE-2022-22947),由于Spring Cloud Gateway的Actuator端点存在缺陷,当用户启用并暴露了不安全的 Gateway Actuator 端点时,使用了 Spring Cloud Gateway的应用程序容易受到代码注入攻击。未经身份验证的攻击者通过向目标系统发送特制的SpEL表达式进行...
持续更新:整理下渗透测试工作中发现过的漏洞(包含漏洞描述、漏洞等级、漏洞验证、修复建议),这里不深究漏洞产生的各种后利用或者绕过方式,漏洞验证过程不局限于文章中的方法,能够证明漏洞存在即可。 0x01 漏洞描述 - Spring Cloud Gateway远程代码执行漏洞(CVE-2022-22947) - ...
b ='python CVE-2022-22947_POC.py url.txt' uri_check='/actuator/gateway/routes/code' uri_refresh='/actuator/gateway/refresh' headers = { 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Accept-Language': 'en', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) Ap...