Service DACL Abuse To Hide Services Via Sc.EXE
Detects usage of the "sc.exe" utility adding a new service with special permission seen used by threat actors which makes the service hidden and unremovable.
Sigma rule (View on GitHub)
1title: Service DACL Abuse To Hide Services Via Sc.EXE
2id: a537cfc3-4297-4789-92b5-345bfd845ad0
3related:
4 - id: 99cf1e02-00fb-4c0d-8375-563f978dfd37 # Deny Service Access
5 type: similar
6 - id: 98c5aeef-32d5-492f-b174-64a691896d25 # Generic SD tampering
7 type: similar
8status: test
9description: Detects usage of the "sc.exe" utility adding a new service with special permission seen used by threat actors which makes the service hidden and unremovable.
10references:
11 - https://blog.talosintelligence.com/2021/10/threat-hunting-in-large-datasets-by.html
12 - https://www.sans.org/blog/red-team-tactics-hiding-windows-services/
13 - https://twitter.com/Alh4zr3d/status/1580925761996828672
14 - https://itconnect.uw.edu/tools-services-support/it-systems-infrastructure/msinf/other-help/understanding-sddl-syntax/
15author: Andreas Hunkeler (@Karneades)
16date: 2021-12-20
17modified: 2022-08-08
18tags:
19 - attack.persistence
20 - attack.privilege-escalation
21 - attack.execution
22 - attack.stealth
23 - attack.t1574.011
24logsource:
25 category: process_creation
26 product: windows
27detection:
28 selection_img:
29 - Image|endswith: '\sc.exe'
30 - OriginalFileName: 'sc.exe'
31 selection_cli:
32 CommandLine|contains|all:
33 - 'sdset'
34 # Summary of permissions
35 # DC: Delete All Child Objects
36 # LC: List Contents
37 # WP: Write All Properties
38 # DT: Delete Subtree
39 # SD: Delete
40 - 'DCLCWPDTSD'
41 condition: all of selection_*
42falsepositives:
43 - Unknown
44level: high
References
Related rules
- Abuse of Service Permissions to Hide Services Via Set-Service
- Abuse of Service Permissions to Hide Services Via Set-Service - PS
- Changing Existing Service ImagePath Value Via Reg.EXE
- Possible Privilege Escalation via Weak Service Permissions
- Potential Persistence Attempt Via Existing Service Tampering