-
Notifications
You must be signed in to change notification settings - Fork 777
Update Ubuntu STIG rules for library file permissions #14428
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,8 @@ | ||
| documentation_complete: true | ||
|
|
||
| {{% if 'ubuntu' in product -%}} | ||
| {{% set gid_description = ' or a required system account' -%}} | ||
| {{% endif -%}} | ||
|
|
||
| title: |- | ||
| Verify the system-wide library files in directories | ||
| "/lib", "/lib64", "/usr/lib/" and "/usr/lib64" are group-owned by root{{{ gid_description }}}. | ||
| "/lib", "/lib64", "/usr/lib/" and "/usr/lib64" are group-owned by root. | ||
|
|
||
| description: |- | ||
| System-wide library files are stored in the following directories | ||
|
|
@@ -17,7 +13,7 @@ description: |- | |
| /usr/lib64 | ||
| </pre> | ||
| All system-wide shared library files should be protected from unauthorised | ||
| access. If any of these files is not group-owned by root{{{ gid_description }}}, | ||
| access. If any of these files is not group-owned by root, | ||
| correct its group-owner with the following command: | ||
| <pre>$ sudo chgrp root <i>FILE</i></pre> | ||
|
|
||
|
|
@@ -50,14 +46,13 @@ references: | |
| stigid@sle12: SLES-12-010875 | ||
| stigid@sle15: SLES-15-010355 | ||
|
|
||
| ocil_clause: any system wide shared library file is returned and is not group-owned by root{{{ gid_description }}} | ||
| ocil_clause: any system wide shared library file is returned and is not group-owned by root | ||
|
|
||
| ocil: |- | ||
| Verify the system-wide shared library files are group-owned by root{{{ gid_description }}} with the following command: | ||
| Verify the system-wide shared library files are group-owned by root with the following command: | ||
|
|
||
| $ sudo find -L /lib /lib64 /usr/lib /usr/lib64 ! -group root -exec ls -l {} \; | ||
|
|
||
| {{% if "ubuntu" not in product %}} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you want to change the condition in line 64 so that only .so files will be checked like in the other rule?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added, thanks! |
||
| template: | ||
| name: file_groupowner | ||
| vars: | ||
|
|
@@ -66,21 +61,26 @@ template: | |
| - /lib64/ | ||
| - /usr/lib/ | ||
| - /usr/lib64/ | ||
| {{% if 'ol' in families or 'rhel' in product %}} | ||
| {{% if 'ol' in families or 'rhel' in product or 'ubuntu' in product %}} | ||
| file_regex: ^.*\.so.*$ | ||
| {{% else %}} | ||
| file_regex: ^.*$ | ||
| {{% endif %}} | ||
| recursive: 'true' | ||
| gid_or_name: '0' | ||
| {{% endif %}} | ||
|
|
||
| fixtext: |- | ||
| Configure the system-wide shared library files (/lib, /lib64, /usr/lib and /usr/lib64) to be protected from unauthorized access. | ||
|
|
||
| Run the following command, replacing "[FILE]" with any library file not group-owned by root{{{ gid_description }}}. | ||
| {{%- if 'ubuntu' in product %}} | ||
| Run the following command: | ||
|
|
||
| <pre>$ sudo find /lib /lib64 /usr/lib /usr/lib64 -type f -name '*.so*' ! -group root -exec chgrp root {} +</pre> | ||
| {{%- else %}} | ||
| Run the following command, replacing "[FILE]" with any library file not group-owned by root. | ||
|
|
||
| $ sudo chgrp root [FILE] | ||
| {{%- endif %}} | ||
|
|
||
| srg_requirement: | ||
| {{{ full_name }}} library files must be group-owned by root{{{ gid_description }}}. | ||
| {{{ full_name }}} library files must be group-owned by root. | ||
This file was deleted.
This file was deleted.
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.
the
gid_descriptionis still used inocil_clauseThere 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.
Removed, thanks!