“This is not a valid use case”, “Why would somebody do something like that”. These are very famous statements we get, whenever we pointed out a security vulnerability. Security vulnerabilities are not functional issues or bugs. We can not use functional test cases to find security vulnerabilities.
Hacker don’t care about functional test cases, instead, they abuse the system to find security issues. Abusing the system is the most effective way of finding security issues, which will improve the actual quality of the system.
How we can abuse the application. It is pretty simple, as an example, let's take a valid test case or a use case. User logs in as Admin into the system, click on Add New User link and application should display the Add New User interface to the user. Relevant url will be something like www.yoursite.com/admin/createuser/. What if we try to access this url without login to the system or when user logs in as a normal user. How system should behave in this case. Technically this is a valid use case because if admin user logs in, user should be able to access the feature and if not, user should not be able to access the feature.
Let's take another example. User logs in and click on Edit Profile. System should navigate the user to the Edit Profile page and should display the profile data. The url will be something like www.yoursite.com/profile/edit?id=10894. What happened if the user changed the url like www.yoursite.com/profile/edit?id=10890. Can a user edit someone else's profile data?. What will happen if the user enters a string value for the id (eg. www.yoursite.com/profile/edit?id=missu). Will the system crash?.
We can go on and on like this and figure out how many valid scenarios were ignored. Functional use cases or test case can please the customer and your self but it can do very little for the resiliency of the system.
We need to abuse the system to achieve the real quality, make it capable of standing against malicious attacks and it should be before the attacker abuse it.
Hacker don’t care about functional test cases, instead, they abuse the system to find security issues. Abusing the system is the most effective way of finding security issues, which will improve the actual quality of the system.
How we can abuse the application. It is pretty simple, as an example, let's take a valid test case or a use case. User logs in as Admin into the system, click on Add New User link and application should display the Add New User interface to the user. Relevant url will be something like www.yoursite.com/admin/createuser/. What if we try to access this url without login to the system or when user logs in as a normal user. How system should behave in this case. Technically this is a valid use case because if admin user logs in, user should be able to access the feature and if not, user should not be able to access the feature.
Let's take another example. User logs in and click on Edit Profile. System should navigate the user to the Edit Profile page and should display the profile data. The url will be something like www.yoursite.com/profile/edit?id=10894. What happened if the user changed the url like www.yoursite.com/profile/edit?id=10890. Can a user edit someone else's profile data?. What will happen if the user enters a string value for the id (eg. www.yoursite.com/profile/edit?id=missu). Will the system crash?.
We can go on and on like this and figure out how many valid scenarios were ignored. Functional use cases or test case can please the customer and your self but it can do very little for the resiliency of the system.
We need to abuse the system to achieve the real quality, make it capable of standing against malicious attacks and it should be before the attacker abuse it.