Difference between revisions of "Setting Manipulation"

From OWASP
Jump to: navigation, search
(Added contents from Fortify.)
Line 1: Line 1:
 
{{Template:Attack}}
 
{{Template:Attack}}
 +
{{Template:Fortify}}
 +
 +
==Abstract==
 +
 +
Allowing external control of system settings can disrupt service or cause an application to behave in unexpected ways.
  
 
==Description==
 
==Description==
  
Attackers manipulate the settings of the system to cause the application to behave in unexpected ways.  
+
Setting manipulation vulnerabilities occur when an attacker can control values that govern the behavior of the system, manage specific resources, or in some way affect the functionality of the application.
  
NOTE: The title was originally from [CVE http://www.cve.mitre.org/] and was intended to be used for a vulnerability. We believe this title is more appropriate for an attack. The corresponding vulnerability is [[Allowing External Setting Manipulation]]
+
Because setting manipulation covers a diverse set of functions, any attempt at illustrating it will inevitably be incomplete. Rather than searching for a tight-knit relationship between the functions addressed in the setting manipulation category, take a step back and consider the sorts of system values that an attacker should not be allowed to control.
 +
 
 +
NOTE: The title was originally from [Fortify http://vulncat.fortifysoftware.com/] and was intended to be used for a vulnerability. We believe this title is more appropriate for an attack. The corresponding vulnerability is [[Allowing External Setting Manipulation]]
  
 
==Examples ==
 
==Examples ==
  
* An application takes a user-controllable parameter in the HTTP request to decide whether to turn on the debug mode.
+
===Example1===
  
* The serialized object that stores the current system status can be overwritten by user input.  
+
The following C# code reads a number from an HttpRequest and resizes a sorted list in preparation for copying the specified number of items into the list.
 +
 
 +
...
 +
list.set_Capacity((int)Request.get_Item("numItems"));
 +
...
 +
The code in this example resizes a SortedList of items based on a value read from an HttpRequest. If an attacker provides a malicious value for numItems, the list may be truncated or extended beyond a reasonable size (potentially creating a low memory condition.)
 +
 
 +
In general, do not allow user-provided or otherwise untrusted data to control sensitive values. The leverage that an attacker gains by controlling these values is not always immediately obvious, but do not underestimate the creativity of your attacker.
 +
 
 +
===Example2===
 +
 
 +
An application takes a user-controllable parameter in the HTTP request to decide whether to turn on the debug mode.
 +
 
 +
==Example3==
 +
 
 +
The serialized object that stores the current system status can be overwritten by user input.  
  
 
==Related Threats==
 
==Related Threats==
Line 20: Line 42:
  
 
[[Allowing External Setting Manipulation]]
 
[[Allowing External Setting Manipulation]]
 +
[[:Category:Input Validation Vulnerability]]
  
 
==Related Countermeasures==
 
==Related Countermeasures==
 +
 +
[[:Category:Input Validation]]
  
 
==Categories==
 
==Categories==
  
{{Template:Stub}}
+
[[Category:C]]
 +
[[Category:Code Snippet]]

Revision as of 12:44, 24 July 2006

This is an Attack. To view all attacks, please see the Attack Category page.


This article includes content generously donated to OWASP by Fortify.JPG.

Abstract

Allowing external control of system settings can disrupt service or cause an application to behave in unexpected ways.

Description

Setting manipulation vulnerabilities occur when an attacker can control values that govern the behavior of the system, manage specific resources, or in some way affect the functionality of the application.

Because setting manipulation covers a diverse set of functions, any attempt at illustrating it will inevitably be incomplete. Rather than searching for a tight-knit relationship between the functions addressed in the setting manipulation category, take a step back and consider the sorts of system values that an attacker should not be allowed to control.

NOTE: The title was originally from [Fortify http://vulncat.fortifysoftware.com/] and was intended to be used for a vulnerability. We believe this title is more appropriate for an attack. The corresponding vulnerability is Allowing External Setting Manipulation

Examples

Example1

The following C# code reads a number from an HttpRequest and resizes a sorted list in preparation for copying the specified number of items into the list.

... list.set_Capacity((int)Request.get_Item("numItems")); ... The code in this example resizes a SortedList of items based on a value read from an HttpRequest. If an attacker provides a malicious value for numItems, the list may be truncated or extended beyond a reasonable size (potentially creating a low memory condition.)

In general, do not allow user-provided or otherwise untrusted data to control sensitive values. The leverage that an attacker gains by controlling these values is not always immediately obvious, but do not underestimate the creativity of your attacker.

Example2

An application takes a user-controllable parameter in the HTTP request to decide whether to turn on the debug mode.

Example3

The serialized object that stores the current system status can be overwritten by user input.

Related Threats

Related Attacks

Related Vulnerabilities

Allowing External Setting Manipulation Category:Input Validation Vulnerability

Related Countermeasures

Category:Input Validation

Categories