{"id":"22d80745-6f2c-46da-826b-77adaededd74","title":"Suspicious Service DACL Modification Via Set-Service Cmdlet - 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-24","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_susp_service_dacl_modification_set_service.yml","source_sha256":"3b3ae290dd173005c0e8f6e731505f56089faed3136dfec38be72bae99381b44","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/powershell/powershell_script/posh_ps_susp_service_dacl_modification_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: Suspicious Service DACL Modification Via Set-Service Cmdlet - PS\nid: 22d80745-6f2c-46da-826b-77adaededd74\nrelated:\n    - id: a95b9b42-1308-4735-a1af-abb1c5e6f5ac\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-24\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_sddl_flag:\n        ScriptBlockText|contains:\n            - '-SecurityDescriptorSddl '\n            - '-sd '\n    selection_set_service:\n        ScriptBlockText|contains|all:\n            - 'Set-Service '\n            - 'D;;'\n        ScriptBlockText|contains:\n            - ';;;IU'\n            - ';;;SU'\n            - ';;;BA'\n            - ';;;SY'\n            - ';;;WD'\n    condition: all of 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/22d80745-6f2c-46da-826b-77adaededd74.json","kind":"sigma"}
