实验:访问私有 GraphQL 帖子
发布: (2026年1月14日 GMT+8 11:36)
2 分钟阅读
原文: Dev.to
Source: Dev.to
描述
此实验的博客页面包含一篇隐藏的博客文章,里面有一个秘密密码。要完成实验,找到隐藏的博客文章并输入密码。
链接:
问题分析
Recon
-
访问博客页面 → 文章通过 POST 请求加载到
/graphql/v1。 -
在响应中,文章的 ID 是顺序的:1、2、4、5… → 缺少 ID 3 → 怀疑有一篇 ID 为 3 的隐藏文章

-
第 3 篇文章被隐藏

利用
步骤 1:插入特殊查询
-
在 Repeater 中右键 → GraphQL > Set introspection query → 发送请求 → 响应返回完整 schema。

-
找到
BlogPost类型 → 发现字段 postPassword 存在。
步骤 2:查询 ID 为 3 的隐藏文章并获取 postPassword
- 在 Repeater 中切换到 GraphQL 选项卡。
- Variables 面板: 将
"id": 1改为"id": 3。 - Query 面板: 在
getBlogPost(id: $id)内部添加字段postPassword。
query {
getBlogPost(id: 3) {
id
title
isPrivate
postPassword
summary
}
}
返回结果中包含 id = 3 的文章密码。
提交

