4.10.0-Introduction_to_Business_Logic

Introduction to Business Logic

Testing for business logic flaws in a multi-functional dynamic web application requires thinking in unconventional methods. If an application’s authentication mechanism is developed with the intention of performing steps 1, 2, 3 in that specific order to authenticate a user. What happens if the user goes from step 1 straight to step 3? In this simplistic example, does the application provide access by failing open; deny access, or just error out with a 500 message?

There are many examples that can be made, but the one constant lesson is “think outside of conventional wisdom”. This type of vulnerability cannot be detected by a vulnerability scanner and relies upon the skills and creativity of the penetration tester. In addition, this type of vulnerability is usually one of the hardest to detect, and usually application specific but, at the same time, usually one of the most detrimental to the application, if exploited.

The classification of business logic flaws has been under-studied; although exploitation of business flaws frequently happens in real-world systems, and many applied vulnerability researchers investigate them. The greatest focus is in web applications. There is debate within the community about whether these problems represent particularly new concepts, or if they are variations of well-known principles.

Testing of business logic flaws is similar to the test types used by functional testers that focus on logical or finite state testing. These types of tests require that security professionals think a bit differently, develop abuse and misuse cases and use many of the testing techniques embraced by functional testers. Automation of business logic abuse cases is not possible and remains a manual art relying on the skills of the tester and their knowledge of the complete business process and its rules.

Business Limits and Restrictions

Consider the rules for the business function being provided by the application. Are there any limits or restrictions on people’s behavior? Then consider whether the application enforces those rules. It’s generally pretty easy to identify the test and analysis cases to verify the application if you’re familiar with the business. If you are a third-party tester, then you’re going to have to use your common sense or ask the business if different operations should be allowed by the application.

Sometimes, in very complex applications, the tester will not have a full understanding of every aspect of the application initially. In these situations, it is best to have the client walk the tester through the application, so that they may gain a better understanding of the limits and intended functionality of the application before the actual test begins. Additionally, having a direct line to the developers (if possible) during testing will help out greatly, if any questions arise regarding the application’s functionality.

Challenges of Logic Testing

Automated tools find it hard to understand context, hence it’s up to a person to perform these kinds of tests. The following two examples will illustrate how understanding the functionality of the application, the developer’s intentions, and some creative “out-of-the-box” thinking can break the application’s logic. The first example starts with a simplistic parameter manipulation, whereas the second is a real world example of a multi-step process leading to completely subverting the application.

Example 1:

Suppose an e-commerce site allows users to select items to purchase, view a summary page and then tender the sale. What if an attacker was able to go back to the summary page, maintaining their same valid session and inject a lower cost for an item and complete the transaction, and then check out?

Example 2:

Holding/locking resources and keeping others from purchasing these items online may result in attackers purchasing items at a lower price. The countermeasure to this problem is to implement timeouts and mechanisms to ensure that only the correct price can be charged.

Example 3:

What if a user was able to start a transaction linked to their club/loyalty account and then after points have been added to their account cancel out of the transaction? Will the points/credits still be applied to their account?

Tools

While there are tools for testing and verifying that business processes are functioning correctly in valid situations these tools are incapable of detecting logical vulnerabilities. For example, tools have no means of detecting if a user is able to circumvent the business process flow through editing parameters, predicting resource names or escalating privileges to access restricted resources nor do they have any mechanism to help the human testers to suspect this state of affairs.

The following are some common tool types that can be useful in identifying business logic issues.

When installing addons you should always be diligent in considering the permissions they request and your browser usage habits.

Intercepting Proxy

To Observe the Request and Response Blocks of HTTP Traffic

Web Browser Plug-ins

To view and modify HTTP/HTTPS headers, post parameters, and observe the DOM of the Browser

Miscellaneous Test Tools

References

Whitepapers

OWASP Related

Useful Sites

Books

《MATLAB编程与问题实用入门》是Stormy Attaway所著的一本MATLAB编程入门教材。这本书通过实例和问题驱动的方法,帮助读者深入理解MATLAB编程的基本概念和技巧。 这本书的主要内容包括MATLAB编程环境的介绍,基本语法和数据结构,控制流程,函数定义和调用,文件IO,图形和数学函数等。通过这些内容的学习,读者可以逐步掌握MATLAB编程的基本操作和基本概念。 与其他MATLAB编程教材相比,这本书的特点在于强调实践和问题解决。每一章都以一个具体的问题为例,通过对该问题的分析和解决过程,引导读者学习相关的MATLAB编程知识。这种问题驱动的学习方式能够提高读者的学习兴趣和动力,同时加深对MATLAB编程的理解和应用能力。 此外,书中还包含了大量的例子和练习题,读者可以通过自己的实践来巩固所学的知识。另外,书中也介绍了一些常见的MATLAB编程技巧和实用工具,如调试技巧、向量化编程、脚本文件和函数文件的编写等,这些内容对于提高编程效率和代码质量非常有帮助。 总而言之,《MATLAB编程与问题实用入门》是一本很好的MATLAB编程入门教材。它以实例和问题驱动的方式引导读者学习MATLAB编程的基本知识和技巧,并提供了大量的例子和练习题供读者巩固所学内容。无论是初学者还是有一定编程经验的读者,都可以通过这本书快速入门MATLAB编程,并能够应用于实际问题的解决中。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值