existing_service_modified_detector_sysmon_behavior


Description

Detects modification of existing services's binpPath License: https://github.com/Neo23x0/sigma/blob/master/LICENSE.Detection.Rules.md.

Query · yara_l

events:
(($selection1.metadata.product_event_type = "1" and $selection1.target.process.file.full_path = "C:\\Windows\\System32\\sc.exe" and re.regex($selection1.target.process.command_line, `sc config .* binpPath= .*`) and $selection1.principal.process.file.full_path = "C:\\Windows\\System32\\cmd.exe") or ($selection1.metadata.product_event_type = "13" and $selection1.target.process.file.full_path = "C:\\Windows\\System32\\services.exe" and re.regex($selection1.target.registry.registry_key, `HKLM\\System\\CurrentControlSet\\services.*\\ImagePath`)))

  condition:
    $selection1
Raw source existing_service_modified_detector_sysmon_behavior · YARA-L
Esc
Published by chronicle/detection-rules ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
rule existing_service_modified_detector_sysmon_behavior {
 meta:
    author = "Lee Archinal (content)"
    description = "Detects modification of existing services's binpPath  License: https://github.com/Neo23x0/sigma/blob/master/LICENSE.Detection.Rules.md."
    reference = "https://tdm.socprime.com/tdm/info/Jz8LIlhKgGOl"
    version = "0.01"
    created = "2019/07/06"
    product = "windows"
    service = "sysmon"
    mitre = "persistence, t1031"

  events:
(($selection1.metadata.product_event_type = "1" and $selection1.target.process.file.full_path = "C:\\Windows\\System32\\sc.exe" and re.regex($selection1.target.process.command_line, `sc config .* binpPath= .*`) and $selection1.principal.process.file.full_path = "C:\\Windows\\System32\\cmd.exe") or ($selection1.metadata.product_event_type = "13" and $selection1.target.process.file.full_path = "C:\\Windows\\System32\\services.exe" and re.regex($selection1.target.registry.registry_key, `HKLM\\System\\CurrentControlSet\\services.*\\ImagePath`)))

  condition:
    $selection1
}

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.