-
Notifications
You must be signed in to change notification settings - Fork 0
/
RHEL-06-000011.sh
executable file
·87 lines (77 loc) · 2.96 KB
/
RHEL-06-000011.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
#
##########################################################################
#Red Hat Enterprise Linux 6 - DISA STIG Compliance Remediation Content
#Copyright (C) 2013
#Vincent C. Passaro ([email protected])
#
##########################################################################
#
###################### Buddha Labs LLC ################################
# By Vincent C. Passaro #
# Buddha Labs LLC. #
# vince[@]buddhalabs[.]com #
# www.buddhalabs.com #
###################### Buddha Labs LLC ################################
#_________________________________________________________________________
# Version | Change Information | Author | Date
#-------------------------------------------------------------------------
# 1.0 | Initial Script Creation | Vincent Passaro | 1-JUNE-2013
#
#
#######################DISA INFORMATION##################################
# Group ID (Vulid): RHEL-06-000011
# Group Title: SRG-OS-000191
#
# Rule ID: RHEL-06-000011_rule
# Severity: medium
# Rule Version (STIG-ID): RHEL-06-000011
# Rule Title: System security patches and updates must be installed and
# up-to-date.
#
# Vulnerability Discussion: Installing software updates is a fundamental
# mitigation against the exploitation of publicly-known vulnerabilities.
#
# Responsibility:
# IAControls:
#
# Check Content:
#
# If the system is joined to the Red Hat Network, a Red Hat Satellite
# Server, or a yum server which provides updates, invoking the following
# command will indicate if updates are available:
# yum check-update
# If the system is not configured to update from one of these sources, run
# the following command to list when each package was last updated:
# $ rpm -qa -last
# Compare this to Red Hat Security Advisories (RHSA) listed at
# https://access.redhat.com/security/updates/active/ to determine whether
# the system is missing applicable security and bugfix updates.
# If updates are not installed, this is a finding.
#
# Fix Text:
#
# If the system is joined to the Red Hat Network, a Red Hat Satellite
# Server, or a yum server, run the following command to install updates:
# yum update
# If the system is not configured to use one of these sources, updates (in
# the form of RPM packages) can be manually downloaded from the Red Hat
# Network and installed using "rpm".
#######################DISA INFORMATION##################################
#
# Global Variables
PDI=RHEL-06-000011
SEVERITY=medium
#
#BEGIN_CHECK
. ./aqueduct_functions
yum check-update >/dev/null 2>&1
if [ $? -gt 0 ]; then
show_message $PDI "updates available" $SEVERITY
else
show_message $PDI "updates available" pass
fi
#END_CHECK
#BEGIN_REMEDY
yum -y update
#END_REMEDY