Dark Mode
Capec-108 Detail
Command Line Execution through SQL Injection
Detailed Software Likelihood: Low Typical Severity: Very High
Parents: 66
Threats: T268 T290
Tools: 2
Not present
| External ID | Source | Link | Description |
|---|---|---|---|
| CAPEC-108 | capec | https://capec.mitre.org/data/definitions/108.html | |
| CWE-89 | cwe | http://cwe.mitre.org/data/definitions/89.html | |
| CWE-74 | cwe | http://cwe.mitre.org/data/definitions/74.html | |
| CWE-20 | cwe | http://cwe.mitre.org/data/definitions/20.html | |
| CWE-78 | cwe | http://cwe.mitre.org/data/definitions/78.html | |
| CWE-114 | cwe | http://cwe.mitre.org/data/definitions/114.html |
Explore
-
Probe for SQL Injection vulnerability: The attacker injects SQL syntax into user-controllable data inputs to search unfiltered execution of the SQL syntax in a query.
Exploit
-
Achieve arbitrary command execution through SQL Injection with the MSSQL_xp_cmdshell directive: The attacker leverages a SQL Injection attack to inject shell code to be executed by leveraging the xp_cmdshell directive.
-
Inject malicious data in the database: Leverage SQL injection to inject data in the database that could later be used to achieve command injection if ever used as a command line argument
-
Trigger command line execution with injected arguments: The attacker causes execution of command line functionality which leverages previously injected database content as arguments.
- The application does not properly validate data before storing in the database
- Backend application implicitly trusts the data stored in the database
- Malicious data is used on the backend as a command line argument
- None: No specialized resources are required to execute this type of attack.
| High |
|---|
| The attacker most likely has to be familiar with the internal functionality of the system to launch this attack. Without that knowledge, there are not many feedback mechanisms to give an attacker the indication of how to perform command injection or whether the attack is succeeding. |
| Integrity | Availability | Authorization | Access Control | Confidentiality |
|---|---|---|---|---|
| Modify Data | Unreliable Execution | Gain Privileges | Gain Privileges | Read Data |
| Execute Unauthorized Commands (Run Arbitrary Code) | Execute Unauthorized Commands (Run Arbitrary Code) | Gain Privileges | ||
| Execute Unauthorized Commands (Run Arbitrary Code) |
- SQL injection vulnerability in Cacti 0.8.6i and earlier, when register_argc_argv is enabled, allows remote attackers to execute arbitrary SQL commands via the (1) second or (2) third arguments to cmd.php. NOTE: this issue can be leveraged to execute arbitrary commands since the SQL query results are later used in the polling_items array and popen function (CVE-2006-6799). Reference: https://www.cve.org/CVERecord?id=CVE-2006-6799