There are a few things I did here. The first was to rewrite the regex to use (?i) for case insensitive matching. The second was to make the checks and the language in the comments uniform and run everything through tidy. The third was to test all the checks and add the test_attestation reference to each.
- Maura Dailey
Maura Dailey (1):
Making SSH checks uniform and hopefully adding case insensitive
RHEL6/input/checks/sshd_banner_set.xml | 24 +++++++--------
RHEL6/input/checks/sshd_clientalivecountmax.xml | 32 ++++++++-----------
.../input/checks/sshd_hostbasedauthentication.xml | 19 ++++++++----
RHEL6/input/checks/sshd_idle_timeout.xml | 30 ++++++++++--------
RHEL6/input/checks/sshd_no_user_envset.xml | 24 ++++++--------
.../input/checks/sshd_permitemptypasswords_no.xml | 24 +++++++--------
RHEL6/input/checks/sshd_permitrootlogin_no.xml | 24 +++++++--------
RHEL6/input/checks/sshd_protocol_2.xml | 17 +++++++---
RHEL6/input/checks/sshd_rsh_emulation_disabled.xml | 24 +++++++--------
RHEL6/input/checks/sshd_use_approved_ciphers.xml | 28 ++++++++++-------
10 files changed, 126 insertions(+), 120 deletions(-)
Ok, I'm stumped now. I'm using the latest SSG content (downloaded today) on a RHEL6.4 64bit VM. On this box I loaded the latest SPAWAR release candidate as well as Security Blanket. Ran the scan, and this module passed, but it failed in Security Blanket. Poking through the SSG content I ran the command as indicated in the description manually and it *failed*. So looking in the check-content section for this rule I see 3 entries -
one for the CCE reference
one for a oval definition
one for an ocil-transitional
If I drill down through the oval definition it *looks* like there's an pattern match for only looking at things with a 'bin' as part of the path, which would skip the things that appeared to bork.
Looked at the ocil-transitional definition I see a command using grep like I've *never* seen before (note the && was escaped in the xccdf file)
description command -> rpm -Va | grep '^..5'
check-content(ocil-trans) command -> rpm -Va | grep '$1 ~ /..5/ && $2 != "c"'
question 1 - which command is actually being run? I'm assuming the one from the oval, as the ocil one doesn't make any sense to me unless the command is being mangled before execution, or someone snuck something into grep when I wasn't looking...
Question 2 - Is there any way to have oscap spit out a log file of the commands/checks actually being run, so see why things may or may not have triggered a fail?
Question 3 - If the command being run is actually from the oval, with the pathname pattern match, why doesn't the description detail the same exception? I've had this complaint with the RHEL5 STIG as well where there have been a few line items where the description says one thing and the actual check is doing some extra stuff.
Somebody knows how can I modify openscap report design? I need to put a
logo in front and add contact information, and I cannot see any info in
All info would be nice.
Thanks a lot!
I was reviewing the Rule: aide_periodic_cron_checking and noticed the following recommended fix:
To implement a daily execution of AIDE at 4:05am using cron, add the following line to /etc/crontab:
05 4 * * * root /usr/sbin/aide --check
AIDE can be executed periodically through other means; this is merely one example.
---- end quote------
This fix is also documented in the RHEL STIG version 1 release 2.
I believe that is an incorrect line for crontab as the 6th element is to be the executed command. On my RHEL 6.4 machine, "root" is not a valid command and I receive the following in local mail box
Heirloom Mail version 12.4 7/29/08. Type ? for help.
"/var/spool/mail/root": 1 message 1 new
>N 1 Cron Daemon Fri Aug 9 04:05 23/1036 "Cron <root@techval15> root /usr/sbin/aide --check"
From root(a)techval15.northamerica.cerner.net Fri Aug 9 04:05:01 2013
Date: Fri, 9 Aug 2013 04:05:01 -0500
From: root(a)techval15.northamerica.cerner.net (Cron Daemon)
Subject: Cron <root@techval15> root /usr/sbin/aide --check
Content-Type: text/plain; charset=ISO-8859-1
/bin/sh: root: command not found
Am I missing something?
Robert Hayden | Sr. Technology Architect | Cerner Corporation | 816.201.4068 | rhayden(a)cerner.com<mailto:firstname.lastname@example.org> | www.cerner.com
CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
Can someone explain the logic behind using the OR operator for runlevel test criteria? If runlevel 1 is set to true and runlevel 3 set to false, wouldn't the below criteria still return true?
<criteria operator="OR" comment="service iptables is configured to start">
<criterion comment="iptables runlevel 0" test_ref="oval:ssg:tst:427"/>
<criterion comment="iptables runlevel 1" test_ref="oval:ssg:tst:428"/>
<criterion comment="iptables runlevel 2" test_ref="oval:ssg:tst:429"/>
<criterion comment="iptables runlevel 3" test_ref="oval:ssg:tst:430"/>
<criterion comment="iptables runlevel 4" test_ref="oval:ssg:tst:431"/>
<criterion comment="iptables runlevel 5" test_ref="oval:ssg:tst:432"/>
<criterion comment="iptables runlevel 6" test_ref="oval:ssg:tst:433"/>
I was wondering why the tests for 'Ensure all Files Are Owned by a User' and 'Ensure all Files are Owned by a Group' kept on failing. Drilling down it looks like the underlying find command being used is along the lines of :
find PARTITION -xdev -nouser -print
When I run this command manually I've had complaints that find can't read files in /proc. Looking at the man page suggests this can be avoided by adding the '-ignore_readdir_race' option before the -xdev option.
This change may need to be added for both SSG items 2.2.3.e and 2.2.3.f
I think some of these ids were leftover from the USGCB for RHEL 5. In any case, I've replaced them
with human readable ones, which should make them easier to read for future editors.
- Maura Dailey
Maura Dailey (1):
Small patch to replace autogenerated test, state, and object ids with
human readable ones
.../checks/accounts_root_path_dirs_no_write.xml | 57 +++++++-------------
.../checks/core_dump_suid_progs_limits_conf.xml | 19 ++-----
RHEL6/input/checks/core_dumps_limitsconf.xml | 23 +++-----
RHEL6/input/checks/file_groupowner_etc_group.xml | 22 +++-----
RHEL6/input/checks/file_groupowner_etc_gshadow.xml | 22 +++-----
RHEL6/input/checks/file_groupowner_etc_passwd.xml | 22 +++-----
RHEL6/input/checks/file_groupowner_etc_shadow.xml | 22 +++-----
RHEL6/input/checks/file_owner_etc_group.xml | 22 +++-----
RHEL6/input/checks/file_owner_etc_gshadow.xml | 22 +++-----
RHEL6/input/checks/file_owner_etc_passwd.xml | 22 +++-----
RHEL6/input/checks/file_permissions_etc_group.xml | 22 +++-----
.../input/checks/file_permissions_ungroupowned.xml | 27 +++------
RHEL6/input/checks/interactive_boot_disable.xml | 18 ++----
13 files changed, 112 insertions(+), 208 deletions(-)
I am new to SCAP and trying to determine how to modify a rule. I have downloaded the source code and have located an OVAL test I would like to change to suite my purposes. The file is selinux_policytype.xml. I have chosen this file because I am trying to make the SELinux enforcement rule pass for an MLS enforcement rather than targeted. My questions are as follows:
The OVAL document references an object, test, state and variable but does not define them (as far as I can tell) within the OVAL file. Rather, it appears to be calling them from somewhere else.
In particular I am referring to these lines.
13 test_ref = "test_selinux_policy"
21 object object_ref = obj_selinux_policy
22 state state_ref = state_selinux_policy
Finally I think this is the variable I am going to need to change.
var_ref = var_selinux_policy_name
My question are:
1) where are these objects defined, and if it is possible how can I modify them?
2) Other than the OVAL website are there any other resources anyone can recommend that can help me learn this material?