Skip to content
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

Add rules STIG UBTU-20-010437 and UBTU-20-010451 #11325

Merged
merged 5 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/aide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ packages:
rules:
- aide_build_database
- aide_check_audit_tools
- aide_disable_silentreports
- aide_periodic_cron_checking
- aide_periodic_checking_systemd_timer
- aide_scan_notification
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
documentation_complete: true

prodtype: ubuntu1804,ubuntu2004

title: 'Configure AIDE To Notify Personnel if Baseline Configurations Are Altered'

description: |-
The operating system file integrity tool must be configured to notify designated personnel of any changes to configurations.

rationale: |-
Detecting changes in the system can help avoid unintended, and negative consequences
that could affect the security state of the operating system

severity: medium

references:
disa: "CCI-001744,CCI-002702"
srg: "SRG-OS-000447-GPOS-00201,SRG-OS-000363-GPOS-00150"
stigid@ubuntu2004: UBTU-20-010437

ocil_clause: 'silentreports is enabled in aide default configuration, or is missing'

ocil: |-
Verify that Advanced Intrusion Detection Environment (AIDE) notifies the System Administrator
when anomalies in the operation of any security functions are discovered with the following command:
<pre># grep SILENTREPORTS {{{ aide_default_path }}} </pre>

SILENTREPORTS=no

If SILENTREPORTS is commented out, this is a finding.

If SILENTREPORTS is set to "yes", this is a finding.

If SILENTREPORTS is not set to "no", this is a finding.

fixtext: |-
Configure the {{{ full_name }}} operating system to notify designated personnel if baseline configurations are changed in an unauthorized manner.

Modify the "SILENTREPORTS" parameter in the "{{{ aide_default_path }}}" file with a value of "no" if it does not already exist.

srg_requirement:
{{{ full_name }}} must notify designated personnel if baseline configurations are changed in an unauthorized manner.

template:
name: key_value_pair_in_file
vars:
path: '{{{ aide_default_path }}}'
key: 'SILENTREPORTS'
value: 'no'
sep: '='
sep_regex: '='
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
# platform = multi_platform_ubuntu
# packages = aide

echo "SILENTREPORTS=no" >> /etc/default/aide
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
# platform = multi_platform_ubuntu
# packages = aide

FILE=/etc/default/aide

echo "SILENTREPORTS=no" >> $FILE
echo "SILENTREPORTS=wrong" >> $FILE

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# platform = multi_platform_ubuntu
# packages = aide

FILE=/etc/default/aide

if grep -q "^SILENTREPORTS=" $FILE; then
sed -i "s/^SILENTREPORTS=.*$/SILENTREPORTS=wrong/g" $FILE
else
echo "SILENTREPORTS=wrong" >> $FILE
fi

1 change: 1 addition & 0 deletions products/ubuntu2004/product.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ oval_feed_url: "https://people.canonical.com/~ubuntu-security/oval/com.ubuntu.fo

aide_bin_path: "/usr/bin/aide.wrapper"
aide_conf_path: "/etc/aide/aide.conf"
aide_default_path: "/etc/default/aide"
chrony_conf_path: "/etc/chrony/chrony.conf"

cpes_root: "../../shared/applicability"
Expand Down
2 changes: 2 additions & 0 deletions products/ubuntu2004/profiles/stig.profile
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ selections:
- chronyd_sync_clock

# UBTU-20-010437 The Ubuntu operating system must notify designated personnel if baseline configurations are changed in an unauthorized manner. The file integrity tool must notify the System Administrator when changes to the baseline configuration or anomalies in the oper
- aide_disable_silentreports

# UBTU-20-010438 The Ubuntu operating system's Advance Package Tool (APT) must be configured to prevent the installation of patches, service packs, device drivers, or Ubuntu operating system components without verification they have been digitally signed using a certificate that is recognized and approved by the organization.
- apt_conf_disallow_unauthenticated
Expand Down Expand Up @@ -566,6 +567,7 @@ selections:
- aide_build_database

# UBTU-20-010451 The Ubuntu operating system must notify designated personnel if baseline configurations are changed in an unauthorized manner. The file integrity tool must notify the System Administrator when changes to the baseline configuration or anomalies in the operation of any security functions are discovered.
# Same as UBTU-20-010437

# UBTU-20-010453 The Ubuntu operating system must display the date and time of the last successful account logon upon logon.
- display_login_attempts
Expand Down
1 change: 1 addition & 0 deletions tests/data/product_stability/ubuntu2004.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ aide_also_checks_audispd: 'yes'
aide_also_checks_rsyslog: 'no'
aide_bin_path: /usr/bin/aide.wrapper
aide_conf_path: /etc/aide/aide.conf
aide_default_path: /etc/default/aide
audisp_conf_path: /etc/audit
auid: 1000
basic_properties_derived: true
Expand Down
Loading