CWE
Home > CWE List > CWE- Individual Dictionary Definition (1.6)  

CWE-732: Incorrect Permission Assignment for Critical Resource

 
Incorrect Permission Assignment for Critical Resource
Weakness ID: 732 (Weakness Class)Status: Draft
+ Description

Description Summary

The software specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.

Extended Description

When a resource is given a permissions setting that provides access to a wider range of actors than required, it could lead to the disclosure of sensitive information, or the modification of that resource by unintended parties. This is especially dangerous when the resource is related to program configuration, execution or sensitive user data.

+ Time of Introduction
  • Architecture and Design
  • Implementation
  • Installation
  • Operation
+ Applicable Platforms

Languages

All

+ Likelihood of Exploit

Medium to High

+ Potential Mitigations
PhaseDescription
Architecture and Design

When using a critical resource such as a configuration file, check to see if the resource has insecure permissions (such as being modifiable by any regular user), and generate an error or even exit the software if there is a possibility that the resource could have been modified by an unauthorized party.

Architecture and Design

Divide your application into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully defining distinct user groups, privileges, and/or roles. Map these against data, functionality, and the related resources. Then set the permissions accordingly. This will allow you to maintain more fine-grained control over your resources.

Implementation

During program startup, explicitly set the default permissions or umask to the most restrictive setting possible. Also set the appropriate permissions during program installation. This will prevent you from inheriting insecure permissions from any user who installs or runs the program.

System Configuration

For all configuration files, executables, and libraries, make sure that they are only readable and writable by the software's administrator.

Documentation

Do not suggest insecure configuration changes in your documentation, especially if those configurations can extend to resources and other software that are outside the scope of your own software.

Installation

Do not assume that the system administrator will manually change the configuration to the settings that you recommend in the manual.

Testing

Use tools and techniques that require manual (human) analysis, such as penetration testing, threat modeling, and interactive tools that allow the tester to record and modify an active session. These may be more effective than strictly automated techniques. This is especially the case with weaknesses that are related to design and business rules.

Testing

Use monitoring tools that examine the software's process as it interacts with the operating system and the network. This technique is useful in cases when source code is unavailable, if the software was not developed by you, or if you want to verify that the build phase did not introduce any new weaknesses. Examples include debuggers that directly attach to the running process; system-call tracing utilities such as truss (Solaris) and strace (Linux); system activity monitors such as FileMon, RegMon, Process Monitor, and other Sysinternals utilities (Windows); and sniffers and protocol analyzers that monitor network traffic.

Attach the monitor to the process and watch for library functions or system calls on OS resources such as files, directories, and shared memory. Examine the arguments to these calls to infer which permissions are being used.

Note that this technique is only useful for permissions issues related to system resources. It is not likely to detect application-level business rules that are related to permissions, such as if a user of a blog system marks a post as "private," but the blog system inadvertently marks it as "public."

Testing
System Configuration

Ensure that your software runs properly under the Federal Desktop Core Configuration (FDCC) or an equivalent hardening configuration guide, which many organizations use to limit the attack surface and potential risk of deployed software.

+ Relationships
NatureTypeIDNameView(s) this relationship pertains toView(s)
ChildOfCategoryCategory275Permission Issues
Development Concepts (primary)699
ChildOfWeakness ClassWeakness Class668Exposure of Resource to Wrong Sphere
Research Concepts (primary)1000
ChildOfCategoryCategory753Porous Defenses
Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors (primary)750
ParentOfWeakness VariantWeakness Variant276Incorrect Default Permissions
Research Concepts (primary)1000
ParentOfWeakness VariantWeakness Variant277Insecure Inherited Permissions
Research Concepts (primary)1000
ParentOfWeakness VariantWeakness Variant278Insecure Preserved Inherited Permissions
Research Concepts (primary)1000
ParentOfWeakness VariantWeakness Variant279Incorrect Execution-Assigned Permissions
Research Concepts (primary)1000
ParentOfWeakness BaseWeakness Base281Improper Preservation of Permissions
Research Concepts (primary)1000
RequiredByCompound Element: CompositeCompound Element: Composite689Permission Race Condition During Resource Copy
Research Concepts1000
+ Maintenance Notes

The relationships between privileges, permissions, and actors (e.g. users and groups) need further refinement within the Research view. One complication is that these concepts apply to two different pillars, related to control of resources (CWE-664) and protection mechanism failures (CWE-396).

+ Content History
Submissions
Submission DateSubmitterOrganizationSource
2008-09-08Internal CWE Team
new weakness-focused entry for Research view.
Modifications
Modification DateModifierOrganizationSource
2009-01-12CWE Content TeamMITREInternal
updated Description, Likelihood of Exploit, Name, Potential Mitigations, Relationships
2009-03-10CWE Content TeamMITREInternal
updated Potential Mitigations, Related Attack Patterns
2009-05-27CWE Content TeamMITREInternal
updated Name
Page Last Updated: October 29, 2009