-
Notifications
You must be signed in to change notification settings - Fork 706
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
Align wireless_disable_interfaces with Ubuntu 22.04 STIG #11886
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<def-group> | ||
<definition class="compliance" id="wireless_disable_interfaces" version="1"> | ||
{{{ oval_metadata("All wireless interfaces should be disabled.") }}} | ||
<criteria> | ||
<criterion comment="query /proc/net/wireless" test_ref="test_wireless_disable_interfaces" /> | ||
</criteria> | ||
</definition> | ||
<ind:textfilecontent54_test check="all" check_existence="none_exist" comment="query /proc/net/wireless" id="test_wireless_disable_interfaces" version="1"> | ||
<ind:object object_ref="object_wireless_disable_interfaces" /> | ||
</ind:textfilecontent54_test> | ||
<ind:textfilecontent54_object id="object_wireless_disable_interfaces" version="1"> | ||
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. this check is only identifying if there's any wireless interface, it is not checking if they are disabled. 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. I did this test to check if the interface is still listed:
I did find an issue with the regex though. |
||
<ind:filepath>/proc/net/wireless</ind:filepath> | ||
<ind:pattern operation="pattern match">^\s*\S+:\s</ind:pattern> | ||
<ind:instance datatype="int" operation="greater than or equal">1</ind:instance> | ||
</ind:textfilecontent54_object> | ||
</def-group> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,10 @@ description: |- | |
Also remove the configuration files for every wifi adapter from | ||
<tt>/etc/wicked/ifconfig/<WIFI-INTERFACE>.xml</tt> to prevent future | ||
connections. | ||
{{% elif 'ubuntu' in product %}} | ||
Verify that there are no wireless interfaces configured on the system | ||
with the following command: | ||
<pre>$ ls -L -d /sys/class/net/*/wireless | xargs dirname | xargs basename -a</pre> | ||
{{% else %}} | ||
Configure the system to disable all wireless network interfaces with the following command: | ||
<pre>$ sudo nmcli radio all off</pre> | ||
|
@@ -93,6 +97,9 @@ ocil: |- | |
|
||
If a wireless interface is configured it must be documented and approved by | ||
the local Authorizing Official. | ||
{{% elif 'ubuntu' in product %}} | ||
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. this if seems unnecessary as you already has the command introduced above and the note is already in the else below. 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. If we don't make a special conditional for ubuntu it will show the |
||
<pre>$ ls -L -d /sys/class/net/*/wireless | xargs dirname | xargs basename -a</pre> | ||
Note: This requirement is Not Applicable for systems that do not have physical wireless network radios. | ||
{{% else %}} | ||
Note: This requirement is Not Applicable for systems that do not have physical wireless network radios. | ||
|
||
|
@@ -107,8 +114,26 @@ ocil: |- | |
{{% endif %}} | ||
|
||
fixtext: |- | ||
{{% if 'ubuntu' in product %}} | ||
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. also mention the nmcli fix 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. As decided, we are moving away from the nmcli fix. |
||
List all the wireless interfaces with the following command: | ||
<pre>$ ls -L -d /sys/class/net/*/wireless | xargs dirname | xargs basename -a</pre> | ||
For each interface, configure the system to disable wireless network | ||
interfaces with the following command: | ||
<pre>$ sudo ifdown <tt>interface name</tt></pre> | ||
For each interface listed, find their respective module with the | ||
following command: | ||
<pre>$ basename $(readlink -f /sys/class/net/<tt>interface name</tt>/device/driver)</pre> | ||
where <tt>interface name</tt> must be substituted by the actual interface name. | ||
Create a file in the <tt>/etc/modprobe.d</tt> directory and for each module, | ||
add the following line: | ||
<pre>install <tt>module name</tt> /bin/true</pre> | ||
For each module from the system, execute the following command to | ||
remove it: | ||
<pre>$ sudo modprobe -r <tt>module name</tt></pre> | ||
{{% else %}} | ||
Configure the system to disable all wireless network interfaces with the following command: | ||
<pre>$ nmcli radio all off</pre> | ||
{{% endif %}} | ||
|
||
srg_requirement: '{{{ full_name }}} wireless network adapters must be disabled.' | ||
|
||
|
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.
please keep the nmcli, this aligns with CIS
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.
As discussed, we can remove this since CIS 2.0.0 no longer uses nmcli in the remediation.