Merge pull request #25 from Samson-W/master

Delete unimplemented items: 8.2.3 8.3.3 8.6 9.4
This commit is contained in:
Samson.W 2021-06-24 01:43:58 +08:00 committed by GitHub
commit 0124084e0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 7 additions and 238 deletions

View File

@ -1,65 +0,0 @@
#!/bin/bash
#
# harbian-audit for Debian GNU/Linux 7/8/9 Hardening
#
#
# 8.2.3 Configure /etc/rsyslog.conf (Not Scored)
# Author : Samson wen, Samson <sccxboy@gmail.com>
#
set -e # One error, it's over
set -u # One variable unset, it's over
HARDENING_LEVEL=3
SERVICE_NAME="rsyslog"
PACKAGE_NG='syslog-ng'
# This function will be called if the script status is on enabled / audit mode
audit () {
is_pkg_installed $PACKAGE_NG
if [ $FNRET = 0 ]; then
ok "$PACKAGE_NG has installed, so pass."
FNRET=0
else
info "Ensure default and local facilities are preserved on the system"
info "No measure here, please review the file by yourself"
fi
}
# This function will be called if the script status is on enabled mode
apply () {
is_pkg_installed $PACKAGE_NG
if [ $FNRET = 0 ]; then
ok "$PACKAGE_NG has installed, so pass."
FNRET=0
else
info "Ensure default and local facilities are preserved on the system"
info "No measure here, please review the file by yourself"
fi
}
# This function will check config parameters required
check_config() {
:
}
# Source Root Dir Parameter
if [ -r /etc/default/cis-hardening ]; then
. /etc/default/cis-hardening
fi
if [ -z "$CIS_ROOT_DIR" ]; then
echo "There is no /etc/default/cis-hardening file nor cis-hardening directory in current environment."
echo "Cannot source CIS_ROOT_DIR variable, aborting."
exit 128
fi
# Main function, will call the proper functions given the configuration (audit, enabled, disabled)
if [ -r $CIS_ROOT_DIR/lib/main.sh ]; then
. $CIS_ROOT_DIR/lib/main.sh
else
echo "Cannot find main.sh, have you correctly defined your root directory? Current value is $CIS_ROOT_DIR in /etc/default/cis-hardening"
exit 128
fi

View File

@ -5,7 +5,7 @@
#
#
# 8.2.4 Create and Set Permissions on rsyslog Log Files by conf file (Scored)
# 8.2.3 Create and Set Permissions on rsyslog Log Files by conf file (Scored)
# Author : Samson wen, Samson <sccxboy@gmail.com>
#

View File

@ -5,7 +5,7 @@
#
#
# 8.2.5 Configure rsyslog to Send Logs to a Remote Log Host (Scored)
# 8.2.4 Configure rsyslog to Send Logs to a Remote Log Host (Scored)
# Author : Samson wen, Samson <sccxboy@gmail.com>
#

View File

@ -1,63 +0,0 @@
#!/bin/bash
#
# harbian-audit for Debian GNU/Linux 7/8/9 Hardening
#
#
# 8.3.3 Configure /etc/syslog-ng/syslog-ng.conf (Not Scored)
#
set -e # One error, it's over
set -u # One variable unset, it's over
HARDENING_LEVEL=3
SERVICE_NAME="syslog-ng"
PACKAGE_R='rsyslog'
# This function will be called if the script status is on enabled / audit mode
audit () {
is_pkg_installed $PACKAGE_R
if [ $FNRET = 0 ]; then
ok "$PACKAGE_R has installed, so pass."
FNRET=0
else
info "Ensure default and local facilities are preserved on the system"
info "No measure here, please review the file by yourself"
fi
}
# This function will be called if the script status is on enabled mode
apply () {
is_pkg_installed $PACKAGE_R
if [ $FNRET = 0 ]; then
ok "$PACKAGE_R has installed, so pass."
else
info "Ensure default and local facilities are preserved on the system"
info "No measure here, please review the file by yourself"
fi
}
# This function will check config parameters required
check_config() {
:
}
# Source Root Dir Parameter
if [ -r /etc/default/cis-hardening ]; then
. /etc/default/cis-hardening
fi
if [ -z "$CIS_ROOT_DIR" ]; then
echo "There is no /etc/default/cis-hardening file nor cis-hardening directory in current environment."
echo "Cannot source CIS_ROOT_DIR variable, aborting."
exit 128
fi
# Main function, will call the proper functions given the configuration (audit, enabled, disabled)
if [ -r $CIS_ROOT_DIR/lib/main.sh ]; then
. $CIS_ROOT_DIR/lib/main.sh
else
echo "Cannot find main.sh, have you correctly defined your root directory? Current value is $CIS_ROOT_DIR in /etc/default/cis-hardening"
exit 128
fi

View File

@ -5,7 +5,7 @@
#
#
# 8.3.4 Create and Set Permissions on syslog-ng Log Files (Scored)
# 8.3.3 Create and Set Permissions on syslog-ng Log Files (Scored)
#
set -e # One error, it's over

View File

@ -5,7 +5,7 @@
#
#
# 8.3.5 Configure syslog-ng to Send Logs to a Remote Log Host (Not Scored)
# 8.3.4 Configure syslog-ng to Send Logs to a Remote Log Host (Not Scored)
#
set -e # One error, it's over

View File

@ -5,7 +5,7 @@
#
#
# 8.3.6 Accept Remote rsyslog Messages Only on Designated Log Hosts (Not Scored)
# 8.3.5 Accept Remote rsyslog Messages Only on Designated Log Hosts (Not Scored)
#
set -e # One error, it's over

View File

@ -1,52 +0,0 @@
#!/bin/bash
#
# harbian-audit for Debian GNU/Linux 7/8/9 Hardening
#
#
# 8.6 Configure logrotate (Not Scored)
# todo delete this or ...
#
set -e # One error, it's over
set -u # One variable unset, it's over
HARDENING_LEVEL=3
SERVICE_NAME="syslog-ng"
# This function will be called if the script status is on enabled / audit mode
audit () {
info "Ensure logs are properly rotated (especially syslog-ng)"
info "No measure here, please review the files by yourself"
}
# This function will be called if the script status is on enabled mode
apply () {
info "Ensure logs are properly rotated (especially syslog-ng)"
info "No measure here, please review the file by yourself"
}
# This function will check config parameters required
check_config() {
:
}
# Source Root Dir Parameter
if [ -r /etc/default/cis-hardening ]; then
. /etc/default/cis-hardening
fi
if [ -z "$CIS_ROOT_DIR" ]; then
echo "There is no /etc/default/cis-hardening file nor cis-hardening directory in current environment."
echo "Cannot source CIS_ROOT_DIR variable, aborting."
exit 128
fi
# Main function, will call the proper functions given the configuration (audit, enabled, disabled)
if [ -r $CIS_ROOT_DIR/lib/main.sh ]; then
. $CIS_ROOT_DIR/lib/main.sh
else
echo "Cannot find main.sh, have you correctly defined your root directory? Current value is $CIS_ROOT_DIR in /etc/default/cis-hardening"
exit 128
fi

View File

@ -4,7 +4,7 @@
# harbian-audit for Debian GNU/Linux 7/8/9/10 or CentOS Hardening
#
#
# 8.7 Verifies integrity all packages (Scored)
# 8.6 Verifies integrity all packages (Scored)
# Author : Samson wen, Samson <sccxboy@gmail.com>
#

View File

@ -5,7 +5,7 @@
#
#
# 9.5 Restrict Access to the su Command (Scored)
# 9.4 Restrict Access to the su Command (Scored)
#
set -e # One error, it's over

View File

@ -1,51 +0,0 @@
#!/bin/bash
#
# harbian-audit for Debian GNU/Linux 7/8/9 Hardening
#
#
# 9.4 Restrict root Login to System Console (Not Scored)
#
set -e # One error, it's over
set -u # One variable unset, it's over
HARDENING_LEVEL=3
FILE='/etc/securetty'
# This function will be called if the script status is on enabled / audit mode
audit () {
info "Remove terminal entries in $FILE for any consoles that are not in a physically secure location."
info "No measure here, please review the file by yourself"
}
# This function will be called if the script status is on enabled mode
apply () {
info "Remove terminal entries in $FILE for any consoles that are not in a physically secure location."
info "No measure here, please review the file by yourself"
}
# This function will check config parameters required
check_config() {
:
}
# Source Root Dir Parameter
if [ -r /etc/default/cis-hardening ]; then
. /etc/default/cis-hardening
fi
if [ -z "$CIS_ROOT_DIR" ]; then
echo "There is no /etc/default/cis-hardening file nor cis-hardening directory in current environment."
echo "Cannot source CIS_ROOT_DIR variable, aborting."
exit 128
fi
# Main function, will call the proper functions given the configuration (audit, enabled, disabled)
if [ -r $CIS_ROOT_DIR/lib/main.sh ]; then
. $CIS_ROOT_DIR/lib/main.sh
else
echo "Cannot find main.sh, have you correctly defined your root directory? Current value is $CIS_ROOT_DIR in /etc/default/cis-hardening"
exit 128
fi