Introduction
There are information and features in web applications which should only be accessible to certain users. An administrator dashboard should not be available to a normal user, and a user should not be able to see another user's private information.
Access controls are the security mechanisms used to enforce these restrictions.
If these controls are not in place or not applied properly, or are readily circumvented, a vulnerability called Broken Access Control may arise. This is a significant web application security threat as it could enable users to access data or act in ways that they are not authorized to.
What Is Access Control?
Access control defines the access or actions an authenticated user can undertake in an application.
For instance, an ecommerce site could have various permissions for:
* Customers
* Support employees
* Managers
* Administrators
Administrators can handle products and users and customers can view their orders. These permissions will be enforced by the application when requesting a protected resource or action.
What is Broken Access Control?
Broken Access Control is when an application does not properly limit access or actions of users.
For instance, let's say that you're developing an application that allows each customer to see his or her profile. If modifying a value in a request also provides access to another customer's profile, the application might be vulnerable to access-control issues.
The problem is, the application assumed it knew what the user knew and didn't ask for confirmation that the user was authorized to access the requested resource.
Why broken access control is dangerous?
Access-control vulnerabilities can be critical, as they could allow access to functionality and/or information that is not authorized.
The potential impacts may be:
Exposing personal information
Unauthorized changes to data
Access to other user account resources
Logical functionality being exposed
* Deletion of information
* Privacy violations
Damage to reputation or finances
The severity is based on what the compromised account or resource has access to.
There are several common types of broken access control.There are several common types of broken access control.
1. Horizontal Privilege Escalation
Horizontal privilege elevation is when a user accesses another user's resources that have the same level of permissions.
For instance, Customer A should only be able to view the orders of Customer A. Horizontal privilege escalation can exist when Customer A has access to Customer B's order information.
2. Vertical Privilege Escalation
Vertical privilege escalation is a type of privilege escalation where a low-level user is elevated to a higher level user's functionality.
For instance, you should not be able to access administrative functions by just navigating to a restricted page by a regular user.
3. Insecure Direct Object References
An Insecure Direct Object Reference (IDOR) is a situation in which an application provides references to resources, but does not check whether the requesting user has permission to access them.
It's not always the identifier that's the problem. The vulnerability occurs due to lack of proper authorization checks.
4. Missing Authorization Checks
Some features of the interface can be protected by applications but not the same on the server.
It is not safe to hide a button in admin mode from normal users. Any protected action requires authorization.
Authentication vs Authorization
These are similar, but not the same.
**Authentication** answers:
**Who are you?**
For instance, when a user logs in with a username and password they are authenticated.
**Authorization** answers:
What can you do?
A user can log on to a system and be able to use the resources, but only those that are allowed for that user's role.
Weak authorization is not good enough, if you are not using strong authentication.
So, how can broken access control be avoided?
1. You can also enable Authorization on the Server.
Trustworthy server-side systems must make access-control decisions.
Browser-side limitations should not be used as the only method of application restriction as the user can control requests from their device.
2. Follow the Principle of Least Privilege
Only permissions necessary to fulfill the user's duties should be given to the user.
Restrict privileges to limit effect of account compromise and app vulnerabilities.
3. Deny access by default.Deny access if default.
If no explicit permission is given to access a protected resource, the application should be denied access.
This is a better way to handle that than to assume that access is allowed unless it's denied.
4. Verify Resource Ownership
Applications should check that the user that is authenticated has the right to access the resource requested if it is a private resource.
To grant authorization based on the knowledge of resource ID is never acceptable.
5. Centralize Access-Control Logic
Consistent authentication system decreases the risk of developers omitting security checks in specific pages or functions.
6. Test Access Controls on a regular basis.
Security testing should confirm that there are no other resources that can be accessed beyond the scope of the accounts' permissions.
To detect access control vulnerabilities before attackers can, code reviews, automated testing, and authorized penetration testing can assist.
How can students learn safely?
Teaching Broken Access Control to cybersecurity students can be done using intentionally vulnerable applications, CTF challenges, Web security training platforms and their personal lab.
Do not test access controls on actual websites without permission.
In practicing, be sure to not only detect the vulnerability, but also understand why it is and how it can be remedied by the developer.
Why is it important for cybersecurity students to learn it?
Important concepts that will be taught in Broken Access Control include:
* Authentication and authorization
User roles and permissions
* Web application architecture
* Secure application design
* Vulnerability assessment
The principle of least privilege.
They are relevant to penetration testers, application security engineers, SOC, developers and security consultants.
Conclusion
A Broken Access Control takes place when a Web application does not adequately limit access to or actions within a Web application. Can cause to unauthorized data disclosure, escalation of privileges and misuse of sensitive functionality.
These risks can be mitigated by implementing authorization on the server, checking to see if the resource is owned by the caller, using least privilege, denying access by default, and periodically testing security controls.
In the world of cyber security, Broken Access Control is an important lesson for students: A user should not be able to access everything when using the application.
Secure applications have to confirm both the user and what they can do.

Post a Comment