-
Notifications
You must be signed in to change notification settings - Fork 57
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
Allow rules to express paths using globbing (fnmatch) #315
base: main
Are you sure you want to change the base?
Conversation
Steps to check the functionality using wine applications as an example:
|
Hey, it seem to be a big amount of work. It does make sense to put wildcards into path and exec rule attributes but the way you put them into trustdb won't work with integrity because there is just one hash for x files that match globing. What you can do is to extend CLI "add" and possibly others so it supports loading files with wildcards therefore each file will be in trustdb with coresponding hash. I've changed your output little bit so take a look: Steps to check:
What do you think? |
Sorry for the long comment. The previous comment has also been corrected and expanded. I probably failed to get the message across. I'll use wine again as an example, although it doesn't have to be wine. You give the example more about wildcards for adding hashes not for processing.
It doesn't matter how the hashes get into the database. Securely, of course, but now the cli utility does not require modification as it seems to me. You can use bash for this job:
But in my case Information security specialists manually generate wine application trust files, and ansible automatically delivers trust files to client workstations. specialists may change real username to asterisk but it is not necessary . remediations-gendbuntu. Since integrating trusts into wine packages is quite problematic. Obviously, may be some warning to administrator, that actual rules patterns |
The second implementation of fnmatch support, which works with trusted base. Briefly:
/home/*/.wine/*
change the path from/home/jdoe/.wine/drive_c/windows/notepad.exe
to/home/*/.wine/drive_c/windows/notepad.exe
/home/jdoe/.wine/drive_c/windows/notepad.exe
to/home/*/.wine/drive_c/windows/notepad.exe