Home > CAPEC List > CAPEC-470: Expanding Control over the Operating System from the Database (Version 3.0)  

CAPEC-470: Expanding Control over the Operating System from the Database

Attack Pattern ID: 470
Abstraction: Detailed
Status: Draft
Presentation Filter:
+ Description
An attacker is able to leverage access gained to the database to read / write data to the file system, compromise the operating system, create a tunnel for accessing the host machine, and use this access to potentially attack other machines on the same network as the database machine. Traditionally SQL injections attacks are viewed as a way to gain unauthorized read access to the data stored in the database, modify the data in the database, delete the data, etc. However, almost every data base management system (DBMS) system includes facilities that if compromised allow an attacker complete access to the file system, operating system, and full access to the host running the database. The attacker can then use this privileged access to launch subsequent attacks. These facilities include dropping into a command shell, creating user defined functions that can call system level libraries present on the host machine, stored procedures, etc.
+ Typical Severity

Very High

+ Relationships

The table(s) below shows the other attack patterns and high level categories that are related to this attack pattern. These relationships are defined as ChildOf, ParentOf, MemberOf and give insight to similar items that may exist at higher and lower levels of abstraction. In addition, relationships such as CanFollow, PeerOf, and CanAlsoBe are defined to show similar attack patterns that the user may want to explore.

+ Relevant to the view "Mechanisms of Attack" (CAPEC-1000)
NatureTypeIDName
ChildOfStandard Attack PatternStandard Attack Pattern - A standard level attack pattern in CAPEC is focused on a specific methodology or technique used in an attack. It is often seen as a singular piece of a fully executed attack. A standard attack pattern is meant to provide sufficient details to understand the specific technique and how it attempts to accomplish a desired goal. A standard level attack pattern is a specific type of a more abstract meta level attack pattern.66SQL Injection
+ Prerequisites
A vulnerable DBMS is usedA SQL injection exists that gives an attacker access to the database or an attacker has access to the DBMS via other means
+ Skills Required
[Level: High]
Low level knowledge of the various facilities available in different DBMS systems for interacting with the file system and operating system
+ Mitigations

Design: Follow the defensive programming practices needed to protect an application accessing the database from SQL injection

Configuration: Ensure that the DBMS is patched with the latest security patches

Design: Ensure that the DBMS login used by the application has the lowest possible level of privileges in the DBMS

Design: Ensure that DBMS runs with the lowest possible level of privileges on the host machine and that it runs as a separate user

Usage: Do not use the DBMS machine for anything else other than the database

Usage: Do not place any trust in the database host on the internal network. Authenticate and validate all network activity originating from the database host.

Usage: Use an intrusion detection system to monitor network connections and logs on the database host.

Implementation: Remove / disable all unneeded / unused functions of the DBMS system that may allow an attacker to elevate privileges if compromised

+ References
[REF-408] Bernardo Damele Assump ção Guimarães. "Advanced SQL Injection to Operating System Full Control". 2009-04-10. <http://www.blackhat.com/presentations/bh-europe-09/Guimaraes/Blackhat-europe-09-Damele-SQLInjection-whitepaper.pdf>.
+ Content History
Submissions
Submission DateSubmitterOrganization
2014-06-23CAPEC Content TeamThe MITRE Corporation

More information is available — Please select a different filter.
Page Last Updated or Reviewed: July 31, 2018