heroui logo

SQL Server xp_cmdshell Execution

Anvilogic Forge

View Source
Summary
The SQL Server xp_cmdshell Execution rule is designed to identify the invocation of the xp_cmdshell Extended Stored Procedure within Microsoft SQL Server. This procedure allows SQL Server to execute system commands with the same user privileges under which SQL Server is running, thus posing a significant security risk. Attackers can exploit this ability to escalate privileges, execute arbitrary commands, and potentially establish persistent access to the database or the underlying system. Given the documented use of xp_cmdshell in various attacks, including incidents linked to BlueSky ransomware, monitoring its execution is a vital aspect of effective database security management. The logic for detection leverages event code 33205, indicating execution, filtering for instances where xp_cmdshell is called via SQL commands, and gathers relevant event data. This rule requires pre-configured MSSQL audit policies to capture xp_cmdshell activity efficiently, which is crucial for proper detection and response to potential misuse.
Categories
  • Database
  • Application
Data Sources
  • Application Log
ATT&CK Techniques
  • T1505.001
  • T1059.003
Created: 2024-02-09