report icon indicating copy to clipboard operation
report copied to clipboard

ssrf漏洞

Open unam4 opened this issue 2 years ago • 0 comments

This is the Chinese report, the English report is in(这是中文的漏洞报告,英文的在): Arbitrary SSRF vulnerability

描述

AJ-Report是全开源的一个BI平台,酷炫大屏展示,能随时随地掌控业务动态,让每个决策都有数据支撑。

@PostMapping("/testConnection") 在测试链接中,没有做限制,攻击可以构造恶意地址来探测内网。

漏洞详细

该接口接收请求,交给 ***testConnection()***进行处理

com.anjiplus.template.gaea.business.modules.datasource.controller#testConnection() image 来到com.anjiplus.template.gaea.business.modules.datasource.service.impl#testConnection image 可以看到使用了case语句,选择http通信。 com.anjiplus.template.gaea.business.modules.datasource.service.impl#testHttp() org.springframework.web.client#exchange() org.springframework.web.client#execute() image image image 根据以上调用取得会从dto中取得url、httpMethod,在doExecute()执行。 org.springframework.web.client#doExecute() image 可以看见传进来的没有限制,直接执行请求。

测试

image image 这里是任意方法的请求,危险的delete、put。 image image image

这里进行端口测试,可以发现返回的长度是不一样的。不存在会返回failed: Connection refused" 字符串。特征明显。

unam4 avatar Dec 05 '22 22:12 unam4