-
Notifications
You must be signed in to change notification settings - Fork 67
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
Fixes SeIncreaseQuotaPrivilege #44
Fixes SeIncreaseQuotaPrivilege #44
Conversation
Signed-off-by: imjoseangel <[email protected]>
its('SeIncreaseQuotaPrivilege') { should include 'S-1-5-19' } | ||
its('SeIncreaseQuotaPrivilege') { should include 'S-1-5-20' } | ||
its('SeIncreaseQuotaPrivilege') { should include 'S-1-5-32-544' } | ||
its('SeIncreaseQuotaPrivilege') { should eq ['S-1-5-19', 'S-1-5-20', 'S-1-5-32-544'] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this still work, if it is not in this exact order?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @rndmh3ro ,
I have tested it and is about how Windows manages the list:
By default you have:
Administrators
LOCAL SERVICE
NETWORK SERVICE
If you remove Administrators group, you get:
× windows-014: Ensure 'Adjust memory quotas for a process' is set to 'Administrators, LOCAL SERVICE, NETWORK SERVICE'
× Security Policy SeIncreaseQuotaPrivilege is expected to eq ["S-1-5-19", "S-1-5-20", "S-1-5-32-544"]
expected: ["S-1-5-19", "S-1-5-20", "S-1-5-32-544"]
got: ["S-1-5-19", "S-1-5-20"]
(compared using ==)
When adding back, Windows returns the list in that exact order always:
✔ windows-014: Ensure 'Adjust memory quotas for a process' is set to 'Administrators, LOCAL SERVICE, NETWORK SERVICE'
✔ Security Policy SeIncreaseQuotaPrivilege is expected to eq ["S-1-5-19", "S-1-5-20", "S-1-5-32-544"]
If you add an extra user:
× windows-014: Ensure 'Adjust memory quotas for a process' is set to 'Administrators, LOCAL SERVICE, NETWORK SERVICE'
× Security Policy SeIncreaseQuotaPrivilege is expected to eq ["S-1-5-19", "S-1-5-20", "S-1-5-32-544"]
expected: ["S-1-5-19", "S-1-5-20", "S-1-5-32-544"]
got: ["S-1-5-19", "S-1-5-20", "imjoseangel", "S-1-5-32-544"]
(compared using ==)
etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for investigating this!
LGTM! @chris-rock any remarks? |
Thank you @imjoseangel for this improvement! |
Signed-off-by: imjoseangel [email protected]
Fixes #20 and #22