# 1) Vertical Access Control

It is a mechanism that restricts access to sensitive functionality to specific types of users.

For example: An ADMIN can modify/delete any user's account,  while an ordinary user has no access to these actions.

## Example of broken vertical access controls

If a user can gain access to functionality that they are not permitted to access then this is vertical privilege escalation.&#x20;

### 1) Unprotected Functionality

This arises when application does not enforce any protection for sensitive functionality.

Example:  *Administrative functions might be linked from an administrator's welcome page but not from a user's welcome page. However, a user might be able to access the administrative functions by browsing to the relevant admin URL.*

```
https://insecure-website.com/admin
```

In some cases, the administrative URL might be disclosed in other locations, such as the <mark style="background-color:green;">robots.txt</mark> file:

```
https://insecure-website.com/robots.txt
```

In some cases, sensitive functionality is concealed by giving it a less predictable URL. This is an example of so-called "security by obscurity".

&#x20;However, by hiding the functionality does not not provide effective access control because the use might discover the obfuscated URL in number of ways.&#x20;

Example, while skimming through the scripts of an application, user can found the logic of redirecting to admin page URL  if user is admin.&#x20;

### 2) Parameter based access control methods

Some applications determine the user's access rights or role at login, and then store this information in a user-controllable location. This could be:

* A hidden field.
* A cookie.
* A preset query string parameter.

```
https://insecure-website.com/login/home.jsp?admin=true
https://insecure-website.com/login/home.jsp?role=1
```

###


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://n0m4dsec.gitbook.io/sec-book/web-vulnerabilities/server-side-vulnerabilities/access-control/1-vertical-access-control.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
