Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom resource Security Descriptor should return SID of Windows services #4

Open
swapnil-patil96 opened this issue Feb 19, 2021 · 0 comments

Comments

@swapnil-patil96
Copy link
Contributor

Describe the problem

Currently, Security Descriptor provides SID of built-in users and user groups, however, it could also return SID of Windows Services which are required for certain controls in the Stig Windows Server 2019 profile.

Possible Solution

Refactoring get_sid private method by adding the following LOCs to retrieve Service sid when it is unable to find user or user group SID

service_sids = inspec.command("sc.exe showSid \"#{entity_name}\" | Select-String -Pattern Service").stdout.strip.split("\r\n\r\n").map { |entry| entry.split(': ') }
return service_sids[0][1] unless service_sids.empty?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant