Function Level Access Control

What is function level access control?

Could result from insufficient protection of sensitive request handlers within an application

  • Can a user directly browse to a resource?
  • Does the UI expose an unauthorized resource?

It can be anything from seemingly useless information to a full system takeover.

OWASP

Function Level Access Control examples

Example of a missing function level access control

Example #1: Force-Browsing the URL

  1. Go to a site and notice the URL: http://randomsite.com

  2. Click a link or application and see this URL: http://randomsite.com/app/getappinfo

  3. Now, you simply add a parameter to see if the page exists. If so, you now have administrator access to the application. http://randomsite.com/app/admin_getappinfo

Example #2: Horizontal Access Attack

  1. User goes to a site, logs in to confirm authorization to site resources:

    http://randomsite.com/app/userId=21775

  2. User changes the ‘userId’ to that of another user.

    http://randomsite.com/app/userId=31356

  3. If proper authorization procedures are not in place, the user now has the ability to login as other users simply by changing the userID.

How to prevent Function Level Access Control

Custom Validation

  • Deny access to functionality by default

  • Use Access control lists and role-based authentication mechanisms

  • Do not just hide functions

Use Hdiv

Risk Covered

Hdiv flow control prevents any client attempt to break the server contract

The information flow control system implemented by Hdiv allows control of the resources (links and forms) exposed by the application, and prevents breaking the original contract from the server. In other words, even when the programmer does not use access control systems or ACL (Java EE or Spring Security) Hdiv is able to know which resource is legally accessible by each user.