Blame SOURCES/scap-security-guide-0.1.49-add-stig-kickstart.patch

54c0d5
From 3d061cb6cb61ef8dc7bccc873bf338041687842e Mon Sep 17 00:00:00 2001
54c0d5
From: Watson Sato <wsato@redhat.com>
54c0d5
Date: Mon, 3 Feb 2020 21:23:59 +0100
54c0d5
Subject: [PATCH] Add Kickstart file for STIG profile
54c0d5
54c0d5
Based on OSPP KS
54c0d5
---
54c0d5
 rhel8/kickstart/ssg-rhel8-stig-ks.cfg | 167 ++++++++++++++++++++++++++
54c0d5
 1 file changed, 167 insertions(+)
54c0d5
 create mode 100644 rhel8/kickstart/ssg-rhel8-stig-ks.cfg
54c0d5
54c0d5
diff --git a/rhel8/kickstart/ssg-rhel8-stig-ks.cfg b/rhel8/kickstart/ssg-rhel8-stig-ks.cfg
54c0d5
new file mode 100644
54c0d5
index 0000000000..8c970dd6ff
54c0d5
--- /dev/null
54c0d5
+++ b/rhel8/kickstart/ssg-rhel8-stig-ks.cfg
54c0d5
@@ -0,0 +1,167 @@
54c0d5
+# SCAP Security Guide STIG profile kickstart for Red Hat Enterprise Linux 8
54c0d5
+#
54c0d5
+# Based on:
54c0d5
+# http://fedoraproject.org/wiki/Anaconda/Kickstart
54c0d5
+# http://usgcb.nist.gov/usgcb/content/configuration/workstation-ks.cfg
54c0d5
+
54c0d5
+# Install a fresh new system (optional)
54c0d5
+install
54c0d5
+
54c0d5
+# Specify installation method to use for installation
54c0d5
+# To use a different one comment out the 'url' one below, update
54c0d5
+# the selected choice with proper options & un-comment it
54c0d5
+#
54c0d5
+# Install from an installation tree on a remote server via FTP or HTTP:
54c0d5
+# --url		the URL to install from
54c0d5
+#
54c0d5
+# Example:
54c0d5
+#
54c0d5
+# url --url=http://192.168.122.1/image
54c0d5
+#
54c0d5
+# Modify concrete URL in the above example appropriately to reflect the actual
54c0d5
+# environment machine is to be installed in
54c0d5
+#
54c0d5
+# Other possible / supported installation methods:
54c0d5
+# * install from the first CD-ROM/DVD drive on the system:
54c0d5
+#
54c0d5
+# cdrom
54c0d5
+#
54c0d5
+# * install from a directory of ISO images on a local drive:
54c0d5
+#
54c0d5
+# harddrive --partition=hdb2 --dir=/tmp/install-tree
54c0d5
+#
54c0d5
+# * install from provided NFS server:
54c0d5
+#
54c0d5
+# nfs --server=<hostname> --dir=<directory> [--opts=<nfs options>]
54c0d5
+#
54c0d5
+# Set language to use during installation and the default language to use on the installed system (required)
54c0d5
+lang en_US.UTF-8
54c0d5
+
54c0d5
+# Set system keyboard type / layout (required)
54c0d5
+keyboard us
54c0d5
+
54c0d5
+# Configure network information for target system and activate network devices in the installer environment (optional)
54c0d5
+# --onboot	enable device at a boot time
54c0d5
+# --device	device to be activated and / or configured with the network command
54c0d5
+# --bootproto	method to obtain networking configuration for device (default dhcp)
54c0d5
+# --noipv6	disable IPv6 on this device
54c0d5
+#
54c0d5
+# NOTE: Usage of DHCP will fail CCE-27021-5 (DISA FSO RHEL-06-000292). To use static IP configuration,
54c0d5
+#       "--bootproto=static" must be used. For example:
54c0d5
+# network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver 192.168.2.1,192.168.3.1
54c0d5
+#
54c0d5
+network --onboot yes --bootproto dhcp
54c0d5
+
54c0d5
+# Set the system's root password (required)
54c0d5
+# Plaintext password is: server
54c0d5
+# Refer to e.g.
54c0d5
+#   https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw
54c0d5
+# to see how to create encrypted password form for different plaintext password
54c0d5
+rootpw --iscrypted $6$0WWGZ1e6icT$1KiHZK.Nzp3HQerfiy8Ic3pOeCWeIzA.zkQ7mkvYT3bNC5UeGK2ceE5b6TkSg4D/kiSudkT04QlSKknsrNE220
54c0d5
+
54c0d5
+# The selected profile will restrict root login
54c0d5
+# Add a user that can login and escalate privileges
54c0d5
+# Plaintext password is: admin123
54c0d5
+user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted
54c0d5
+
54c0d5
+# Configure firewall settings for the system (optional)
54c0d5
+# --enabled	reject incoming connections that are not in response to outbound requests
54c0d5
+# --ssh		allow sshd service through the firewall
54c0d5
+firewall --enabled --ssh
54c0d5
+
54c0d5
+# Set up the authentication options for the system (required)
54c0d5
+# --enableshadow	enable shadowed passwords by default
54c0d5
+# --passalgo		hash / crypt algorithm for new passwords
54c0d5
+# See the manual page for authconfig for a complete list of possible options.
54c0d5
+authconfig --enableshadow --passalgo=sha512
54c0d5
+
54c0d5
+# State of SELinux on the installed system (optional)
54c0d5
+# Defaults to enforcing
54c0d5
+selinux --enforcing
54c0d5
+
54c0d5
+# Set the system time zone (required)
54c0d5
+timezone --utc America/New_York
54c0d5
+
54c0d5
+# Specify how the bootloader should be installed (required)
54c0d5
+# Refer to e.g.
54c0d5
+#   https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw
54c0d5
+# to see how to create encrypted password form for different plaintext password
54c0d5
+bootloader --location=mbr --append="audit=1 audit_backlog_limit=8192 slub_debug=P page_poison=1 vsyscall=none"
54c0d5
+
54c0d5
+# Initialize (format) all disks (optional)
54c0d5
+zerombr
54c0d5
+
54c0d5
+# The following partition layout scheme assumes disk of size 20GB or larger
54c0d5
+# Modify size of partitions appropriately to reflect actual machine's hardware
54c0d5
+# 
54c0d5
+# Remove Linux partitions from the system prior to creating new ones (optional)
54c0d5
+# --linux	erase all Linux partitions
54c0d5
+# --initlabel	initialize the disk label to the default based on the underlying architecture
54c0d5
+clearpart --linux --initlabel
54c0d5
+
54c0d5
+# Create primary system partitions (required for installs)
54c0d5
+part /boot --fstype=xfs --size=512
54c0d5
+part pv.01 --grow --size=1
54c0d5
+
54c0d5
+# Create a Logical Volume Management (LVM) group (optional)
54c0d5
+volgroup VolGroup --pesize=4096 pv.01
54c0d5
+
54c0d5
+# Create particular logical volumes (optional)
54c0d5
+logvol / --fstype=xfs --name=root --vgname=VolGroup --size=11264 --grow
54c0d5
+# Ensure /home Located On Separate Partition
54c0d5
+logvol /home --fstype=xfs --name=home --vgname=VolGroup --size=1024 --fsoptions="nodev"
54c0d5
+# Ensure /tmp Located On Separate Partition
54c0d5
+logvol /tmp --fstype=xfs --name=tmp --vgname=VolGroup --size=1024 --fsoptions="nodev,nosuid,noexec"
54c0d5
+# Ensure /var/tmp Located On Separate Partition
54c0d5
+logvol /var/tmp --fstype=xfs --name=vartmp --vgname=VolGroup --size=1024 --fsoptions="nodev,nosuid,noexec"
54c0d5
+# Ensure /var Located On Separate Partition
54c0d5
+logvol /var --fstype=xfs --name=var --vgname=VolGroup --size=2048 --fsoptions="nodev"
54c0d5
+# Ensure /var/log Located On Separate Partition
54c0d5
+logvol /var/log --fstype=xfs --name=log --vgname=VolGroup --size=1024 --fsoptions="nodev,nosuid,noexec"
54c0d5
+# Ensure /var/log/audit Located On Separate Partition
54c0d5
+logvol /var/log/audit --fstype=xfs --name=audit --vgname=VolGroup --size=512 --fsoptions="nodev,nosuid,noexec"
54c0d5
+logvol swap --name=swap --vgname=VolGroup --size=2016
54c0d5
+
54c0d5
+# The OpenSCAP installer add-on is used to apply SCAP (Security Content Automation Protocol)
54c0d5
+# content - security policies - on the installed system.This add-on has been enabled by default
54c0d5
+# since Red Hat Enterprise Linux 7.2. When enabled, the packages necessary to provide this 
54c0d5
+# functionality will automatically be installed. However, by default, no policies are enforced,
54c0d5
+# meaning that no checks are performed during or after installation unless specifically configured.
54c0d5
+#  
54c0d5
+#  Important
54c0d5
+#   Applying a security policy is not necessary on all systems. This screen should only be used
54c0d5
+#   when a specific policy is mandated by your organization rules or government regulations.
54c0d5
+#   Unlike most other commands, this add-on does not accept regular options, but uses key-value
54c0d5
+#   pairs in the body of the %addon definition instead. These pairs are whitespace-agnostic.
54c0d5
+#   Values can be optionally enclosed in single quotes (') or double quotes (").
54c0d5
+#   
54c0d5
+#  The following keys are recognized by the add-on:
54c0d5
+#    content-type - Type of the security content. Possible values are datastream, archive, rpm, and scap-security-guide.
54c0d5
+#      - If the content-type is scap-security-guide, the add-on will use content provided by the
54c0d5
+#        scap-security-guide package, which is present on the boot media. This means that all other keys except profile will have no effect.
54c0d5
+#    content-url - Location of the security content. The content must be accessible using HTTP, HTTPS, or FTP; local storage is currently not supported. A network connection must be available to reach content definitions in a remote location.
54c0d5
+#    datastream-id - ID of the data stream referenced in the content-url value. Used only if content-type is datastream.
54c0d5
+#    xccdf-id - ID of the benchmark you want to use.
54c0d5
+#    xccdf-path - Path to the XCCDF file which should be used; given as a relative path in the archive.
54c0d5
+#    profile - ID of the profile to be applied. Use default to apply the default profile.
54c0d5
+#    fingerprint - A MD5, SHA1 or SHA2 checksum of the content referenced by content-url.
54c0d5
+#    tailoring-path - Path to a tailoring file which should be used, given as a relative path in the archive.
54c0d5
+#
54c0d5
+#  The following is an example %addon org_fedora_oscap section which uses content from the
54c0d5
+#  scap-security-guide on the installation media: 
54c0d5
+%addon org_fedora_oscap
54c0d5
+	content-type = scap-security-guide
54c0d5
+	profile = xccdf_org.ssgproject.content_profile_stig
54c0d5
+%end
54c0d5
+
54c0d5
+# Packages selection (%packages section is required)
54c0d5
+%packages
54c0d5
+
54c0d5
+# Require @Base
54c0d5
+@Base
54c0d5
+
54c0d5
+%end # End of %packages section
54c0d5
+
54c0d5
+# Reboot after the installation is complete (optional)
54c0d5
+# --eject	attempt to eject CD or DVD media before rebooting
54c0d5
+reboot --eject