ComplianceAsCode / content

Security automation content in SCAP, Bash, Ansible, and other formats
https://complianceascode.readthedocs.io/en/latest/
Other
2.18k stars 695 forks source link

needs mapping/rule: SRG-OS-000324-GPOS-00125, SV-86595r1_rule, RHEL-07-020020 (selinux role mappings) #1827

Closed shawndwells closed 6 years ago

shawndwells commented 7 years ago
<Group id="V-71971"><title>SRG-OS-000324-GPOS-00125</title><description>&lt;GroupDescription&gt;&lt;/GroupDescription&gt;</description><Rule id="SV-86595r1_rule" severity="medium" weight="10.0"><version>RHEL-07-020020</version><title>The operating system must prevent non-privileged users from executing privileged functions to include disabling, circumventing, or altering implemented security safeguards/countermeasures.</title><description>&lt;VulnDiscussion&gt;Preventing non-privileged users from executing privileged functions mitigates the risk that unauthorized individuals or processes may gain unnecessary access to information or privileges.^M
^M
Privileged functions include, for example, establishing accounts, performing system integrity checks, or administering cryptographic key management activities. Non-privileged users are individuals who do not possess appropriate authorizations. Circumventing intrusion detection and prevention mechanisms or malicious code protection mechanisms are examples of privileged functions that require protection from non-privileged users.&lt;/VulnDiscussion&gt;&lt;FalsePositives&gt;&lt;/FalsePositives&gt;&lt;FalseNegatives&gt;&lt;/FalseNegatives&gt;&lt;Documentable&gt;false&lt;/Documentable&gt;&lt;Mitigations&gt;&lt;/Mitigations&gt;&lt;SeverityOverrideGuidance&gt;&lt;/SeverityOverrideGuidance&gt;&lt;PotentialImpacts&gt;&lt;/PotentialImpacts&gt;&lt;ThirdPartyTools&gt;&lt;/ThirdPartyTools&gt;&lt;MitigationControl&gt;&lt;/MitigationControl&gt;&lt;Responsibility&gt;&lt;/Responsibility&gt;&lt;IAControls&gt;&lt;/IAControls&gt;</description><reference><dc:title>DPMS Target Red Hat 7</dc:title><dc:publisher>DISA</dc:publisher><dc:type>DPMS Target</dc:type><dc:subject>Red Hat 7</dc:subject><dc:identifier>2777</dc:identifier></reference><ident system="http://iase.disa.mil/cci">CCI-002165</ident><ident system="http://iase.disa.mil/cci">CCI-002235</ident><fixtext fixref="F-78323r1_fix">Configure the operating system to prevent non-privileged users from executing privileged functions to include disabling, circumventing, or altering implemented security safeguards/countermeasures.^M
^M
Use the following command to map a new user to the "sysdam_u" role: ^M
^M
#semanage login -a -s sysadm_u &lt;username&gt;^M
^M
Use the following command to map an existing user to the "sysdam_u" role:^M
^M
#semanage login -m -s sysadm_u &lt;username&gt;^M
^M
Use the following command to map a new user to the "staff_u" role:^M
^M
#semanage login -a -s staff_u &lt;username&gt;^M
^M
Use the following command to map an existing user to the "staff_u" role:^M
^M
#semanage login -m -s staff_u &lt;username&gt;^M
^M
Use the following command to map a new user to the "user_u" role:^M
^M
# semanage login -a -s user_u &lt;username&gt;^M
^M
Use the following command to map an existing user to the "user_u" role:^M
^M
# semanage login -m -s user_u &lt;username&gt;</fixtext><fix id="F-78323r1_fix" /><check system="C-72203r1_chk"><check-content-ref name="M" href="DPMS_XCCDF_Benchmark_RHEL_7_STIG.xml" /><check-content>Verify the operating system prevents non-privileged users from executing privileged functions to include disabling, circumventing, or altering implemented security safeguards/countermeasures.^M
^M
Get a list of authorized users (other than System Administrator and guest accounts) for the system.^M
^M
Check the list against the system by using the following command:^M
^M
# semanage login -l | more^M
Login Name  SELinux User   MLS/MCS Range  Service^M
__default__  user_u    s0-s0:c0.c1023   *^M
root   unconfined_u   s0-s0:c0.c1023   *^M
system_u  system_u   s0-s0:c0.c1023   *^M
joe  staff_u   s0-s0:c0.c1023   *^M
^M
All administrators must be mapped to the "sysadm_u" or "staff_u" users with the appropriate domains (sysadm_t and staff_t).^M
^M
All authorized non-administrative users must be mapped to the "user_u" role or the appropriate domain (user_t).^M
^M
If they are not mapped in this way, this is a finding.</check-content></check></Rule></Group>
trevor-vaughan commented 7 years ago

Shouldn't defaulting to user_u really start being done in regular RHEL?

shawndwells commented 6 years ago

mapped @ https://github.com/OpenSCAP/scap-security-guide/blob/master/shared/guide/system/selinux/selinux_user_login_roles.rule#L42