ATT&CK coverage › Technique

Server Software Component: SQL Stored Procedures T1505.001

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).

Events covered

3 catalog events are tagged with this technique by at least one rule.

ProviderEvent IDTitle
Sysmon1Process creation
Security-Auditing4688A new process has been created.
MSSQLSERVER15457

Authoring guide

Patterns shared across the 4 rules above: which fields they filter on, what specific values they look for, and what they exclude. Field names are normalized across vendors so Sigma's Image, Elastic's process.name, and Splunk's process_name collapse into one row. Each rule contributes at most once per row.

Fields filtered most (5 distinct)

The fields most rules look at when detecting this technique. The How column shows the operators authors use (eq, wildcard, regex_match, match) and how often each appears. Sample values are concrete examples to start from, not an exhaustive list.

FieldRulesHowSample values
EventID3eq 315457
config_name2in 1, eq 1"clr enabled", "Ole Automation Procedures", "external scripts enabled", "xp_cmdshell"
OriginalFileName1eq 1PowerShell.EXE, Cmd.Exe, pwsh.dll
process_name1eq 1powershell_ise.exe, cmd.exe, powershell.exe
parent_process_name1eq 1"sqlservr.exe"

Top indicator values (16 distinct)

Specific (field, operator, value) combinations the rules check for, ranked by how many rules under this technique use each one. The Corpus reach column counts how many rules across the entire catalog (any technique) check the same combination. High numbers point to widely-used indicators that are likely noisy on their own; combine them with another condition for useful signal. Blank means the combination is specific to rules under this technique.

FieldKindValueRules (here)Corpus reach
EventIDeq1545733
config_namein"external scripts enabled"1
config_namein"Ole Automation Procedures"1
config_namein"Ad Hoc Distributed Queries"1
config_namein"clr strict security"1
config_namein"clr enabled"1
config_nameeq"xp_cmdshell"1
process_nameeqpowershell.exe13
parent_process_nameeq"sqlservr.exe"1
OriginalFileNameeqpowershell_ise.EXE18
OriginalFileNameeqPowerShell.EXE164
process_nameeqpwsh.exe13
process_nameeqcmd.exe12
OriginalFileNameeqCmd.Exe132
OriginalFileNameeqpwsh.dll172
process_nameeqpowershell_ise.exe13

Rules under this technique

Every rule in the catalog tagged with this technique, grouped by vendor. Click a rule title for its full predicates, exclusions, and indicators.

Splunk 4 rules