Setting Manipulation

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

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 Vulnerabilities
Allowing External Setting Manipulation Category:Input Validation Vulnerability

Related Countermeasures
Category:Input Validation

Categories
[[Category:C]]