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

Corrections in aide_periodic_cron_checking and aide_scan_notification… #11665

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Description=Aide Check
[Service]
Type=simple
ExecStart=/usr/sbin/aide --check
ExecStart={{{ aide_bin_path }}} --check
[Install]
WantedBy=multi-user.target

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cat > /etc/systemd/system/aidecheck.service <<EOF
Description=Aide Check
[Service]
Type=simple
ExecStart=/usr/sbin/aide --check
ExecStart={{{ aide_bin_path }}} --check
[Install]
WantedBy=multi-user.target
EOF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cat > /etc/systemd/system/aidecheck.service <<EOF
Description=Aide Check
[Service]
Type=simple
ExecStart=/usr/sbin/aide --check
ExecStart={{{ aide_bin_path }}} --check
[Install]
WantedBy=multi-user.target
EOF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ checktext: |-
$ sudo more /etc/cron.daily/aide

#!/bin/bash
/usr/sbin/aide --check | /bin/mail -s "$HOSTNAME - Daily aide integrity check run" root@sysname.mil
{{{ aide_bin_path }}} --check | /bin/mail -s "$HOSTNAME - Daily aide integrity check run" root@sysname.mil

If the file integrity application does not exist, or a script file controlling the execution of the file integrity application does not exist, or the file integrity application does not notify designated personnel of changes, this is a finding.

Expand All @@ -39,4 +39,4 @@ fixtext: |-
$ sudo more /etc/cron.daily/aide

#!/bin/bash
/usr/sbin/aide --check | /bin/mail -s "$HOSTNAME - Daily aide integrity check run" root@sysname.mil
{{{ aide_bin_path }}} --check | /bin/mail -s "$HOSTNAME - Daily aide integrity check run" root@sysname.mil
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

{{{ bash_package_remove("aide") }}}

echo '21 21 * * * root /usr/sbin/aide --check &>/dev/null' >> /etc/crontab
echo '21 21 * * * root {{{ aide_bin_path }}} --check &>/dev/null' >> /etc/crontab
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# packages = aide,crontabs

mkdir -p /etc/cron.daily
echo "/usr/sbin/aide --check" > /etc/cron.daily/aide
echo "{{{ aide_bin_path }}} --check" > /etc/cron.daily/aide
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
mkdir -p /etc/cron.daily
cat > /etc/cron.daily/aide << EOF
#!/bin/sh
nice ionice /usr/sbin/aide --check
nice ionice /usr/sbin/aide --init
nice ionice {{{ aide_bin_path }}} --check
nice ionice {{{ aide_bin_path }}} --init
/bin/mv -f /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
EOF
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
# packages = aide,crontabs

echo '21 21 * * * root /usr/sbin/aide --check &>/dev/null' >> /etc/crontab
echo '21 21 * * * root {{{ aide_bin_path }}} --check &>/dev/null' >> /etc/crontab
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
# packages = aide,crontabs

echo '@daily root /usr/sbin/aide --check &>/dev/null' >> /etc/crontab
echo '@daily root {{{ aide_bin_path }}} --check &>/dev/null' >> /etc/crontab
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# aide installs automatically a file that is periodically run on /etc/cron.daily/aide
rm -f /etc/cron.daily/aide

echo '21 21 1 * * root /usr/sbin/aide --check &>/dev/null' >> /etc/crontab
echo '21 21 1 * * root {{{ aide_bin_path }}} --check &>/dev/null' >> /etc/crontab
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
# packages = aide,crontabs

echo '21 21 * * 1-2 root /usr/sbin/aide --check &>/dev/null' >> /etc/crontab
echo '21 21 * * 1-2 root {{{ aide_bin_path }}} --check &>/dev/null' >> /etc/crontab
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
# packages = aide,crontabs

echo '21 21 * * 3 root /usr/sbin/aide --check &>/dev/null' >> /etc/crontab
echo '21 21 * * 3 root {{{ aide_bin_path }}} --check &>/dev/null' >> /etc/crontab
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
# packages = aide,crontabs

echo '@weekly root /usr/sbin/aide --check &>/dev/null' >> /etc/crontab
echo '@weekly root {{{ aide_bin_path }}} --check &>/dev/null' >> /etc/crontab
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
# packages = aide,crontabs

echo '21 21 * * mon root /usr/sbin/aide --check &>/dev/null' >> /etc/crontab
echo '21 21 * * mon root {{{ aide_bin_path }}} --check &>/dev/null' >> /etc/crontab
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# aide installs automatically a file that is periodically run on /etc/cron.daily/aide
rm -f /etc/cron.daily/aide

echo '21 21 1 2 * root /usr/sbin/aide --check &>/dev/null' >> /etc/crontab
echo '21 21 1 2 * root {{{ aide_bin_path }}} --check &>/dev/null' >> /etc/crontab
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ checktext: |-
To determine that periodic AIDE execution has been scheduled, run the following command:
$ grep aide /etc/crontab
The output should return something similar to the following:
05 4 * * * root /usr/sbin/aide --check | /bin/mail -s "$(hostname) - AIDE Integrity Check" root@localhost
05 4 * * * root {{{ aide_bin_path }}} --check | /bin/mail -s "$(hostname) - AIDE Integrity Check" root@localhost
The email address that the notifications are sent to can be changed by overriding
root@localhost .

Expand All @@ -33,4 +33,4 @@ fixtext: |-
$ sudo more /etc/cron.daily/aide

#!/bin/bash
/usr/sbin/aide --check | /bin/mail -s "$HOSTNAME - Daily aide integrity check run" root@sysname.mil
{{{ aide_bin_path }}} --check | /bin/mail -s "$HOSTNAME - Daily aide integrity check run" root@sysname.mil
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
following line to the existing AIDE line:
<pre> | /bin/mail -s "$(hostname) - AIDE Integrity Check" root@localhost</pre>
Otherwise, add the following line to <tt>/etc/crontab</tt>:
<pre>05 4 * * * root /usr/sbin/aide --check | /bin/mail -s "$(hostname) - AIDE Integrity Check" root@localhost</pre>
<pre>05 4 * * * root {{{ aide_bin_path }}} --check | /bin/mail -s "$(hostname) - AIDE Integrity Check" root@localhost</pre>
AIDE can be executed periodically through other means; this is merely one example.

rationale: |-
Expand Down Expand Up @@ -64,7 +64,7 @@ ocil: |-
{{% else %}}
<pre>$ grep aide /etc/crontab</pre>
The output should return something similar to the following:
<pre>05 4 * * * root /usr/sbin/aide --check | /bin/mail -s "$(hostname) - AIDE Integrity Check" root@localhost</pre>
<pre>05 4 * * * root {{{ aide_bin_path }}} --check | /bin/mail -s "$(hostname) - AIDE Integrity Check" root@localhost</pre>
The email address that the notifications are sent to can be changed by overriding
<pre><sub idref="var_aide_scan_notification_email" /></pre>.
{{% endif %}}
Expand All @@ -88,7 +88,7 @@ fixtext: |-

#!/bin/bash

/usr/sbin/aide --check | /bin/mail -s "$HOSTNAME - Daily aide integrity check run" root@sysname.mil
{{{ aide_bin_path }}} --check | /bin/mail -s "$HOSTNAME - Daily aide integrity check run" root@sysname.mil
{{% endif %}}

srg_requirement: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# packages = aide,crontabs

# configured in crontab
echo '0 5 * * * root /usr/sbin/aide --check | /bin/mail -s "Automatus - AIDE Integrity Check" admin@automatus' > /etc/cron.weekly/aidescan
echo '0 5 * * * root {{{ aide_bin_path }}} --check | /bin/mail -s "Automatus - AIDE Integrity Check" admin@automatus' > /etc/cron.weekly/aidescan
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# packages = aide,crontabs

# configured in crontab
echo '0 5 * * * root /usr/sbin/aide --check | /bin/mail -s "Automatus - AIDE Integrity Check" admin@automatus' >> /etc/crontab
echo '0 5 * * * root {{{ aide_bin_path }}} --check | /bin/mail -s "Automatus - AIDE Integrity Check" admin@automatus' >> /etc/crontab
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# packages = aide,crontabs

# configured in crontab
echo '0 5 * * * root /usr/sbin/aide --check' >> /etc/crontab
echo '0 5 * * * root {{{ aide_bin_path }}} --check' >> /etc/crontab
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# packages = aide,cronie

# configured in crontab
echo '0 5 * * * root /usr/sbin/aide --check | /bin/mail -s "Automatus - AIDE Integrity Check" admin@automatus' >> /var/spool/cron/root
echo '0 5 * * * root {{{ aide_bin_path }}} --check | /bin/mail -s "Automatus - AIDE Integrity Check" admin@automatus' >> /var/spool/cron/root
1 change: 1 addition & 0 deletions products/sle15/profiles/stig.profile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ selections:
- agent_mfetpd_running
- aide_build_database
- aide_check_audit_tools
- aide_periodic_cron_checking
- aide_scan_notification
- aide_verify_acls
- aide_verify_ext_attributes
Expand Down
Loading
Loading