<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 7/15/14, 9:23 PM, Gabe wrote:<br>
    </div>
    <blockquote
      cite="mid:1405484584-3511-2-git-send-email-redhatrises@gmail.com"
      type="cite">
      <div class="moz-text-plain" wrap="true" graphical-quote="true"
        style="font-family: -moz-fixed; font-size: 12px;"
        lang="x-unicode">
        <pre wrap="">- add aide oval check to check <i class="moz-txt-slash"><span class="moz-txt-tag">/</span>etc/crontab and files in /etc/cron.d<span class="moz-txt-tag">/</span></i>
- add aide bash fix
- enable aide oval check in scan

Signed-off-by: Gabe <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:redhatrises@gmail.com">&lt;redhatrises@gmail.com&gt;</a>
---
 RHEL/6/input/checks/aide_cron_checking.xml    | 39 +++++++++++++++++++++++++++
 RHEL/6/input/fixes/bash/aide_cron_checking.sh |  1 +
 RHEL/6/input/system/software/integrity.xml    |  1 +
 3 files changed, 41 insertions(+)
 create mode 100644 RHEL/6/input/checks/aide_cron_checking.xml
 create mode 100644 RHEL/6/input/fixes/bash/aide_cron_checking.sh

diff --git a/RHEL/6/input/checks/aide_cron_checking.xml b/RHEL/6/input/checks/aide_cron_checking.xml
new file mode 100644
index 0000000..ed8f506
--- /dev/null
+++ b/RHEL/6/input/checks/aide_cron_checking.xml
@@ -0,0 +1,39 @@
+&lt;def-group&gt;
+  &lt;definition class="compliance" id="aide_cron_checking" version="1"&gt;
+    &lt;metadata&gt;
+      &lt;title&gt;Configure Periodic Execution of AIDE&lt;/title&gt;
+      &lt;affected family="unix"&gt;
+        &lt;platform&gt;Red Hat Enterprise Linux 6&lt;/platform&gt;
+      &lt;/affected&gt;
+      &lt;description&gt;By default, AIDE does not install itself for periodic
+      execution. Periodically running AIDE is necessary to reveal
+      unexpected changes in installed files.
+      &lt;/description&gt;
+      &lt;reference source="MED" ref_id="20130928" ref_url="test_attestation" /&gt;
+    &lt;/metadata&gt;
+    &lt;criteria operator="OR"&gt;
+      &lt;extend_definition comment="Aide is installed" negate="true" definition_ref="package_aide_installed" /&gt;
+      &lt;criterion comment="run aide daily with cron" test_ref="test_aide_cron_checking" /&gt;
+      &lt;criterion comment="run aide daily with cron" test_ref="test_aide_crond_checking" /&gt;
+    &lt;/criteria&gt;
+  &lt;/definition&gt;
+
+  &lt;ind:textfilecontent54_test check="all" check_existence="all_exist" comment="run aide daily with cron" id="test_aide_cron_checking" version="1"&gt;
+    &lt;ind:object object_ref="object_test_aide_cron_checking" /&gt;
+  &lt;/ind:textfilecontent54_test&gt;
+  &lt;ind:textfilecontent54_object comment="run aide daily with cron" id="object_test_aide_cron_checking" version="1"&gt;
+    &lt;ind:filepath&gt;/etc/crontab&lt;/ind:filepath&gt;
+    &lt;ind:pattern operation="pattern match"&gt;^[\s]*05[\s]*4[\s]*\*[\s]*\*[\s]*\*[\s]*root[\s]*/usr/sbin/aide[\s]*\-\-check+$&lt;/ind:pattern&gt;
+    &lt;ind:instance datatype="int" operation="greater than or equal"&gt;1&lt;/ind:instance&gt;
+  &lt;/ind:textfilecontent54_object&gt;
+
+  &lt;ind:textfilecontent54_test check="all" check_existence="all_exist" comment="run aide daily with cron" id="test_aide_crond_checking" version="1"&gt;
+    &lt;ind:object object_ref="object_test_aide_crond_checking" /&gt;
+  &lt;/ind:textfilecontent54_test&gt;
+  &lt;ind:textfilecontent54_object comment="run aide daily with cron" id="object_test_aide_crond_checking" version="1"&gt;
+    &lt;ind:path&gt;/etc/cron.d&lt;/ind:path&gt;
+    &lt;ind:filename operation="pattern match"&gt;^.*$&lt;/ind:filename&gt;
+    &lt;ind:pattern operation="pattern match"&gt;^[\s]*05[\s]*4[\s]*\*[\s]*\*[\s]*\*[\s]*root[\s]*/usr/sbin/aide[\s]*\-\-check+$&lt;/ind:pattern&gt;
+    &lt;ind:instance datatype="int" operation="greater than or equal"&gt;1&lt;/ind:instance&gt;
+  &lt;/ind:textfilecontent54_object&gt;
+&lt;/def-group&gt;
diff --git a/RHEL/6/input/fixes/bash/aide_cron_checking.sh b/RHEL/6/input/fixes/bash/aide_cron_checking.sh
new file mode 100644
index 0000000..f62ef72
--- /dev/null
+++ b/RHEL/6/input/fixes/bash/aide_cron_checking.sh
@@ -0,0 +1 @@
+echo "05 4 * * * root /usr/sbin/aide --check" &gt;&gt; /etc/crontab
diff --git a/RHEL/6/input/system/software/integrity.xml b/RHEL/6/input/system/software/integrity.xml
index 55bf115..7c2f262 100644
--- a/RHEL/6/input/system/software/integrity.xml
+++ b/RHEL/6/input/system/software/integrity.xml
@@ -100,6 +100,7 @@ To determine that periodic AIDE execution has been scheduled, run the following
 By default, AIDE does not install itself for periodic execution. Periodically
 running AIDE is necessary to reveal unexpected changes in installed files.
 &lt;/rationale&gt;
+&lt;oval id="aide_cron_checking" /&gt;
 &lt;ident cce="27222-9" /&gt;
 &lt;ref nist="CM-3(d),CM-3(e),CM-6(d),CM-6(3),SC-28,SI-7" disa="374,416,1069,1263,1297,1589"/&gt;
 &lt;/Rule&gt;
<div class="moz-txt-sig">-- 
2.0.0
</div></pre>
      </div>
    </blockquote>
    <br>
    I can't tell if anyone responded to this. So, risking being a dupe,
    thanks for filling out this gap in OVAL content! Two minor
    adjustments are needed:<br>
    <br>
    - The OVAL filename should be named to match the XCCDF rule ID. In
    this case, 'git mv aide_cron_checking.xml
    aide_periodic_cron_checking.xml'. Technically the build scripts will
    parse whatever is in the XCCDF oval id, though eventually we'll drop
    this bit of code and have things automatically (and only) search for
    matching XCCDF/OVAL/remediation script pairings. <br>
    <br>
    - The 0405 cron time was an example (which we need to make clearer),
    and not meant to mandate DoD systems to kickoff aide at 0405. The
    OVAL should be tolerant of any time combination within the
    hour/minute fields, and require *'s on days/month/week.<br>
    <br>
  </body>
</html>