不安全的直接对象引用(Insecure Direct Object Reference,简称IDOR)是一种安全漏洞,指在系统中直接暴露敏感对象的引用,使攻击者可以通过修改对象引用来越权访问未经授权的资源。
Task1 What is an IDOR?什么是 IDOR?
Task2 An IDOR ExampleIDOR 示例
第一阶段
将网页里面的选项依次点击
这个点击不了 本来怀疑
这个有问题 可以点击
这个是tryhackme的广告
这个是朋友的扑克邀请
第二阶段
翻译一下
按照要求切换订单号
第三阶段
翻译一下
任务完成 获取到flag
Task3 Finding IDORs in Encoded IDs在编码 ID 中查找 IDOR
When passing data from page to page either by post data, query strings, or cookies, web developers will often first take the raw data and encode it. Encoding ensures that the receiving web server will be able to understand the contents. Encoding changes binary data into an ASCII string commonly using thea-z, A-Z, 0-9 and =
character for padding. The most common encoding technique on the web is base64 encoding and can usually be pretty easy to spot. You can use websites like Base64 Decode and Encode - Online to decode the string, then edit the data and re-encode it again using Base64 Encode and Decode - Online and then resubmit the web request to see if there is a change in the response.
当通过帖子数据、查询字符串或 cookie 在页面之间传递数据时,Web 开发人员通常首先会获取原始数据并对其进行编码。编码确保接收到数据的 Web 服务器能够理解内容。编码通常使用a-z, A-Z, 0-9 and =
用于填充的字符。网络上最常用的编码技术是 base64 编码,通常很容易识别。你可以使用像 https://www.base64decode.org/ 这样的网站来解码字符串,然后编辑数据并使用 https://www.base64encode.org/ 再次对其进行重新编码,然后重新提交网络请求,看看响应是否有变化。
See the image below as a graphical example of this process:
请看下图作为这个过程的图形示例:
Task4 Finding IDORs in Hashed IDs在哈希 ID 中查找 IDOR
Hashed IDs 哈希 ID
Hashed IDs are a little bit more complicated to deal with than encoded ones, but they may follow a predictable pattern, such as being the hashed version of the integer value. For example, the Id number 123 would become 202cb962ac59075b964b07152d234b70 if md5 hashing were in use.
哈希 ID 的处理比编码 ID 稍微复杂一些,但它们可能遵循一个可预测的模式,例如成为整数值的哈希版本。例如,如果使用 md5 哈希,ID 号 123 将变为 202cb962ac59075b964b07152d234b70。
It's worthwhile putting any discovered hashes through a web service such as CrackStation - Online Password Hash Cracking - MD5, SHA1, Linux, Rainbow Tables, etc. (which has a database of billions of hash to value results) to see if we can find any matches.
值得将任何发现的哈希值放入像 CrackStation - Online Password Hash Cracking - MD5, SHA1, Linux, Rainbow Tables, etc. 这样的 Web 服务中 (该服务有一个包含数十亿哈希值的数据库来评估结果), 看看我们是否能找到任何匹配。
Task5 Finding IDORs in Unpredictable IDs在不可预测的 ID 中查找 IDOR
Tesk6 Where are IDORs locatedIDOR 位于何处
Where are they located?它们位于哪里?
The vulnerable endpoint you're targeting may not always be something you see in the address bar. It could be content your browser loads in via an AJAX request or something that you find referenced in a JavaScript file.
你瞄准的脆弱端点可能并不总是你在地址栏中看到的内容。它可能包含你的浏览器通过 AJAX 请求加载的内容,或者你在 JavaScript 文件中发现引用的内容。
Sometimes endpoints could have an unreferenced parameter that may have been of some use during development and got pushed to production. For example, you may notice a call to /user/details displaying your user information (authenticated through your session). But through an attack known as parameter mining, you discover a parameter called user_id that you can use to display other users' information, for example, /user/details?user_id=123.
有时,端点可能会有一个未引用的参数,这个参数在开发过程中可能有一些用处,并被推送到生产环境中。例如,你可能会注意到对 /user/details 的调用显示了你的用户信息 (通过会话验证)。但是,通过称为参数挖掘的攻击,你发现了一个名为 user_id 的参数,你可以用它来显示其他用户的信息,例如:/user/details?user_id=123。
Tesk7 A Practical IDOR Example一个实用的 IDOR 示例
问题一
后面操作用自己机子会出问题这里使用攻击机
发现这个网站在跟踪我们 理论上我们只要随便输入id
就能不通过密码访问其它账户
获取信息
现在双击红框框住的
现在将id变为1
来访问 id为1 的信息
问题二
按照要求访问 id为3 的