COMMON ATTACK PATTERN ENUMERATION AND CLASSIFICATIONLive MITRE record

CAPEC-75

Manipulating Writeable Configuration Files

Generally these are manually edited files that are not in the preview of the system administrators, any ability on the attackers' behalf to modify these files, for example in a CVS repository, gives unauthorized access directly to the application, the same as authorized users.

Abstraction

Standard

Typical severity

Very High

Likelihood of attack

High

Understand the attack

What is this attack pattern?

Generally these are manually edited files that are not in the preview of the system administrators, any ability on the attackers' behalf to modify these files, for example in a CVS repository, gives unauthorized access directly to the application, the same as authorized users.

Requirements

What does the attack require?

Prerequisites

  • Configuration files must be modifiable by the attacker

Skills required

  • Medium: To identify vulnerable configuration files, and understand how to manipulate servers and erase forensic evidence

Resources required

Not stated in the MITRE record.

Impact

What does a successful attack lead to?

Gain Privileges

Affected scopes: Confidentiality, Access Control, Authorization

Defence

How is it prevented and mitigated?

1
Design: Enforce principle of least privilege
2
Design: Backup copies of all configuration files
3
Implementation: Integrity monitoring for configuration files
4
Implementation: Enforce audit logging on code and configuration promotion procedures.
5
Implementation: Load configuration from separate process and memory space, for example a separate physical device like a CD

Real world

MITRE example instances

Example instance 1Detail
The BEA Weblogic server uses a config.xml file to store configuration data. If this file is not properly protected by the system access control, an attacker can write configuration information to redirect server output through system logs, database connections, malicious URLs and so on. Access to the Weblogic server may be from a so-called Custom realm which manages authentication and authorization privileges on behalf of user principals. Given write access, the attacker can insert a pointer to a custom realm jar file in the config.xml < CustomRealm ConfigurationData="java.util.Properties" Name="CustomRealm" RealmClassName="Maliciousrealm.jar" /> The main issue with configuration files is that the attacker can leverage all the same functionality the server has, but for malicious means. Given the complexity of server configuration, these changes may be very hard for administrators to detect.