Skip to content

Updated Agent Script to Prevent Insecure ACLs #69

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mon0pixel
Copy link

The current method of installing Sysmon and WinlogBeat are opening up security holes due to an insecure ACL that is carried over when the .zip files are extracted. Specific concerns lay around the WinlogBeat folder permissions as any low priv user on the system is able to replace the service binary which the service will attempt to execute as SYSTEM allowing privilege escalation.
image
A potential attacker could also just disable the service causing reduced visibility to the host.
Sysmon is less of a concern as when it installs it copies the binaries to C:\Windows\System32 but should still be secured.
It looks like attempts to prevent this were in place in lines 177-180 but as you can see from the screenshot this was not working.

When the .zip file was being copied over to the C:\Program Files directory it was carrying a ACL rule allowing modify access to the folder for the NT AUTHORITY\Authenticated Users group. By doing it this way the only ACLs placed on the C:\Program Files\Sysmon directory will be the ones inherited by C:\Program Files.
When the .zip file was being copied over to the C:\Program Files directory it was carrying a ACL rule allowing modify access to the folder for the NT AUTHORITY\Authenticated Users group. By doing it this way the only ACLs placed on the C:\Program Files\winlogbeat* directory will be the ones inherited by C:\Program Files.
@mon0pixel
Copy link
Author

The more I look at this the less I think its caused by the .zip file but rather the directory the file is extracted in. Still an issue though.

@william-stearns william-stearns added the bug Something isn't working label May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants