remote_execution_via_sql_extended_stored_procedure_xp_cmdshell
Description
Detects remote execution via sql extended stored procedure xp_cmdshell. Check events 15457, 18454, 33205 in MSSQLSERVER log for correlation. License: https://github.com/Neo23x0/sigma/blob/master/LICENSE.Detection.Rules.md.
Query · yara_l
events:
((re.regex($selection.target.process.file.full_path, `.*\\cmd\.exe`) or re.regex($selection.target.process.file.full_path, `.*\\powershell\.exe`) or re.regex($selection.target.process.file.full_path, `.*\\pwsh\.exe`)) and re.regex($selection.principal.process.file.full_path, `.*\\sqlservr\.exe`))
condition:
$selection