| name | T1505.001_sql-stored-procedures |
| description | Adversaries may abuse SQL stored procedures to establish persistent access to systems. |
| category | configuration |
| version | 18.1 |
| author | cyberstrike-official |
| tags | ["mitre-attack","enterprise","t1505.001","persistence","windows","linux","sub-technique"] |
| technique_id | T1505.001 |
| tactic | persistence |
| all_tactics | ["persistence"] |
| platforms | ["Windows","Linux"] |
| mitre_url | https://attack.mitre.org/techniques/T1505/001 |
| tech_stack | ["windows","linux"] |
| cwe_ids | ["CWE-276"] |
| chains_with | ["T1505","T1505.002","T1505.003","T1505.004","T1505.005","T1505.006"] |
| prerequisites | ["T1505"] |
| severity_boost | {"T1505":"Chain with T1505 for deeper attack path","T1505.002":"Chain with T1505.002 for deeper attack path","T1505.003":"Chain with T1505.003 for deeper attack path"} |
T1505.001 SQL Stored Procedures
Sub-technique of: T1505
High-Level Description
Adversaries may abuse SQL stored procedures to establish persistent access to systems. SQL Stored Procedures are code that can be saved and reused so that database users do not waste time rewriting frequently used SQL queries. Stored procedures can be invoked via SQL statements to the database using the procedure name or via defined events (e.g. when a SQL server application is started/restarted).
Adversaries may craft malicious stored procedures that can provide a persistence mechanism in SQL database servers. To execute operating system commands through SQL syntax the adversary may have to enable additional functionality, such as xp_cmdshell for MSSQL Server.
Microsoft SQL Server can enable common language runtime (CLR) integration. With CLR integration enabled, application developers can write stored procedures using any .NET framework language (e.g. VB .NET, C#, etc.). Adversaries may craft or modify CLR assemblies that are linked to stored procedures since these CLR assemblies can be made to execute arbitrary commands.
Kill Chain Phase
Platforms: Windows, Linux
What to Check
How to Test
Manual Testing
-
Identify Attack Surface: Determine if the target environment is susceptible to SQL Stored Procedures by examining the target platforms (Windows, Linux).
-
Assess Existing Defenses: Review whether mitigations for T1505.001 are in place. If defenses are absent or misconfigured, this technique may be exploitable.
-
Execute Test: Use tools and methods described in the MITRE ATT&CK page and external references below.
Note: No Atomic Red Team tests available for this technique. See Atomic Red Team GitHub for updates.