Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Documents how adversaries abuse SQL stored procedures, including xp_cmdshell and CLR assemblies, for persistence, with testing guidance.
65% 96%+30 ptsof test cases passed
Passed 22 of 23 test cases with the skill, and 15 of 23 without it.
3 of 3 safety checks passed
10 agent runs
Sub-technique of: T1505
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.
Platforms: Windows, Linux
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.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.