<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 11/22/13, 12:52 PM, Jan Lieskovsky
      wrote:<br>
    </div>
    <blockquote
      cite="mid:1888159184.6879608.1385142731594.JavaMail.root@redhat.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="">Introduce 'Service' Fedora's guide section, and
include XCCDF descriptions for selected ntpd and sshd
rules. OVAL checks and remediations for them to
follow later once confirmed as working.


Thank you &amp;&amp; Regards, Jan.
--
Jan iankko Lieskovsky / Red Hat Security Technologies Team
</pre>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"><legend
          class="mimeAttachmentHeaderName">0001-Fedora-Include-Services-section-and-XCCDF-descriptio.patch</legend></fieldset>
      <br>
      <div class="moz-text-plain" wrap="true" graphical-quote="true"
        style="font-family: -moz-fixed; font-size: 12px;"
        lang="x-western">
        <pre wrap="">From 52c6f3323ace4797fbbd270db85fe22f1ecf9719 Mon Sep 17 00:00:00 2001
From: Jan Lieskovsky <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:jlieskov@redhat.com">&lt;jlieskov@redhat.com&gt;</a>
Date: Fri, 22 Nov 2013 18:47:25 +0100
Subject: [PATCH] [Fedora] Include Services section and XCCDF description for
 selected ntpd's sshd's rules

Signed-off-by: Jan Lieskovsky <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:jlieskov@redhat.com">&lt;jlieskov@redhat.com&gt;</a>
---
 Fedora/input/guide.xslt            |  9 ++++
 Fedora/input/profiles/common.xml   | 10 +++++
 Fedora/input/services/ntp.xml      | 65 +++++++++++++++++++++++++++
 Fedora/input/services/services.xml | 15 +++++++
 Fedora/input/services/ssh.xml      | 92 ++++++++++++++++++++++++++++++++++++++
 Fedora/scap-security-guide.spec    |  6 ++-
 6 files changed, 196 insertions(+), 1 deletion(-)
 create mode 100644 Fedora/input/services/ntp.xml
 create mode 100644 Fedora/input/services/services.xml
 create mode 100644 Fedora/input/services/ssh.xml

diff --git a/Fedora/input/guide.xslt b/Fedora/input/guide.xslt
index d99da5a..2dc4231 100644
--- a/Fedora/input/guide.xslt
+++ b/Fedora/input/guide.xslt
@@ -17,6 +17,7 @@
       &lt;/Value&gt;
       &lt;xsl:apply-templates select="document('intro/intro.xml')" /&gt;
       &lt;xsl:apply-templates select="document('system/system.xml')" /&gt;
+      &lt;xsl:apply-templates select="document('services/services.xml')" /&gt;
     &lt;/xsl:copy&gt;
   &lt;/xsl:template&gt;
 
@@ -51,6 +52,14 @@
     &lt;/xsl:copy&gt;
   &lt;/xsl:template&gt;
 
+  &lt;xsl:template match="Group[@id='services']"&gt;
+    &lt;xsl:copy&gt;
+      &lt;xsl:copy-of select="@*|node()" /&gt;
+      &lt;xsl:apply-templates select="document('services/ntp.xml')" /&gt;
+      &lt;xsl:apply-templates select="document('services/ssh.xml')" /&gt;
+    &lt;/xsl:copy&gt;
+  &lt;/xsl:template&gt;
+
   &lt;!-- copy everything else through to final output --&gt;
   &lt;xsl:template match="@*|node()"&gt;
     &lt;xsl:copy&gt;
diff --git a/Fedora/input/profiles/common.xml b/Fedora/input/profiles/common.xml
index a1d7f53..330b002 100644
--- a/Fedora/input/profiles/common.xml
+++ b/Fedora/input/profiles/common.xml
@@ -32,4 +32,14 @@
     &lt;refine-value idref="var_accounts_password_warn_age_login_defs" selector="7"/&gt;
     &lt;select idref="accounts_password_warn_age_login_defs" selected="true"/&gt;
 
+&lt;!-- Services --&gt;
+  &lt;!-- Network Time Protocol --&gt;
+  &lt;select idref="service_ntpd_enabled" selected="true"/&gt;
+  &lt;select idref="ntpd_specify_remote_server" selected="true"/&gt;
+  &lt;!-- SSH Server --&gt;
+  &lt;select idref="sshd_disable_root_login" selected="true"/&gt;
+  &lt;select idref="sshd_disable_empty_passwords" selected="true"/&gt;
+  &lt;select idref="sshd_set_idle_timeout" selected="true"/&gt;
+  &lt;select idref="sshd_set_keepalive" selected="true"/&gt;
+
 &lt;/Profile&gt;
diff --git a/Fedora/input/services/ntp.xml b/Fedora/input/services/ntp.xml
new file mode 100644
index 0000000..7462f4a
--- /dev/null
+++ b/Fedora/input/services/ntp.xml
@@ -0,0 +1,65 @@
+&lt;Group id="ntp"&gt;
+&lt;title&gt;Network Time Protocol&lt;/title&gt;
+&lt;description&gt;The Network Time Protocol is used to manage the system clock over
+a network. Computer clocks are not very accurate, so time will drift
+unpredictably on unmanaged systems. Central time protocols can be used both to
+ensure that time is consistent among a network of machines, and that their time
+is consistent with the outside world.
+&lt;br /&gt;&lt;br /&gt;
+If every system on a network reliably reports the same time, then it is much
+easier to correlate log messages in case of an attack. In addition, a number of
+cryptographic protocols (such as Kerberos) use timestamps to prevent certain
+types of attacks. If your network does not have synchronized time, these
+protocols may be unreliable or even unusable.
+&lt;br /&gt;&lt;br /&gt;
+Depending on the specifics of the network, global time accuracy may be just as
+important as local synchronization, or not very important at all. If your
+network is connected to the Internet, using a public timeserver (or one
+provided by your enterprise) provides globally accurate timestamps which may be
+essential in investigating or responding to an attack which originated outside
+of your network.
+&lt;br /&gt;&lt;br /&gt;
+A typical network setup involves a small number of internal systems operating
+as NTP servers, and the remainder obtaining time information from those
+internal servers.
+&lt;br /&gt;&lt;br /&gt;
+More information on how to configure the NTP server software, including
+configuration of cryptographic authentication for time data, is available at
+http://www.ntp.org.
+&lt;/description&gt;
+
+&lt;Rule id="service_ntpd_enabled" severity="medium"&gt;
+&lt;title&gt;Enable the NTP Daemon&lt;/title&gt;
+&lt;description&gt; &lt;service-enable-macro service="ntpd" /&gt; &lt;/description&gt;
+&lt;rationale&gt;Enabling the &lt;tt&gt;ntpd&lt;/tt&gt; service ensures that the &lt;tt&gt;ntpd&lt;/tt&gt;
+service will be running and that the system will synchronize its time to any
+servers specified. This is important whether the system is configured to be a
+client (and synchronize only its own clock) or it is also acting as an NTP
+server to other systems.  Synchronizing time is essential for authentication
+services such as Kerberos, but it is also important for maintaining accurate
+logs and auditing possible security breaches.
+&lt;br /&gt;&lt;br /&gt;
+The NTP daemon offers all of the functionality of &lt;tt&gt;ntpdate&lt;/tt&gt;, which is
+now deprecated.  Additional information on this is available at
+http://support.ntp.org/bin/view/Dev/DeprecatingNtpdate&lt;/rationale&gt;
+&lt;!-- &lt;oval id="service_ntpd_enabled" /&gt; --&gt;
+&lt;ref nist="AU-8(1)" disa="160" /&gt;
+&lt;/Rule&gt;
+
+&lt;Rule id="ntpd_specify_remote_server" severity="medium"&gt;
+&lt;title&gt;Specify a Remote NTP Server&lt;/title&gt;
+&lt;description&gt;To specify a remote NTP server for time synchronization, edit
+the file &lt;tt&gt;/etc/ntp.conf&lt;/tt&gt;. Add or correct the following lines,
+substituting the IP or hostname of a remote NTP server for &lt;em&gt;ntpserver&lt;/em&gt;:
+&lt;pre&gt;server &lt;i&gt;ntpserver&lt;/i&gt;&lt;/pre&gt;
+This instructs the NTP software to contact that remote server to obtain time
+data.
+&lt;/description&gt;
+&lt;rationale&gt;Synchronizing with an NTP server makes it possible to collate system
+logs from multiple sources or correlate computer events with real time events.
+&lt;/rationale&gt;
+&lt;!-- &lt;oval id="ntp_remote_server" /&gt; --&gt;
+&lt;ref nist="AU-8(1)" disa="160" /&gt;
+&lt;/Rule&gt;
+
+&lt;/Group&gt;
diff --git a/Fedora/input/services/services.xml b/Fedora/input/services/services.xml
new file mode 100644
index 0000000..9d8ccfb
--- /dev/null
+++ b/Fedora/input/services/services.xml
@@ -0,0 +1,15 @@
+&lt;Group id="services"&gt;
+&lt;title&gt;Services&lt;/title&gt;
+&lt;description&gt;
+The best protection against vulnerable software is running less software. This
+section describes how to review the software which Fedora installs on a system
+and disable software which is not needed. It then enumerates the software
+packages installed on a default Fedora system and provides guidance about which
+ones can be safely disabled.
+&lt;br /&gt;&lt;br /&gt;
+Fedora provides a convenient minimal install option that essentially installs
+the bare necessities for a functional system. When building Fedora servers, it
+is highly recommended to select the minimal packages and then build up the
+system from there.
+&lt;/description&gt;
+&lt;/Group&gt;
diff --git a/Fedora/input/services/ssh.xml b/Fedora/input/services/ssh.xml
new file mode 100644
index 0000000..b41b741
--- /dev/null
+++ b/Fedora/input/services/ssh.xml
@@ -0,0 +1,92 @@
+&lt;Group id="ssh"&gt;
+&lt;title&gt;SSH Server&lt;/title&gt;
+&lt;description&gt;The SSH protocol is recommended for remote login and remote file
+transfer. SSH provides confidentiality and integrity for data exchanged between
+two systems, as well as server authentication, through the use of public key
+cryptography. The implementation included with the system is called OpenSSH,
+and more detailed documentation is available from its website,
+http://www.openssh.org. Its server program is called &lt;tt&gt;sshd&lt;/tt&gt; and
+provided by the RPM package &lt;tt&gt;openssh-server&lt;/tt&gt;.&lt;/description&gt;
+
+&lt;Group id="ssh_server"&gt;
+&lt;title&gt;Configure OpenSSH Server if Necessary&lt;/title&gt;
+&lt;description&gt;If the system needs to act as an SSH server, then certain changes
+should be made to the OpenSSH daemon configuration file
+&lt;tt&gt;/etc/ssh/sshd_config&lt;/tt&gt;. The following recommendations can be applied
+to this file. See the &lt;tt&gt;sshd_config(5)&lt;/tt&gt; man page for more detailed
+information.&lt;/description&gt;
+
+&lt;Rule id="sshd_disable_root_login" severity="medium"&gt;
+&lt;title&gt;Disable SSH Root Login&lt;/title&gt;
+&lt;description&gt;The root user should never be allowed to login to a system
+directly over a network. To disable root login via SSH, add or correct the
+following line in &lt;tt&gt;/etc/ssh/sshd_config&lt;/tt&gt;:
+&lt;pre&gt;PermitRootLogin no&lt;/pre&gt;
+&lt;/description&gt;
+&lt;rationale&gt;
+Permitting direct root login reduces auditable information about who ran
+privileged commands on the system and also allows direct attack attempts on
+root's password.
+&lt;/rationale&gt;
+&lt;!-- &lt;oval id="sshd_disable_root_login" /&gt; --&gt;
+&lt;ref nist="AC-6(2),IA-2(1)" disa="770" /&gt;
+&lt;/Rule&gt;
+
+&lt;Rule id="sshd_disable_empty_passwords" severity="high"&gt;
+&lt;title&gt;Disable SSH Access via Empty Passwords&lt;/title&gt;
+&lt;description&gt;To explicitly disallow remote login from accounts with empty
+passwords, add or correct the following line in &lt;tt&gt;/etc/ssh/sshd_config&lt;/tt&gt;:
+&lt;pre&gt;PermitEmptyPasswords no&lt;/pre&gt;
+Any accounts with empty passwords should be disabled immediately, and PAM
+configuration should prevent users from being able to assign themselves empty
+passwords.
+&lt;/description&gt;
+&lt;rationale&gt;
+Configuring this setting for the SSH daemon provides additional assurance that
+remote login via SSH will require a password, even in the event of
+misconfiguration elsewhere.
+&lt;/rationale&gt;
+&lt;!-- &lt;oval id="sshd_disable_empty_passwords" /&gt; --&gt;
+&lt;ref disa="765,766"/&gt;
+&lt;/Rule&gt;
+
+&lt;Rule id="sshd_set_idle_timeout"&gt;
+&lt;title&gt;Set SSH Idle Timeout Interval&lt;/title&gt;
+&lt;description&gt;SSH allows administrators to set an idle timeout interval.
+After this interval has passed, the idle user will be automatically logged out.
+&lt;br /&gt;&lt;br /&gt;
+To set an idle timeout interval, edit the following line in
+&lt;tt&gt;/etc/ssh/sshd_config&lt;/tt&gt; as follows:
+&lt;pre&gt;ClientAliveInterval &lt;b&gt;INTERVAL&lt;/b&gt;&lt;/pre&gt;
+The timeout &lt;b&gt;INTERVAL&lt;/b&gt; is given in seconds. To have a timeout of 15
+minutes, set &lt;b&gt;interval&lt;/b&gt; to 900.
+&lt;br /&gt;&lt;br /&gt;
+If a shorter timeout has already been set for the login shell, that value will
+preempt any SSH setting made here. Keep in mind that some processes may stop
+SSH from correctly detecting that the user is idle.
+&lt;/description&gt;
+&lt;rationale&gt;
+Causing idle users to be automatically logged out guards against compromises
+one system leading trivially to compromises on another.
+&lt;/rationale&gt;
+&lt;!-- &lt;oval id="sshd_set_idle_timeout" value="sshd_idle_timeout_value"/&gt; --&gt;
+&lt;ref disa="879,1133"/&gt;
+&lt;/Rule&gt;
+
+&lt;Rule id="sshd_set_keepalive"&gt;
+&lt;title&gt;Set SSH Client Alive Count&lt;/title&gt;
+&lt;description&gt;To ensure the SSH idle timeout occurs precisely when the
+&lt;tt&gt;ClientAliveCountMax&lt;/tt&gt; is set, edit &lt;tt&gt;/etc/ssh/sshd_config&lt;/tt&gt; as
+follows:
+&lt;pre&gt;ClientAliveCountMax 0&lt;/pre&gt;
+&lt;/description&gt;
+&lt;rationale&gt;
+This ensures a user login will be terminated as soon as the
+&lt;tt&gt;ClientAliveCountMax&lt;/tt&gt; is reached.
+&lt;/rationale&gt;
+&lt;!-- &lt;oval id="sshd_set_keepalive" /&gt; --&gt;
+&lt;ref disa="879,1133"/&gt;
+&lt;/Rule&gt;
+
+&lt;/Group&gt;
+&lt;/Group&gt;
diff --git a/Fedora/scap-security-guide.spec b/Fedora/scap-security-guide.spec
index 3c88ddd..40d79b5 100644
--- a/Fedora/scap-security-guide.spec
+++ b/Fedora/scap-security-guide.spec
@@ -5,7 +5,7 @@
 # file one level up - in the main scap-security-guide directory (instead of
 # this one).
 
-%global        fedorassgversion        4.rc2
+%global        fedorassgversion        4.rc3
 
 Name:                scap-security-guide
 Version:        0.1.%{fedorassgversion}
@@ -53,6 +53,10 @@ cp -a Fedora/input/auxiliary/scap-security-guide.8 %{buildroot}%{_mandir}/en/man
 %doc Fedora/LICENSE Fedora/output/ssg-fedora-guide.html
 
 %changelog
+* Fri Nov 22 2013 Jan iankko Lieskovsky <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:jlieskov@redhat.com">&lt;jlieskov@redhat.com&gt;</a> 0.1.4.rc3-1
+- Include services section, and XCCDF description for selected ntpd's
+  sshd's service rules
+
 * Tue Nov 19 2013 Jan iankko Lieskovsky <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:jlieskov@redhat.com">&lt;jlieskov@redhat.com&gt;</a> 0.1.4.rc2-1
 - Include remediations for login.defs' based password minimum, maximum and
   warning age rules
<div class="moz-txt-sig">-- 
1.8.3.1

</div></pre>
      </div>
    </blockquote>
    <br>
    ack<br>
  </body>
</html>