ZCSPM
CentOS Linux 7 OS Hardening Scripts for Azure Virtual Machines
ZCSPM offers bash scripts for hardening the CentOS 7 OS on your Microsoft Azure Virtual Machine. Make sure you test the scripts on a testing environment before running them on a production environment.
Hardening Script for ZCSPM supported Security Policies
Azure_CSBP_CentOS_Linux7_Remediation.sh: ZCSPM can remediate about 27 security policies to harden CentOS 7 on an Azure virtual machine.
To run the Zscaler-recommended hardening script:
- Make sure you are logged in to the virtual machine as a root user.
- Open the bash terminal and download the script from GitHub using the following command:
wget https://raw.githubusercontent.com/Cloudneeti/os-harderning-scripts/master/CentOS7/Azure_CSBP_CentOS_Linux7_Remediation.sh -O Azure_CSBP_CentOS_Linux7_Remediation.sh
- Switch to root using the following command:
sudo su
- Run the script using the following command:
bash Azure_CSBP_CentOS_Linux7_Remediation.sh
You can scan the relevant cloud account in the ZCSPM Admin Portal and view the security policy results.
Hardening script for CIS Compliance
CIS_CentOS_Linux7_Benchmark_v2_2_0_Remediation.sh: ZCSPM offers a more extensive script which remediates 142 out of 223 security policies for the CIS CentOS 7 Benchmark.
ZCSPM cannot remediate 81 security policies because either the appropriate APIs and commands are unavailable for automatic remediation, or they need user inputs and have to be manually remediated.
To run the CIS compliance hardening script:
- Make sure you are logged in to the virtual machine as a root user.
- Open the terminal and download the script from GitHub using the following command::
wget https://raw.githubusercontent.com/Cloudneeti/os-harderning-scripts/master/CentOS7/CIS_CentOS_Linux7_Benchmark_v2_2_0_Remediation.sh -O CIS_CentOS_Linux7_Benchmark_v2_2_0_Remediation.sh
- Switch to root using the following command::
sudo su
- Run the script using the following command:
bash CIS_CentOS_Linux7_Benchmark_v2_2_0_Remediation.sh