[PATCH 10/10] Moved sshd_allow_only_protocol2 to shared/

Shawn Wells shawn at redhat.com
Mon Jan 27 16:02:54 UTC 2014


-------------- next part --------------
>From 3c848d404151014cf54dc0b644cd20321148bc0e Mon Sep 17 00:00:00 2001
From: Shawn Wells <shawn at redhat.com>
Date: Thu, 23 Jan 2014 01:32:09 -0500
Subject: [PATCH 10/10] Moved sshd_allow_only_protocol2 to shared/

- Updated OVAL to match XCCDF name in RHEL6 and RHEL7 content
- Tested on RHEL7, updated CPE
- Symlinks
- Added to rhel7 rht-ccp profile
---
 RHEL/6/input/checks/sshd_allow_only_protocol2.xml |  1 +
 RHEL/6/input/checks/sshd_protocol_2.xml           | 30 -----------------------
 RHEL/6/input/services/ssh.xml                     |  2 +-
 RHEL/7/input/checks/sshd_allow_only_protocol2.xml |  1 +
 RHEL/7/input/profiles/rht-ccp.xml                 |  4 +--
 RHEL/7/input/services/ssh.xml                     |  2 +-
 scap-security-guide.spec                          |  1 +
 shared/oval/sshd_allow_only_protocol2.xml         | 30 +++++++++++++++++++++++
 8 files changed, 37 insertions(+), 34 deletions(-)
 create mode 120000 RHEL/6/input/checks/sshd_allow_only_protocol2.xml
 delete mode 100644 RHEL/6/input/checks/sshd_protocol_2.xml
 create mode 120000 RHEL/7/input/checks/sshd_allow_only_protocol2.xml
 create mode 100644 shared/oval/sshd_allow_only_protocol2.xml

diff --git a/RHEL/6/input/checks/sshd_allow_only_protocol2.xml b/RHEL/6/input/checks/sshd_allow_only_protocol2.xml
new file mode 120000
index 0000000..e312569
--- /dev/null
+++ b/RHEL/6/input/checks/sshd_allow_only_protocol2.xml
@@ -0,0 +1 @@
+../../../../shared/oval/sshd_allow_only_protocol2.xml
\ No newline at end of file
diff --git a/RHEL/6/input/checks/sshd_protocol_2.xml b/RHEL/6/input/checks/sshd_protocol_2.xml
deleted file mode 100644
index 16785da..0000000
--- a/RHEL/6/input/checks/sshd_protocol_2.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<def-group>
-  <definition class="compliance" id="sshd_protocol_2" version="1">
-    <metadata>
-      <title>Ensure Only Protocol 2 Connections Allowed</title>
-      <affected family="unix">
-        <platform>Red Hat Enterprise Linux 6</platform>
-      </affected>
-      <description>The OpenSSH daemon should be running protocol 2.</description>
-      <reference source="MED" ref_id="20130813" ref_url="test_attestation" />
-    </metadata>
-    <criteria comment="SSH is not being used or conditions are met" operator="OR">
-      <extend_definition comment="sshd service is disabled"
-      definition_ref="service_sshd_disabled" />
-      <extend_definition comment="rpm package openssh-server removed"
-      definition_ref="package_openssh-server_removed" />
-      <criterion comment="Check Protocol in /etc/ssh/sshd_config"
-      test_ref="test_sshd_protocol_2" />
-    </criteria>
-  </definition>
-  <ind:textfilecontent54_test check="all" check_existence="all_exist"
-  comment="sshd uses protocol 2" id="test_sshd_protocol_2" version="1">
-    <ind:object object_ref="object_sshd_protocol_2" />
-  </ind:textfilecontent54_test>
-  <ind:textfilecontent54_object id="object_sshd_protocol_2" version="2">
-    <ind:path>/etc/ssh</ind:path>
-    <ind:filename>sshd_config</ind:filename>
-    <ind:pattern operation="pattern match">^[\s]*(?i)Protocol[\s]+2[\s]*$</ind:pattern>
-    <ind:instance datatype="int">1</ind:instance>
-  </ind:textfilecontent54_object>
-</def-group>
diff --git a/RHEL/6/input/services/ssh.xml b/RHEL/6/input/services/ssh.xml
index 69b3f12..d79a34f 100644
--- a/RHEL/6/input/services/ssh.xml
+++ b/RHEL/6/input/services/ssh.xml
@@ -80,7 +80,7 @@ result in security vulnerabilities and
 should not be used.
 </rationale>
 <ident cce="27072-8" />
-<oval id="sshd_protocol_2" />
+<oval id="sshd_allow_only_protocol2" />
 <ref nist="AC-17(7),IA-5(1)(c)" disa="776,774,1436" />
 <tested by="DS" on="20121024"/>
 </Rule>
diff --git a/RHEL/7/input/checks/sshd_allow_only_protocol2.xml b/RHEL/7/input/checks/sshd_allow_only_protocol2.xml
new file mode 120000
index 0000000..e312569
--- /dev/null
+++ b/RHEL/7/input/checks/sshd_allow_only_protocol2.xml
@@ -0,0 +1 @@
+../../../../shared/oval/sshd_allow_only_protocol2.xml
\ No newline at end of file
diff --git a/RHEL/7/input/profiles/rht-ccp.xml b/RHEL/7/input/profiles/rht-ccp.xml
index a0e3598..74664fa 100644
--- a/RHEL/7/input/profiles/rht-ccp.xml
+++ b/RHEL/7/input/profiles/rht-ccp.xml
@@ -123,8 +123,8 @@ ANTIQUATED SERVICES
 <select idref="service_qpidd_disabled" selected="true"/>
 <select idref="service_rdisc_disabled" selected="true"/>
 
-SSH / REMOTE ACCESS CHECKS
-<select idref="sshd_allow_only_protocol2" selected="true"/> -->
+SSH / REMOTE ACCESS CHECKS -->
+<select idref="sshd_allow_only_protocol2" selected="true"/>
 <select idref="sshd_set_idle_timeout" selected="true"/>
 <select idref="sshd_set_keepalive" selected="true"/>
 <select idref="sshd_disable_rhosts" selected="true"/>
diff --git a/RHEL/7/input/services/ssh.xml b/RHEL/7/input/services/ssh.xml
index c25b6e9..446186a 100644
--- a/RHEL/7/input/services/ssh.xml
+++ b/RHEL/7/input/services/ssh.xml
@@ -80,7 +80,7 @@ result in security vulnerabilities and
 should not be used.
 </rationale>
 <ident cce="RHEL7-CCE-TBD" />
-<oval id="sshd_protocol_2" />
+<oval id="sshd_allow_only_protocol2" />
 <ref nist="AC-17(7),IA-5(1)(c)" disa="776,774,1436" />
 <tested by="DS" on="20121024"/>
 </Rule>
diff --git a/scap-security-guide.spec b/scap-security-guide.spec
index f0ab777..228589e 100644
--- a/scap-security-guide.spec
+++ b/scap-security-guide.spec
@@ -63,6 +63,7 @@ cp -a RHEL/6/input/auxiliary/scap-security-guide.8 %{buildroot}%{_mandir}/en/man
 - OVAL for sshd_enable_warning_banner
 - OVAL for sshd_do_not_permit_user_env
 - OVAL for sshd_use_approved_ciphers
+- OVAL for sshd_allow_only_protocol2
 
 * Tue Dec 24 2013 Shawn Wells <shawn at redhat.com> 0.1-16.rc2
 + RHEL6 stig-rhel6-server XCCDF profile renamed to stig-rhel6-server-upstream
diff --git a/shared/oval/sshd_allow_only_protocol2.xml b/shared/oval/sshd_allow_only_protocol2.xml
new file mode 100644
index 0000000..7ae306c
--- /dev/null
+++ b/shared/oval/sshd_allow_only_protocol2.xml
@@ -0,0 +1,30 @@
+<def-group>
+  <definition class="compliance" id="sshd_allow_only_protocol2" version="1">
+    <metadata>
+      <title>Ensure Only Protocol 2 Connections Allowed</title>
+      <affected family="unix">
+        <platform>Red Hat Enterprise Linux 6</platform>
+        <platform>Red Hat Enterprise Linux 7</platform>
+      </affected>
+      <description>The OpenSSH daemon should be running protocol 2.</description>
+      <reference source="MED" ref_id="20130813" ref_url="test_attestation" />
+    </metadata>
+    <criteria comment="SSH is not being used or conditions are met" operator="OR">
+      <extend_definition comment="sshd service is disabled"
+      definition_ref="service_sshd_disabled" />
+      <extend_definition comment="rpm package openssh-server removed"
+      definition_ref="package_openssh-server_removed" />
+      <criterion comment="Check Protocol in /etc/ssh/sshd_config"
+      test_ref="test_sshd_allow_only_protocol2" />
+    </criteria>
+  </definition>
+  <ind:textfilecontent54_test check="all" check_existence="all_exist"
+  comment="sshd uses protocol 2" id="test_sshd_allow_only_protocol2" version="1">
+    <ind:object object_ref="object_sshd_allow_only_protocol2" />
+  </ind:textfilecontent54_test>
+  <ind:textfilecontent54_object id="object_sshd_allow_only_protocol2" version="2">
+    <ind:filepath>/etc/ssh/sshd_config</ind:filepath>
+    <ind:pattern operation="pattern match">^[\s]*(?i)Protocol[\s]+2[\s]*$</ind:pattern>
+    <ind:instance datatype="int">1</ind:instance>
+  </ind:textfilecontent54_object>
+</def-group>
-- 
1.8.3.1



More information about the scap-security-guide mailing list