VeriKQL by Kaushik Saha

T1505.001 SQL Stored Procedures

Persistenceon attack.mitre.org

ATT&CK Enterprise 20.0 · 20.1 released, update in review

How MITRE detects it

DET0181 Detection Strategy for SQL Stored Procedures Abuse via T1505.001

AN0511 Windows

Creation or modification of stored procedures invoking xp_cmdshell or CLR assemblies for command execution and persistence.

MITRE log sourceIn Microsoft Sentinel
WinEventLog:ApplicationStored procedure creation, modification, or xp_cmdshell invocation via SQL logs or SQL Server auditing
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where EventLog in ("Application")
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel in ("Application")
WinEventLog:SysmonEventCode=1
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (1)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (1)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

WinEventLog:ApplicationCLR Assembly creation, loading, or modification logs via MSSQL CLR integration
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where EventLog in ("Application")
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel in ("Application")

AN0512 Linux

SQL stored procedures that invoke OS-level commands via `xp_cmdshell` equivalent or via UDF (User-Defined Functions) mechanisms.

MITRE log sourceIn Microsoft Sentinel
auditd:SYSCALLexecveNot mapped to Sentinel yet.
ApplicationLogs:SQLStored procedure creation or modification with shell invocation (e.g., system(), exec())Not mapped to Sentinel yet.

Content Hub rules tagged with it (1)

Rules tagged with this technique (or a sub-technique) in their metadata. Whether one fits your connectors is the coverage view (M2).

How the Content Hub rules for T1505.001 are built: their tables, filters, joins, schedules and windows.

In Sigma rules

2 SigmaHQ community rules name it in their tags.

Community rules, not Microsoft's, and not checked by VeriKQL (Sigma is not KQL). From SigmaHQ/sigma at f083329, under the Detection Rule License (DRL) 1.1; each rule is credited to its author.

Mitigations

MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.