Accessing Functionality Not Properly Constrained by ACLs |
Attack Pattern ID: 1 (Standard Attack Pattern Completeness: Complete) | Typical Severity: High | Status: Draft |
Summary
In applications, particularly web applications, access to functionality is mitigated by the authorization framework, whose job it is to map ACLs to elements of the application's functionality; particularly URL's for web apps. In the case that the application deployer failed to specify an ACL for a particular element, an attacker may be able to access it with impunity. An attacker with the ability to access functionality not properly constrained by ACLs can obtain sensitive information and possibly compromise the entire application. Such an attacker can access resources that must be available only to users at a higher privilege level, can access management sections of the application or can run queries for data that he is otherwise not supposed to.
Attack Execution Flow
Survey:
The attacker surveys the target application, possibly as a valid and authenticated user
Attack Step Techniques
ID Attack Step Technique Description Environments 1 Spidering web sites for all available links
env-Web2 Brute force guessing of resource names
env-All3 Brute force guessing of user names / credentials
env-All4 Brute force guessing of function names / actions
env-AllIndicators
ID type Indicator Description Environments 1 Positive ACLs or other access control mechanisms are present in the software
env-Web env-ClientServer2 Positive User IDs or other credentials are present in the software
env-Web env-ClientServer3 Positive Operating modes with different privileges are present in the software
env-ClientServer env-Local env-EmbeddedIdentify Functionality:
At each step, the attacker notes the resource or functionality access mechanism invoked upon performing specific actions
Attack Step Techniques
ID Attack Step Technique Description Environments 1 Use the web inventory of all forms and inputs and apply attack data to those inputs.
env-Web2 Use a packet sniffer to capture and record network traffic
env-CommProtocol3 Execute the software in a debugger and record API calls into the operating system or important libraries. This might occur in an environment other than a production environment, in order to find weaknesses that can be exploited in a production environment.
env-Local env-EmbeddedOutcomes
ID type Outcome Description 1 Success The attacker produces a list of functionality or data that can be accessed through the system.
Iterate over access capabilities:
Possibly as a valid user, the attacker then tries to access each of the noted access mechanisms directly in order to perform functions not constrained by the ACLs.
Attack Step Techniques
ID Attack Step Technique Description Environments 1 Fuzzing of API parameters (URL parameters, OS API parameters, protocol parameters)
env-Web env-Local env-Embedded env-ClientServerIndicators
ID type Indicator Description Environments 1 Negative Attempts to create a catalog of access mechanisms and data have failed.
env-AllOutcomes
ID type Outcome Description 1 Success Functionality is accessible to unauthorized users.
The application must be navigable in a manner that associates elements (subsections) of the application with ACLs.
The various resources, or individual URLs, must be somehow discoverable by the attacker
The deployer must have forgotten to associate an ACL or has associated an inappropriately permissive ACL with a particular navigable resource.
Description
Implementing the Model-View-Controller (MVC) within Java EE's Servlet paradigm using a "Single front controller" pattern that demands that brokered HTTP requests be authenticated before hand-offs to other Action Servlets.
If no security-constraint is placed on those Action Servlets, such that positively no one can access them, the front controller can be subverted.
Skill or Knowledge Level: Low
In order to discover unrestricted resources, the attacker does not need special tools or skills. He only has to observe the resources or access mechanisms invoked as each action is performed and then try and access those access mechanisms directly.
In the case of web applications, use of a spider or other crawling software can allow an attacker to search for accessible pages not beholden to a security constraint.
More generally, noting the target resource accessed upon performing specific actions drives an understanding of the resources accessible from the current context.
In a J2EE setting, deployers can associate a role that is impossible for the authenticator to grant users, such as "NoAccess", with all Servlets to which access is guarded by a limited number of servlets visible to, and accessible by, the user.
Having done so, any direct access to those protected Servlets will be prohibited by the web container.
In a more general setting, the deployer must mark every resource besides the ones supposed to be exposed to the user as accessible by a role impossible for the user to assume. The default security setting must be to deny access and then grant access only to those resources intended by business logic.
CWE-ID | Weakness Name | Weakness Relationship Type |
---|---|---|
285 | Improper Access Control (Authorization) | Targeted |
732 | Incorrect Permission Assignment for Critical Resource | Targeted |
276 | Incorrect Default Permissions | Targeted |
693 | Protection Mechanism Failure | Targeted |
721 | OWASP Top Ten 2007 Category A10 - Failure to Restrict URL Access | Targeted |
434 | Unrestricted Upload of File with Dangerous Type | Targeted |
Nature | Type | ID | Name | Description | View(s) this relationship pertains to |
---|---|---|---|---|---|
ChildOf | Attack Pattern | 122 | Exploitation of Authorization | Mechanism of Attack (primary)1000 | |
ParentOf | Attack Pattern | 17 | Accessing, Modifying or Executing Executable Files | Mechanism of Attack1000 | |
ParentOf | Attack Pattern | 58 | Restful Privilege Elevation | Mechanism of Attack1000 |
All resources must be constrained to be inaccessible by default followed by selectively allowing access to resources as dictated by application and business logic
In addition to a central controller, every resource must also restrict, wherever possible, incoming accesses as dictated by the relevant ACL.
Use Authorization Mechanisms Correctly
Design Configuration Subsystems Correctly and Distribute Safe Default Configurations
Submissions | ||||
---|---|---|---|---|
Submitter | Organization | Date | Comments | |
John Steven | Cigital, Inc | 2007-02-10 | Initial core pattern content |
Modifications | |||||
---|---|---|---|---|---|
Modifier | Organization | Date | Comments | ||
Chiradeep B. Chhaya | Cigital, Inc | 2007-02-23 | Fleshed out pattern with extra content | ||
Richard Struse | VOXEM, Inc | 2007-03-26 | Review and feedback leading to changes in Attack Execution Flow, Attack Prerequisites, Examples and Solutions | ||
Sean Barnum | Cigital, Inc | 2007-04-13 | Modified pattern content according to review and feedback | ||
Paco Hope | Cigital, Inc. | 2007-10-20 | Added extended Attack Execution Flow |