总字符数: 9.66K
代码: 无, 文本: 2.49K
预计阅读时间: 11 分钟

一、什么是业务逻辑漏洞?
业务逻辑漏洞就是指攻击者利用业务/功能上的设计缺陷,获取敏感信息或破坏业务的完整性.一般出现在密码修改、越权访问、密码找回、交易支付金额等功能处. 逻辑漏洞的破坏方式并非是向程序添加破坏内容,而是利用逻辑处理不严密或代码问题或固有不足,进行漏洞利用的一个方式.
二、BP靶场之11关
Security Issue | Description |
---|---|
Excessive trust in client-side controls | 过度信任客户端控件 |
High-level logic vulnerability | 高级逻辑漏洞 |
Inconsistent security controls | 不一致的安全控制 |
Flawed enforcement of business rules | 业务规则执行上的缺陷 |
Low-level logic flaw | 低级逻辑缺陷 |
Inconsistent handling of exceptional input | 异常输入的不一致处理 |
Weak isolation on dual-use endpoint | 两用端点上的弱隔离 |
Insufficient workflow validation | 工作流验证不足 |
Authentication bypass via flawed state machine | 通过有缺陷的状态机绕过认证 |
Infinite money logic flaw | 无限金钱逻辑缺陷 |
Authentication bypass via encryption oracle | 通过加密oracle绕过身份验证 |
三、靶场实践
1、Excessive trust in client-side controls(过度信任客户端控件)
用户可控数据:一个根本性的错误假设是用户将只通过提供的Web界面与应用程序交互,导致进一步假设客户端验证将防止用户提供恶意输入.但攻击者可以简单地使用Burp Proxy等工具,在浏览器发送数据之后、传递到服务器端逻辑之前篡改数据.这实际上使客户端控件变得无用
数据完整性检测:如果只接受数据的表面价值,而不执行适当的完整性检查和服务器端验证,攻击者就可以以相对最小的努力进行各种破坏.它们能够实现的具体效果取决于功能以及它对可控数据所做的操作.在适当的情况下,这种缺陷可能会对业务相关功能和网站本身的安全性造成破坏性后果.




然后我们查看一下HTPTP历史,寻找具有支付信息的数据包

然后我们将这个数据包发送给repeater(也就是重发器)

发送到重发器后进行更改金额

关闭代理刷新一下,然后看一下刷新后的页面

点击支付后,这个靶场就会显示通关

2、High-level logic vulnerability(高级逻辑漏洞)

抓一个发现没有价格金额这个参数


但是我们发现这个数目可以是负数,那我们就试一下是否可以增加其他的商品,试一下是否可以将他们的数目更改为负数.

然后我们进行抓包,查看是否能更改数目为负数


但是我们的余额为100,所以还得继续增加负数,直到价格合适


成功
3、Inconsistent security controls(不一致的安全控制)

然后登录的时候发现还是不行,那就看一下页面中的其他信息,其中EMAIl client


然后我们重新注册一下

重新到email client中

发现注册成功




删除后发现成功了
4、Flawed enforcement of business rules(商业规则的执行有缺陷)
这里其实是一个优惠卷重复使用



发现弹窗


但是总体价格还是不够,尝试一下能不能再重复利用一下

发现只能交替使用


5、Low-level logic flaw(低级逻辑缺陷)


修改数值为99(100和负数不行),并发送,这里不使用负载相当于重放攻击


接下来添加另一个商品,将总金额控制在100一下


价格上可以进行改动一下
6、Inconsistent handling of exceptional input(异常输入的不一致处理)
7、Weak isolation on dual-use endpoint(两用端点上的弱隔离)
登录我们自己的账号后出现以下页面

我们可以尝试对账号密码进行修改,是否可以修改其他人的账号密码,先抓个包测试一下

删除后发现修改成功

我们继续尝试修改username为administrator

修改成功,我们用这个账号重新登录


然后删除,修改成功
8、Insufficient workflow validation(工作流验证不足)
这里我们先随便买一个在100刀以内的商品,看一下流程



现在我们买皮夹克,虽然价格不够,但是我们再观察观察

抓个包分析一下

跟上面的数据包对比一下,发现POST和GET传的不一样,我们修改一下,尝试一下

一直放包,可以购买成功
9、Authentication bypass via flawed state machine(通过有缺陷的状态机绕过认证)
先按照自己的账号登录一下

发现这里有个身份的选择

抓个包看一下


对比一下,发现好像没啥区别,但是我们尝试一下删除/role-selector直接访问首页,因为跳过了角色选择默认为administrator当访问首页是以administrator权限进行访问的因此会有Admin panel,再登录页面登录,我们再废掉这个身份选择这个数据包


删除rola-selector这个路径

发现出现amin panel这个页面

10、Infinite money logic flaw(无限金钱逻辑缺陷)

获得优惠卷

使用优惠券购买Gift Card礼品卡(礼品卡相当于一个10元的购物券可以赠送),当用3元优惠券购买10元的礼品卡,就相当于7元购买了10元然后再进行使用用户的余额就会多了3元将优惠券金额转换为真实的余额.



如果优惠券可以重复使用,就可以利用该操作达到无限金额的效果,成功复用优惠券,接下来就用bp的宏指令


找到以下几个页面



继续给第五个配置项目




线程设置为1