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
Raw source remote_execution_via_sql_extended_stored_procedure_xp_cmdshell · YARA-L
Esc
Published by chronicle/detection-rules ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
rule remote_execution_via_sql_extended_stored_procedure_xp_cmdshell {
 meta:
    author = "Den Iuzvyk"
    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."
    reference = "https://tdm.socprime.com/tdm/info/necXED4R7vR3"
    version = "0.01"
    created = "2019/12/18"
    product = "windows"
    service = "process_creation"
    mitre = "defense_evasion, execution, t1218, t1204, t1059"

  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
}

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.