REST API|Leaking File Contents with a Blind File Oracle in Flarum

发布于 3 小时前  6 次阅读


Introduction Flarum is a free, open source PHP-based forum software used for everything from gaming hobbyist sites to cryptocurrency discussion. A quick survey on Shodan suggests there are over 1200 installs exposed to the internet. Through our research we were able to leak the contents of arbitrary local files in Flarum through a blind oracle, and conduct blind SSRF attacks with only a basic user

Leaking File Contents with a Blind File Oracle in Flarum
原文配图(来源:https://blog.assetnote.io/2023/08/28/leaking-file-contents-with-a-blind-file-ora)
REST API 评分 70.0 状态 candidate QGG-KB-20261020-009

一、核心思路

  • 【方法模板·非来源原文】【多参数联合校验失效(参数互串/凭证自证)】参数角色标注:对象标识(orderId)/凭证(codeId/uuid)/签名/状态,逐个标清
  • 来源链接: https://blog.assetnote.io/2023/08/28/leaking-file-contents-with-a-blind-file-oracle-in-flarum/
  • 分类命中词: {'REST API': ['api endpoint'], 'File Upload': ['file upload'], 'Information Disclosure': ['exposed'], 'SSRF': ['ssrf']}
落到 QGG 怎么用

可直接落到 QGG 的「REST API」测试清单:【多参数联合校验失效(参数互串/凭证自证)】参数角色标注:对象标识(orderId)/凭证(codeId/uuid)/签名/状态,逐个标清;仅可生成人工核查清单(缺请求级证据,禁自动生成生产模板)

二、成立条件

  • 【来源原文片段】his means that authenticated routes are also interesting, as long as they don’t require administrative permissions. We quickly figured out that files called routes.php in di
  • 【来源原文片段】his means that authenticated routes are also interesting, as long as they don’t require administrative permissions.We quickly figured out that files called routes.php in dif

三、验证方法与步骤

  • 【方法模板·非来源原文】【多参数联合校验失效(参数互串/凭证自证)】参数角色标注:对象标识(orderId)/凭证(codeId/uuid)/签名/状态,逐个标清
  • 【方法模板·非来源原文】【多参数联合校验失效(参数互串/凭证自证)】单参数消融:删/空/错类型/重复参数,记录错误文案差异,建立'什么是必需'基线
  • 【方法模板·非来源原文】【多参数联合校验失效(参数互串/凭证自证)】参数互串:把 A 参数的值塞进 B 参数的槽位(codeId=orderId);再试 A=B 同时同步递增
  • 【方法模板·非来源原文】【多参数联合校验失效(参数互串/凭证自证)】关系判定:只改一个 vs 两个同步改,结果差异说明校验是'逐个校验'还是'关系校验'
  • 【方法模板·非来源原文】【多参数联合校验失效(参数互串/凭证自证)】凭证强度:UUID 是否出现在 JS/其他接口/响应里(泄露即等于无凭证)
  • 【方法模板·非来源原文】【多参数联合校验失效(参数互串/凭证自证)】枚举可行性:对象 ID 是否顺序/自增/时间戳;只读 1-2 条他人实证即止
  • 【方法模板·非来源原文】入口发现:从 JS/路由/流量/历史路径交叉确认该漏洞类别的输入面,单一样本不下结论
  • 【方法模板·非来源原文】前置条件:记录认证状态、角色、数据所有权、组件与版本
  • 【方法模板·非来源原文】测试变量:参数位置、对象标识、方法、请求头、数据格式、状态切换
  • 【方法模板·非来源原文】成功证据:真实数据读取/命令执行回显/状态真实变更(可复现,带原始报文)
  • 【方法模板·非来源原文】误报过滤:登录跳转、统一错误页、WAF 阻断页、缓存内容、通用 200、非确定性字段
  • 【方法模板·非来源原文】影响确认:只读证明优先;写操作仅在自建 canary 对象上做一次最小验证

【缺失】来源未给出可执行复现步骤;需按 test_methodology 在授权靶场自行设计并记录

四、误报排除

  • 【来源原文片段】Path($this->data); // isBase64 has to be after isFilePath to prevent false positives case $this->isBase64(): return $this->initFromBinary
  • 【来源原文片段】got no response. If you are using this library, the best way to ensure you are not vulnerable is by never passing user data directly into the constructor; if you are wanting
反向证据

  • Path($this->data); // isBase64 has to be after isFilePath to prevent false positives case $this->isBase64(): return $this->initFromBinary
  • got no response. If you are using this library, the best way to ensure you are not vulnerable is by never passing user data directly into the constructor; if you are wanting

五、影响与修复

影响:

分类:REST API;来源严重性:未提供。实际影响需以本地/授权靶场复现结果为准,评分与来源自述不构成影响结论。

修复:

按该类漏洞的通用根因修复(服务端校验/白名单/最小权限),并补充回归测试。

关联:CVE-2023-40033

六、原始来源

https://blog.assetnote.io/2023/08/28/leaking-file-contents-with-a-blind-file-oracle-in-flarum/



レムは信じています。 蕾姆相信 …而是你怕自己,再次辜负了雷姆爱你的心。