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