Weak Access Controls
Last updated
Was this helpful?
Last updated
Was this helpful?
This can allow unauthorized users to access or modify data, perform actions outside their privileges, or exploit sensitive functionality.
Implement strong access control policies, use role-based or attribute-based access control, enforce permissions at both the application and data levels, and regularly review and test access control mechanisms.
The example below is based on PostSwigger's lab.
We first need to log into the app as administrator
and understand how the process of elevating user privileges work (Figure 1).
Next, we can perform some A-B testing to see if proper access controls are in place for all the steps. That is, logging as a non-privileges user (wiener
) and repeating the same requests we did as administrator
(Figure 2).
The above process is outlined below using a Delete instead of an Upgrade functionality (Figure 3).
As before, we will first try to understand how the upgrade functionality works (Figure 4).
Both of the steps seems to have proper access control in place (Figure 5).
We can try tampering with the Referer
header and see if we are able to bypass the current access controls (Figure 6).
The example below is based on PostSwigger's lab.
carlos
's privileges using the administrator
account.administrator
.Referer
-based access controls.