A01:2021 – Broken Access Control

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

Which of the following is the most crucial aspect of effective access control?

  • Frequent security audits of the network infrastructure.
  • Enforcement in trusted server-side code or server-less API. (correct)
  • Using client-side JavaScript for access control checks.
  • Complex password policies for all users.

Access control failures can lead to unauthorized modification but not the destruction of data.

False (B)

What is the principle where access is granted only for particular capabilities, roles, or users, but is available to anyone?

Violation of the principle of least privilege or deny by default

Match the following attack techniques with their corresponding descriptions:

<p>Parameter Tampering = Modifying URL parameters to bypass access controls. Insecure Direct Object References = Permitting viewing or editing someone else's account by providing its unique identifier. Elevation of Privilege = Acting as a user without being logged in or acting as an admin when logged in as a user. CORS misconfiguration = Allows API access from unauthorized/untrusted origins.</p>
Signup and view all the answers

Which of the following is NOT a common access control vulnerability?

<p>Using multi-factor authentication for all user logins (C)</p>
Signup and view all the answers

Access control is less effective in server-side code where the attacker can modify the access control check.

<p>False (B)</p>
Signup and view all the answers

What type of attack involves replaying or tampering with a JSON Web Token to elevate privileges?

<p>Metadata manipulation</p>
Signup and view all the answers

Failing to invalidate stateful session identifiers after logout can lead to session __________

<p>fixation</p>
Signup and view all the answers

What is the purpose of rate limiting API access?

<p>To minimize the harm from automated attack tooling. (C)</p>
Signup and view all the answers

Deny by default is not a recommended security practice.

<p>False (B)</p>
Signup and view all the answers

What does CORS stand for, in the context of web application security?

<p>Cross-Origin Resource Sharing</p>
Signup and view all the answers

Access control mechanisms should be implemented _________ and reused throughout the application.

<p>once</p>
Signup and view all the answers

What should access controls enforce regarding records?

<p>Enforce record ownership. (C)</p>
Signup and view all the answers

Web server directory listing should always be enabled for easy access to files.

<p>False (B)</p>
Signup and view all the answers

What type of tokens should be short-lived to minimize the window of opportunity for an attacker?

<p>Stateless JWT</p>
Signup and view all the answers

Logging access control failures and alerting admins is important for __________ detection.

<p>intrusion</p>
Signup and view all the answers

Which of the following is an example of 'Force browsing' attack?

<p>Accessing authenticated pages as an unauthenticated user (D)</p>
Signup and view all the answers

Functional access control unit and integration tests should NOT be included by developers and QA staff.

<p>False (B)</p>
Signup and view all the answers

What is the primary consequence of broken access control?

<p>Unauthorized information disclosure, modification, or destruction of data. (A)</p>
Signup and view all the answers

Access control is most effective when implemented in client-side code.

<p>False (B)</p>
Signup and view all the answers

What principle should be followed when granting access to resources, roles or users?

<p>Principle of least privilege</p>
Signup and view all the answers

Bypassing access control checks can be achieved by modifying the URL, internal application state, or the HTML page, which is also known as parameter __________ or force browsing.

<p>tampering</p>
Signup and view all the answers

Which of the following is an example of elevation of privilege?

<p>A standard user accessing an admin-only page. (A)</p>
Signup and view all the answers

Disabling web server directory listing helps prevent information exposure.

<p>True (A)</p>
Signup and view all the answers

What type of attack involves replaying or tampering with a JSON Web Token (JWT) to elevate privileges?

<p>Metadata manipulation (D)</p>
Signup and view all the answers

What type of session identifiers should be invalidated after logout?

<p>Stateful session identifiers</p>
Signup and view all the answers

The configuration that allows API access from unauthorized/untrusted origins is called __________ misconfiguration.

<p>CORS</p>
Signup and view all the answers

Match the following access control vulnerabilities with their descriptions:

<p>Insecure Direct Object References = Permitting viewing or editing someone else's account by providing its unique identifier. Force Browsing = Accessing authenticated pages as an unauthenticated user. Elevation of Privilege = Acting as an admin when logged in as a user. CORS Misconfiguration = Allows API access from unauthorized/untrusted origins.</p>
Signup and view all the answers

Which of the following is a recommendation for preventing broken access control?

<p>Implementing access control mechanisms once and re-using them throughout the application. (A)</p>
Signup and view all the answers

What should domain models enforce regarding access controls?

<p>Record ownership</p>
Signup and view all the answers

For longer lived JWTs it's highly recommended to follow the __________ standards to revoke access.

<p>OAuth</p>
Signup and view all the answers

Which of the options is a failure related to access control?

<p>permitting viewing or editing someone else's account (D)</p>
Signup and view all the answers

Which of the following helps to minimize the harm from automated attack tooling?

<p>Rate limiting API and controller access. (B)</p>
Signup and view all the answers

What is the primary consequence of access control failures?

<p>Unauthorized information disclosure, modification, or destruction of data (B)</p>
Signup and view all the answers

What is the principle of least privilege?

<p>Granting only the necessary access rights</p>
Signup and view all the answers

Bypassing access control checks by modifying the URL is known as ______.

<p>parameter tampering</p>
Signup and view all the answers

Which of the following is a recommended method for preventing access control vulnerabilities?

<p>Implementing access control mechanisms once and reusing them throughout the application (B)</p>
Signup and view all the answers

Disabling web server directory listing helps prevent information disclosure.

<p>True (A)</p>
Signup and view all the answers

What type of testing should developers include to test access controls?

<p>Functional unit and integration tests</p>
Signup and view all the answers

Stateless JWT tokens should be ______ to minimize the window of opportunity for attackers.

<p>short-lived</p>
Signup and view all the answers

In the context of JWTs, what does the OAuth standard recommend for longer-lived tokens?

<p>Revoking access (A)</p>
Signup and view all the answers

Access control failures can lead to the violation of the principle of ______.

<p>least privilege</p>
Signup and view all the answers

What should access controls enforce regarding records within an application?

<p>Record ownership, rather than universal access (C)</p>
Signup and view all the answers

What should happen to stateful session identifiers after a user logs out?

<p>They should be invalidated on the server</p>
Signup and view all the answers

Permitting viewing or editing of someone else's account by providing its unique identifier is an example of a secure direct object reference.

<p>False (B)</p>
Signup and view all the answers

Which attack involves replaying or tampering with a JSON Web Token (JWT) to elevate privileges?

<p>Metadata Manipulation (B)</p>
Signup and view all the answers

Application business limit requirements should be enforced by ______.

<p>domain models</p>
Signup and view all the answers

What is the primary risk associated with broken access control?

<p>Unauthorized information disclosure (A)</p>
Signup and view all the answers

What security principle is violated when access is granted to anyone instead of specific roles or users?

<p>Principle of least privilege</p>
Signup and view all the answers

Disabling web server directory listing is a recommended practice to prevent exposing file metadata.

<p>True (A)</p>
Signup and view all the answers

To minimize harm from automated attack tooling, it is important to __________ API and controller access.

<p>rate limit</p>
Signup and view all the answers

Which of the following is a mitigation strategy against broken access control?

<p>Denying by default, except for public resources. (C)</p>
Signup and view all the answers

According to the material, it is not important to log access control failures.

<p>False (B)</p>
Signup and view all the answers

The use of unverified data in a SQL call is an example of what scenario of compromising account information?

<p>SQL injection</p>
Signup and view all the answers

An attacker forcing a browse to a URL is an example of ___________ if they are unauthenticated, or are not an admin.

<p>flaw</p>
Signup and view all the answers

CWE stands for Common Weakness Exposure based on the text provided.

<p>False (B)</p>
Signup and view all the answers

Access control enforces policy such that users can act outside of their intended permissions.

<p>False (B)</p>
Signup and view all the answers

Match the weakness to the description

<p>Violation of principle of least priviledge = Access should only be granted for particular capabilities, roles, or users, but is available to anyone Bypassing access control checks = Modifying the URL (parameter tampering or force browsing), internal application state, or the HTML page, or by using an attack tool modifying API requests Elevation of privilege = Acting as a user without being logged in or acting as an admin when logged in as a user.</p>
Signup and view all the answers

What is the principle of least privilege, in the context of access control?

<p>Granting access only for particular capabilities, roles, or users, and denying access by default.</p>
Signup and view all the answers

Modifying a URL to bypass access control checks is known as ______.

<p>parameter tampering</p>
Signup and view all the answers

Which of the following is a common access control vulnerability related to direct object references?

<p>Permitting viewing or editing someone else's account by providing its unique identifier (C)</p>
Signup and view all the answers

Disabling web server directory listing is a recommended practice to prevent access control vulnerabilities.

<p>True (A)</p>
Signup and view all the answers

A CORS ______ can allow API access from unauthorized origins.

<p>misconfiguration</p>
Signup and view all the answers

What should developers and QA staff include in testing to prevent access control issues?

<p>Access control unit and integration tests (D)</p>
Signup and view all the answers

In the context of JWTs, what does it mean for a token to be 'short-lived' and why is it important?

<p>A short-lived token has a small window of opportunity for attackers to abuse it if compromised.</p>
Signup and view all the answers

Access control failures should be ______ and admins should be alerted when appropriate.

<p>logged</p>
Signup and view all the answers

Deny by default means that, unless a specific exception is in place, access is ______

<p>forbidden</p>
Signup and view all the answers

Which of the following statements is correct regarding access control?

<p>Access control mechanisms should be implemented once and re-used throughout the application. (A)</p>
Signup and view all the answers

Using extremely long-lived, stateless JWT tokens is the best method for long session management.

<p>False (B)</p>
Signup and view all the answers

Flashcards

Broken Access Control

Enforces policies so users can't act outside intended permissions, preventing unauthorized data access/modification.

Principle of Least Privilege

Granting only necessary access rights, roles, or capabilities to users; denying access by default.

Parameter Tampering

Bypassing access controls by altering URLs, application state, HTML, or API requests to gain unauthorized access.

Insecure Direct Object References (IDOR)

Accessing another user's account by manipulating unique identifiers without proper authorization.

Signup and view all the flashcards

Privilege Escalation

Gaining higher-level privileges (e.g., admin) when logged in as a regular user, or acting as a user without logging in.

Signup and view all the flashcards

Metadata Manipulation

Replaying or altering tokens (like JWTs), cookies, or hidden fields to elevate privileges.

Signup and view all the flashcards

CORS Misconfiguration

Misconfigured Cross-Origin Resource Sharing, allowing unauthorized API access from untrusted origins.

Signup and view all the flashcards

Force Browsing

Attempting to access authenticated pages as an unauthenticated user, or privileged pages as a standard user.

Signup and view all the flashcards

Deny by Default

Deny all access by default, except for explicitly allowed public resources.

Signup and view all the flashcards

Centralized Access Control

Centralize and reuse access control mechanisms throughout the application to ensure consistency.

Signup and view all the flashcards

Record Ownership

Enforce access controls based on record ownership, limiting users to only create, read, update, or delete their own records.

Signup and view all the flashcards

Domain Model Enforcement

Enforce unique application business rules using domain models to control data access and manipulation.

Signup and view all the flashcards

Directory Listing Prevention

Disable web server directory listing and prevent sensitive files (e.g., .git, backup files) within web roots.

Signup and view all the flashcards

Access Control Logging

Log access control failures and alert admins to repeated failures.

Signup and view all the flashcards

API Rate Limiting

Limit API and controller access to minimize harm from automated attacks.

Signup and view all the flashcards

Session Invalidation

Invalidate stateful session identifiers on the server after logout.

Signup and view all the flashcards

JWT Management

Use short-lived JWTs and follow OAuth standards to revoke access for longer-lived JWTs.

Signup and view all the flashcards

Access Control Testing

Include unit and integration tests for access control functionality.

Signup and view all the flashcards

Account Parameter Manipulation

Modifying the 'acct' parameter in a URL to access another user's account details.

Signup and view all the flashcards

Forced Browsing to Admin Pages

Attempting to access admin pages directly without proper authentication or authorization.

Signup and view all the flashcards

Impact of Access Control Failures

Access control failures lead to unauthorized disclosure, modification, or destruction of data, or performing functions outside user limits.

Signup and view all the flashcards

Violation of Least Privilege

Grant access only for particular capabilities, roles, or users; don't give blanket access to everyone.

Signup and view all the flashcards

API Access Control

Missing access controls on POST, PUT, and DELETE requests expose APIs.

Signup and view all the flashcards

JWT Token Security

Short-lived JWTs minimize the attacker's window of opportunity. Follow OAuth standards to revoke access for longer ones.

Signup and view all the flashcards

SQL Injection Access

Occurs when applications use unverified data in SQL calls, allowing attackers to access any user's account.

Signup and view all the flashcards

Information Exposure

Exposure of sensitive information to unauthorized actors.

Signup and view all the flashcards

Business Logic as Access Control

Unique application business limit requirements should be enforced by domain models.

Signup and view all the flashcards

URL Tampering

Bypassing access controls by tampering with parameters in the URL.

Signup and view all the flashcards

Account Parameter Exploitation

Attacker alters the browser's 'acct' parameter to access another user's account.

Signup and view all the flashcards

Missing Access Control Attack

The application doesn't have code to prevent an unauthenticated user from accessing authenticated pages, or a non-admin from accessing admin pages.

Signup and view all the flashcards

URL Parameter Tampering

A common web vulnerability where an attacker exploits flaws in the server-side code to gain unauthorized access to resources by modifying URL parameters.

Signup and view all the flashcards

Cross-Site Request Forgery (CSRF)

An attack where an authenticated user is tricked into performing actions they did not intend, often through malicious websites.

Signup and view all the flashcards

Least Privilege

The practice of ensuring users have only the minimum necessary access rights to perform their job functions.

Signup and view all the flashcards

Server-Side Access Control

Access controls are verified by server-side code in a trusted environment.

Signup and view all the flashcards

Improper Access Control

When access control mechanisms are implemented improperly or are missing, potentially leading to unauthorized access.

Signup and view all the flashcards

JSON Web Token (JWT)

A token in web applications and APIs, often misused to replay or tamper with access control.

Signup and view all the flashcards

Cross-Origin Resource Sharing (CORS)

An HTTP-header based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading of resources.

Signup and view all the flashcards

URL Modification Attacks

Modifying a URL to bypass access controls and gain unauthorized access to restricted resources.

Signup and view all the flashcards

Proper Authorization

The principle of verifying that a user has the necessary permissions before granting access to a resource or function.

Signup and view all the flashcards

Object References

Unique identifiers used to reference objects in a system; can be exploited if exposed and improperly validated.

Signup and view all the flashcards

Sensitive Information Exposure

Disclosing sensitive data through application responses or system outputs without proper restrictions.

Signup and view all the flashcards

Default Deny Access

Ensuring a system defaults to denying access unless explicitly granted, enhancing security.

Signup and view all the flashcards

Automated Attack Tooling

An automated method or tool used to exploit vulnerabilities in web applications.

Signup and view all the flashcards

Insecure Temporary Files

A process where temporary files are not securely handled, potentially leading to sensitive data exposure or unauthorized access.

Signup and view all the flashcards

Indirect Access Control

The practice of limiting the attack surface by restricting direct access to resources and requiring all access to go through a proxy.

Signup and view all the flashcards

Directory Listing

An application setting that lists the contents of a directory, potentially exposing sensitive files or information.

Signup and view all the flashcards

Access Control

Enforces policy so users act only within intended permissions, prevents unauthorized access/modification.

Signup and view all the flashcards

Insecure Direct Object Reference

Unique identifier, can be exploited to access another user's information.

Signup and view all the flashcards

Elevation of Privilege

An attack where the attacker gains additional privileges.

Signup and view all the flashcards

Default Deny

An access control model where access is denied unless specifically allowed.

Signup and view all the flashcards

Short-Lived JWTs

Shortening the lifespan of JWTs to minimize the window for attacks.

Signup and view all the flashcards

Forced Browsing (Admin Pages)

Attempting to access admin pages without proper authorization.

Signup and view all the flashcards

Study Notes

Broken Access Control Overview

  • Broken access control moved from fifth position and is now a top concern
  • 94% of applications tested exhibited some form of broken access control
  • The average incidence rate is 3.81%
  • It has the most occurrences in the dataset with over 318k
  • Common Weakness Enumerations (CWEs) include:
    • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
    • CWE-201: Insertion of Sensitive Information Into Sent Data
    • CWE-352: Cross-Site Request Forgery

Description of Access Control Vulnerabilities

  • Access control ensures users act within their intended permissions.
  • Failures can lead to unauthorized:
    • Information disclosure
    • Modification
    • Destruction of data
    • Performance of business functions outside user limits
  • Common vulnerabilities include:
    • Violating the principle of least privilege or deny by default
    • Bypassing access control checks via:
      • URL tampering
      • Modifying application state or HTML
      • Using attack tools to modify API requests
    • Permitting viewing/editing of other accounts via insecure direct object references
    • Accessing APIs with missing access controls for POST, PUT, and DELETE requests.
    • Privilege escalation by:
      • Acting as a user without login.
      • Acting as admin when logged in as a user
    • Manipulating metadata like JSON Web Tokens (JWT) or cookies to elevate privileges or abuse JWT invalidation.
    • CORS misconfiguration allowing API access from unauthorized origins.
    • Forced browsing to authenticated pages as an unauthenticated user or to privileged pages as a standard user.

Prevention Strategies

  • Access control is effective in trusted server-side code or server-less APIs.
  • Implementations should be server-side where attackers cannot modify checks or metadata.
  • Key strategies:
    • Deny by default, except for public resources.
    • Implement and reuse access control mechanisms throughout the application to minimize Cross-Origin Resource Sharing (CORS) usage.
    • Enforce record ownership via access control models
    • Enforce unique application business limit requirements using domain models.
    • Disable web server directory listing and ensure sensitive file metadata (e.g., .git) and backup files are not present within web roots.
    • Log access control failures and alert administrators when appropriate (e.g., repeated failures).
    • Rate limit API and controller access to minimize harm from automated attack tooling.
    • Invalidate stateful session identifiers on the server after logout.
    • Short-lived, stateless JWT tokens are preferable to minimize the window of opportunity for attackers
    • Follow OAuth standards to revoke access for longer-lived JWTs.
  • Include functional access control unit and integration tests during development and QA.

Example Attack Scenarios

Scenario 1: SQL Injection via Unverified Data

  • Vulnerability: Application uses unverified data in a SQL call to access account information.
  • Attack: Attacker modifies the 'acct' parameter in the browser to input any account number.
  • Impact: If not verified correctly, attacker gains unauthorized access to any user's account.
  • Example: https://example.com/app/accountInfo?acct=notmyacct

Scenario 2: Forced Browsing

  • Vulnerability: Lack of access controls on specific URLs.
  • Attack: Attacker attempts to access admin pages directly.
  • Impact: Unauthorized access to sensitive pages or functionalities.
  • Example:
    • https://example.com/app/getappInfo
    • https://example.com/app/admin_getappInfo
  • Flaw exists if:
    • Unauthenticated user accesses any page that requires authentication
    • Non-admin user accesses an admin page.

Statistics

  • CWEs Mapped: 34
  • Maximum Incidence Rate: 55.97%
  • Average Incidence Rate: 3.81%
  • Average Weighted Exploit: 6.92
  • Average Weighted Impact: 5.93
  • Maximum Coverage: 94.55%
  • Average Coverage: 47.72%
  • Total Occurrences: 318,487
  • Total CVEs: 19,013

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

More Like This

Use Quizgecko on...
Browser
Browser