• Stars
    star
    138
  • Rank 263,072 (Top 6 %)
  • Language
    Python
  • License
    Other
  • Created about 9 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DVD embedded Kickstart for RHEL 7 utilizing SCAP Security Guide (SSG) as a hardening script.
###############################################################################
# SCAP Security Guide RHEL 7 DVD CREATOR
#
# This script was written by Frank Caviggia, Red Hat Consulting
# Last update was 6 August 2017
# This script is NOT SUPPORTED by Red Hat Global Support Services.
#
# Author: Frank Caviggia ([email protected])
# Copyright: Red Hat, (c) 2015
# License: Apache License, Version 2.0
# Description: Kickstart Installation of RHEL 7 with SCAP Security Guide (SSG)
###############################################################################


ABOUT
=====

Modifies a RHEL 7.4+ x86_64 Workstation or Server DVD with a kickstart
that will install a system that is configured and hardened for
Red Hat Enterprise Linux 7. 

NOTE: ROOT ACCOUNT IS LOCKED WITH INSTALL USE 'admin' ACCOUNT WITH 'sudo' INSTEAD.

The kickstart script involves the integration of the following projects 
into a single installer:

   - classification-banner.py (Python for displaying a graphical classification banner)
   
        https://github.com/RedHatGov/classification-banner

   - SCAP Security Guide (SSG) Content - Benchmark and hardening scripts for the 
     system after installation
   
        https://github.com/OpenSCAP/scap-security-guide


CONTENT
=======

createiso.sh - installation script to modify RHEL 7.4+ ISO image

/config - Kickstarts, Python, and RPMs needed to modify image.

	EFI/BOOT/
	
		grub.cfg - Menu Configuration for UEFI boot
	
	isolinux/

		isolinux.cfg - Menu Configuration for Kickstart

	hardening/

		ssg-rhel.cfg
		
			Kickstart Configuration (Calls menu.py in %pre)
		
		menu.py
		
			Python Script that presents a graphical menu to modify the
			kickstart. Contains the "Profiles" for configuring the 
			system partitioning and packages.

		classification-banner.py
		
			Graphical Classification Banner (for GNOME Desktops User/
			Developer Workstation Profiles)

		openscap*.rpm
		scap-security-guide-*.el7.noarch.rpm

			Uses OpenSCAP and the SCAP Security Guide (SSG) to test and
			remediate system.

		ssg-suplemental.sh

			Additional system lockdowns (FIPS 140-2 Kernel Mode, GNOME,
			wheel group for root access, etc.)

		rhevm-preinstall.sh
		rhevm-postinstall.sh

			Scripts to loosen settings temporarily to allow registration
			of the system with RHEV-M by allowing root login and allowing
			exec in /tmp. Run rhevm-postinstall.sh after system is added
			into RHEV-M. Copied to /root after kickstart install

		iptables.sh (use with KVM host - which prefers iptables/ebtables)

			Configures iptables firewall during kickstart installation. 
			Called in menu.py script. Firewall is configured to recommended
			ports for each product or profile. Copied to /root after kickstart
			install. FirewallD is default except for KVM systems.

		ipa-pam-configuration.sh

			Configures system for using IPA/IdM authentication by
			overwriting the pam.d configurations. Copied to /root
			after kickstart installation
			
		usbguard-*.x86_64.rpm
		
			USB guard will control what USB devices are accessible by the system.

HARDENING INFORMATION
=====================

Here is some additional information added by the supplemental hardening script
in addition to the SSG:

1. The kernel option for  FIPS 140-2 mode is contained on the kickstart menu

2. Shell timeout (bash/csh) is 15 minutes of inactivity, vlock will lock CLI
   console

3. The 'wheel' group is required for privileged users (beyond root) to run 
   `su -` or `sudo -i` commands, sudo timeout is 5 minutes

4. The 'sshusers' group is required for SSH/SFTP access, other users are 
   limited to console access without this group
   
5. Additional Software such as McAfee EPo/HBSS may be required meet site 
   policy
   
6. Configure PTP or NTP for time synchronization (/etc/chrony.conf or /etc/ntp.conf)

7. Configure rsyslog to send logs to a centralized log monitoring. (/etc/rsyslog.conf)

8. Create users:

	NOTE: The root user is locked now - use 'admin' user account with sudo instead of root.

        Local Console Access Only (Unprivileged)
          
               # useradd -m -c "Local User" localuser
               
        Remote Access (Unprivileged)
          
               # useradd -m -c "Remote User" -G sshusers remoteuser
               
        System Administrator (SA) (Privileged User)
               
               # useradd -m -c "System Administrator" -G sshusers,wheel admin
               

9. Wireless  is disabled in a number of ways with Network Manager including:

	a.) `nmcli radio all off` command in /etc/rc.local
	b.) Dconf configurations to disable the creation of wireless networks:
	
		/etc/dconf/db/gdm.d/99-gnome-hardening
			[org.gnome.nm-applet]
			disable-wifi-create=true

		/etc/dconf/db/gdm.d/locks/99-gnome-hardening
			/org/gnome/nm-applet/disable-wifi-create
	
		/usr/share/glib-2.0/schemas/99_custom_settings.gschema.override
			[org.gnome.nm-applet]
			disable-wifi-create=true

   Generally, wireless should not be used on a DoD/IC system.

EXAMPLE
=======

# ./createiso.sh rhel-server-7.1-x86_64-dvd.iso 
Mounting RHEL DVD Image...
mount: /dev/loop0 is write-protected, mounting read-only
Done.
Copying RHEL DVD Image... Done.
Modifying RHEL DVD Image... Done.
Remastering RHEL DVD Image...
I: -input-charset not specified, using utf-8 (detected in locale settings)
Using RELEA000.HTM;1 for  /RELEASE-NOTES-ja-JP.html (RELEASE-NOTES-ta-IN.html)
	<..........................................>
Using POLIC003.RPM;1 for  ./Packages/policycoreutils-python-2.0.83-19.39.el6.x86_64.rpm (policycoreutils-newrole-2.0.83-19.39.el6.x86_64.rpm)
Size of boot image is 4 sectors -> No emulation
  0.27% done, estimate finish Tue Jan 21 22:04:41 2014
	<...........................................>
 99.86% done, estimate finish Tue Jan 21 22:06:46 2014
Total translation table size: 976326
Total rockridge attributes bytes: 430528
Total directory bytes: 661504
Path table size(bytes): 286
Max brk space used 3ee000
1882600 extents written (3676 MB)
Done.
Signing RHEL DVD Image...
Inserting md5sum into iso image...
md5 = ec4618f4ccc6ccac3cfed291ef341012
Inserting fragment md5sums into iso image...
fragmd5 = e115ca49531d6adfee6caadeaf6a895cdc4c3e8b9341f58f5e11e9113a79
frags = 20
Setting supported flag to 0
Done.
DVD Created. [ssg-rhel-7.1.iso]

More Repositories

1

redhatgov.github.io

RedHatGov website
HTML
133
star
2

rhel8-stig-latest

STIG for Red Hat Enterprise Linux 8
HTML
79
star
3

redhatgov.workshops

This is a collection of Ansible-deployed workshop environments. Use it in combination with the student workbook content, from the repo at https://github.com/RedHatGov/redhatgov.github.io
Python
65
star
4

service-mesh-workshop-dashboard

Materials for a workshop on OpenShift Service Mesh
Dockerfile
25
star
5

automated_workshops

automated, stackable workshops created with asciidoc and ansible
23
star
6

ssg-el6-kickstart

DVD embedded Kickstart for RHEL 6 utilizing SCAP Security Guide (SSG) as a hardening script.
Python
21
star
7

ansible-kvm-vm

Create a VM on a RHEL+KVM hypervisor.
17
star
8

hattrick

Project Hat Trick (currently refactoring from original repo at: https://github.com/redhat-kejones/hattrick)
Shell
16
star
9

service-mesh-workshop-code

πŸ“ A demo app to use in the Service Mesh workshop
JavaScript
15
star
10

devsecops-workshop-dashboard

Shell
15
star
11

ansible-role-800-53

11
star
12

ocp4-disconnected

Python
11
star
13

fips-compliant-vault

A FIPS compliant implementation of a password vault for Red Hat JBoss EAP
Java
11
star
14

ocdb

OpenControl Database
TypeScript
10
star
15

Ansible.Tower.Workshop

Python
9
star
16

terraform-packet-openshift

Resources and artifacts for OCP 4 UPI on Packet using Terraform
HCL
9
star
17

openshift4-mirror

Python
8
star
18

scap-disa-redhat-rpm

RPM spec files for creating RPMS containing DISA STIG content.
8
star
19

sonarqube-operator

Shell
7
star
20

MLS-Workbook

Red Hat Government hands-on workshop to explore MLS System Operation under RHEL6
Makefile
7
star
21

openshift-compliance

The OpenShift Compliance Guide
7
star
22

ansible-workshop

RedHatGov Ansible Workshop
CSS
6
star
23

fips-openjdk-rhel

Shell
6
star
24

ansible-infraops

Ansible playbooks for infrastructure operations
6
star
25

OpenShift-on-Azure

Documentation to deploy OpenShift v3 on Azure and Azure Government against FISMA controls
6
star
26

lunchbox

Project Lunchbox is a resource for deploying Red Hat technologies on a single server that literally fits in a lunchbox.
5
star
27

serverless-workshop-dashboard

Lab guides for a workshop on OpenShift Serverless (Knative)
Dockerfile
5
star
28

satellite-api-scripts

RHN Satellite API Scripts
Python
5
star
29

serverless-workshop-code

Code used in a workshop on OpenShift Serverless (Knative)
JavaScript
5
star
30

ansible-scan-jboss

module to scan for JBoss instances
Shell
5
star
31

ansible-kvm

Turn a regular RHEL 7 server into a RHEL+KVM hypervisor.
4
star
32

ansible-rhsm

This Ansible Role handles subscribing a RHEL system to the proper subscription
4
star
33

ansible-idm

This role provisions, installs, and configures RHEL Identity Manager (IdM).
4
star
34

sre-workshop-code

Code used in workshop for Site Reliability Engineering (SRE)
4
star
35

shadowbox

Documentation around the Shadowbox Hyper-portable Lab Environment
Python
4
star
36

cyclops

This code is for hosting our internal image build process
Shell
4
star
37

Provision_EC2_Instances

3
star
38

ingress-route-examples

Kubernetes manifests demonstrating the practical differences between using OpenShift Routes and Ingress resource types for exposing cluster traffic.
Dockerfile
3
star
39

gitea-operator

Shell
3
star
40

operator-catalog

Python
3
star
41

sre-workshop-dashboard

Lab guides for a workshop on Site Reliability Engineering (SRE)
Dockerfile
3
star
42

openshift4-deploy

Python
3
star
43

AWS-RedHatGov

Shell
3
star
44

Containers_Workshop

This is a Ansible playbook to create a workshop environment in AWS where students can log into their own RHEL 7.x instance and install and use docker. The only prerequisites are a AWS API Key with EC2 permissions, Terraform and Ansible installed on the local machine.
Python
3
star
45

rhosp-overcloud-stig

This repo will help get you started on producing a pre-hardened images. Its primarily designed for Openstack overcloud images, but will also work for generic RHEL based images
Shell
3
star
46

ansible-rhosp-director

Role to deploy Red Hat OpenStack Platform Director LTS
Shell
2
star
47

Ansible_Tower_Workshop

Python
2
star
48

ansible-vsphere

automation for vsphere/esxi
Jinja
2
star
49

OpenShift.AWS

2
star
50

rhmap-workshops

πŸ““ Try out the Red Hat Mobile Application Platform with these workshops
2
star
51

openshift4-c2s

OpenShift 4 Deployment for C2S and SC2S
Jinja
2
star
52

tower-doc

CSS
2
star
53

ansible-copy-local-pub-key

Copy the local SSH public key to authorized_keys file of target
2
star
54

devsecops-api-collection

Python
2
star
55

devsecops-workshop-code

HTML
2
star
56

quay-workshop

Shell
2
star
57

openshift-ansible-workshop

Full day OpenShift/Ansible interactive workshop
HTML
2
star
58

rolie

A Resource-Oriented Lightweight Information Exchange (ROLIE) protocol NIST
1
star
59

azure-cfme-tower

MS Azure CloudForms Tower Demo
1
star
60

DC17-Flask

HTML
1
star
61

gitea-image

Shell
1
star
62

ansible-tower

Role to deploy Ansible Tower on a single server
1
star
63

lunchbox-demos

Demos for the lunchbox
1
star
64

nexus-operator

Shell
1
star
65

OCP-App

Web app to showcase a simple Python Flask App.
HTML
1
star
66

devsecops-operator

Operator to deploy the Red Hat NAPS DevSecOps workshop
Jinja
1
star
67

hugo-docs-site

CSS
1
star
68

redhatgov.roles

Roles for the redhatgov.workshops
HTML
1
star
69

Instant-Demo

Project to deploy complete demo environments using Ansible playbooks
Shell
1
star
70

Dockerfile_fedora-postgres

Dockerfile_fedora-postgres
1
star
71

ansible-openstack-instance

Role to launch an instance on OpenStack
1
star
72

redhatgov.github

Red Hat Gov Documentation site
CSS
1
star