{"id":"953945c5-22fe-4a92-9f8a-a9edc1e522da","title":"Abuse of Service Permissions to Hide Services Via Set-Service - PS","description":"Detects usage of the \"Set-Service\" powershell cmdlet to configure a new SecurityDescriptor that allows a service to be hidden from other utilities such as \"sc.exe\", \"Get-Service\"...etc. (Works only in powershell 7)","author":"Nasreddine Bencherchali (Nextron Systems)","status":"test","level":"high","date":"2022-10-17","modified":"","tags":["attack.persistence","attack.privilege-escalation","attack.execution","attack.stealth","attack.t1574.011"],"technique_ids":["T1574.011"],"logsource":{"product":"windows","category":"ps_script","definition":"Requirements: Script Block Logging must be enabled"},"falsepositives":["Rare intended use of hidden services","Rare FP could occur due to the non linearity of the ScriptBlockText log"],"references":["https://twitter.com/Alh4zr3d/status/1580925761996828672","https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/set-service?view=powershell-7.2"],"source_path":"rules/windows/powershell/powershell_script/posh_ps_using_set_service_to_hide_services.yml","source_sha256":"01f577345197230c21bfe5fc09bd0f07adc74898cf2630fd0778faf87183f8ec","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/powershell/powershell_script/posh_ps_using_set_service_to_hide_services.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Abuse of Service Permissions to Hide Services Via Set-Service - PS\nid: 953945c5-22fe-4a92-9f8a-a9edc1e522da\nrelated:\n    - id: 514e4c3a-c77d-4cde-a00f-046425e2301e\n      type: similar\nstatus: test\ndescription: Detects usage of the \"Set-Service\" powershell cmdlet to configure a new SecurityDescriptor that allows a service to be hidden from other utilities such as \"sc.exe\", \"Get-Service\"...etc. (Works only in powershell 7)\nreferences:\n    - https://twitter.com/Alh4zr3d/status/1580925761996828672\n    - https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/set-service?view=powershell-7.2\nauthor: Nasreddine Bencherchali (Nextron Systems)\ndate: 2022-10-17\ntags:\n    - attack.persistence\n    - attack.privilege-escalation\n    - attack.execution\n    - attack.stealth\n    - attack.t1574.011\nlogsource:\n    product: windows\n    category: ps_script\n    definition: 'Requirements: Script Block Logging must be enabled'\ndetection:\n    selection:\n        ScriptBlockText|contains|all:\n            - 'Set-Service '\n            - 'DCLCWPDTSD'\n        ScriptBlockText|contains:\n            - '-SecurityDescriptorSddl '\n            - '-sd '\n    condition: selection\nfalsepositives:\n    - Rare intended use of hidden services\n    - Rare FP could occur due to the non linearity of the ScriptBlockText log\nlevel: high\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1574.011","id":"T1574.011","name":"Services Registry Permissions Weakness","page":"techniques/enterprise/T1574.011/"}],"data_path":"data/detection-rules/953945c5-22fe-4a92-9f8a-a9edc1e522da.json","kind":"sigma"}
