Windows sc.exe Service Security Descriptor Changes via sdset
Alerts on sc.exe sdset activity that modifies a service security descriptor to grant access to targeted principals.
FreeUnreviewedSigmahighv1
windows-sc-exe-service-security-descriptor-changes-via-sdset-6c8fbee5
title: Windows sc.exe Service Security Descriptor Changes via sdset
id: e694837c-1c93-4232-ba56-148a4b105f84
related:
- id: a537cfc3-4297-4789-92b5-345bfd845ad0
type: similar
- id: 6c8fbee5-dee8-49bc-851d-c3142d02aa47
type: derived
status: test
description: This rule flags process executions of sc.exe where the command line includes sdset and uses a DACL entry pattern indicating it is granting access (A;). It further narrows matches to cases where the security descriptor targets trustees consistent with interactive users, service logon users, built-in administrators, local system, or everyone—common avenues for overriding existing access restrictions. The detection relies on Windows process creation telemetry, specifically sc.exe identification and command-line contents.
references:
- https://twitter.com/0gtweet/status/1628720819537936386
- https://itconnect.uw.edu/tools-services-support/it-systems-infrastructure/msinf/other-help/understanding-sddl-syntax/
- https://learn.microsoft.com/en-us/windows/win32/secauthz/sid-strings
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_sc_sdset_allow_service_changes.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2023-02-28
modified: 2025-10-22
tags:
- attack.privilege-escalation
- attack.persistence
- attack.t1543.003
logsource:
category: process_creation
product: windows
detection:
selection_sc:
- Image|endswith: \sc.exe
- OriginalFileName: sc.exe
selection_sdset:
CommandLine|contains|all:
- sdset
- A;
selection_trustee:
CommandLine|contains:
- ;IU
- ;SU
- ;BA
- ;SY
- ;WD
filter_optional_hexnode:
ParentImage: C:\Hexnode\Hexnode Agent\Current\HexnodeAgent.exe
condition: all of selection_* and not 1 of filter_optional_*
falsepositives:
- Unknown
level: high
license: DRL-1.1
What it detects
This rule flags process executions of sc.exe where the command line includes sdset and uses a DACL entry pattern indicating it is granting access (A;). It further narrows matches to cases where the security descriptor targets trustees consistent with interactive users, service logon users, built-in administrators, local system, or everyone—common avenues for overriding existing access restrictions. The detection relies on Windows process creation telemetry, specifically sc.exe identification and command-line contents.
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.