Windows sc.exe Service Security Descriptor Tampering (sdset)
Detects sc.exe executions using sdset to modify service security descriptors, enabling stealthy service tampering.
FreeUnreviewedSigmamediumv1
windows-sc-exe-service-security-descriptor-tampering-sdset-98c5aeef
title: Windows sc.exe Service Security Descriptor Tampering (sdset)
id: 8758ecba-5336-430d-84e7-135e85d63eb1
related:
- id: 99cf1e02-00fb-4c0d-8375-563f978dfd37
type: similar
- id: a537cfc3-4297-4789-92b5-345bfd845ad0
type: similar
- id: 98c5aeef-32d5-492f-b174-64a691896d25
type: derived
status: test
description: This rule flags process executions where sc.exe is used to run the sdset command, indicating service security descriptor changes. Attackers can use this to grant or remove permissions on services, potentially hiding or controlling access to a newly created or modified service for persistence and stealth. The detection relies on Windows process creation telemetry capturing the sc.exe image/filename and the command line containing sdset.
references:
- https://blog.talosintelligence.com/2021/10/threat-hunting-in-large-datasets-by.html
- https://www.sans.org/blog/red-team-tactics-hiding-windows-services/
- https://twitter.com/Alh4zr3d/status/1580925761996828672
- https://twitter.com/0gtweet/status/1628720819537936386
- https://itconnect.uw.edu/tools-services-support/it-systems-infrastructure/msinf/other-help/understanding-sddl-syntax/
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_sc_sdset_modification.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2023-02-28
tags:
- attack.persistence
- attack.privilege-escalation
- attack.execution
- attack.stealth
- attack.t1574.011
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: \sc.exe
- OriginalFileName: sc.exe
selection_cli:
CommandLine|contains: sdset
condition: all of selection_*
falsepositives:
- Unknown
level: medium
license: DRL-1.1
What it detects
This rule flags process executions where sc.exe is used to run the sdset command, indicating service security descriptor changes. Attackers can use this to grant or remove permissions on services, potentially hiding or controlling access to a newly created or modified service for persistence and stealth. The detection relies on Windows process creation telemetry capturing the sc.exe image/filename and the command line containing sdset.
Known false positives
- Unknown
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.