LoFP LoFP / false positives should be limited as the activity is not common to delete only the sd from the registry.

Techniques

Sample rules

Windows Registry Delete Task SD

Description

The following analytic detects a process attempting to delete a scheduled task’s Security Descriptor (SD) from the registry path of that task. It leverages the Endpoint.Registry data model to identify registry actions performed by the SYSTEM user, specifically targeting deletions of the SD value. This activity is significant as it may indicate an attempt to remove evidence of a scheduled task for defense evasion. If confirmed malicious, it suggests an attacker with privileged access trying to hide their tracks, potentially compromising system integrity and security.

Detection logic


| tstats `security_content_summariesonly`
  count min(_time) as firstTime
        max(_time) as lastTime

FROM datamodel=Endpoint.Registry where

Registry.registry_path IN ("*\\Schedule\\TaskCache\\Tree\\*")
Registry.user="SYSTEM"
(
  Registry.registry_value_name="SD"
  OR
  Registry.registry_key_name="SD"
)
Registry.action=deleted

by Registry.action Registry.dest Registry.process_guid
   Registry.process_id Registry.registry_hive
   Registry.registry_path Registry.registry_key_name
   Registry.registry_value_data Registry.registry_value_name
   Registry.registry_value_type Registry.status Registry.user
   Registry.vendor_product


| `drop_dm_object_name(Registry)`

| `security_content_ctime(firstTime)`

| `security_content_ctime(lastTime)`

| `windows_registry_delete_task_sd_filter`