{"id":"514e4c3a-c77d-4cde-a00f-046425e2301e","title":"Abuse of Service Permissions to Hide Services Via Set-Service","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":{"category":"process_creation","product":"windows"},"falsepositives":["Rare intended use of hidden services"],"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/process_creation/proc_creation_win_powershell_hide_services_via_set_service.yml","source_sha256":"20d2609b4339990714325784c9647aa637abb8d5c330ab8e1fee0686d29f8591","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_powershell_hide_services_via_set_service.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\nid: 514e4c3a-c77d-4cde-a00f-046425e2301e\nrelated:\n    - id: a537cfc3-4297-4789-92b5-345bfd845ad0\n      type: derived\n    - id: 953945c5-22fe-4a92-9f8a-a9edc1e522da\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    category: process_creation\n    product: windows\ndetection:\n    selection_img:\n        - Image|endswith: '\\pwsh.exe'\n        - OriginalFileName: 'pwsh.dll'\n    selection_sddl:\n        # Example would be: \"D:(D;;DCLCWPDTSD;;;IU)(D;;DCLCWPDTSD;;;SU)(D;;DCLCWPDTSD;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)\"\n        CommandLine|contains|all:\n            - 'Set-Service '\n            - 'DCLCWPDTSD'\n    selection_cmdlet:\n        CommandLine|contains:\n            - '-SecurityDescriptorSddl '\n            - '-sd '\n    condition: all of selection_*\nfalsepositives:\n    - Rare intended use of hidden services\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/514e4c3a-c77d-4cde-a00f-046425e2301e.json","kind":"sigma"}
