icon-zcspm.svg
ZCSPM

Ubuntu 18.04 OS Hardening Scripts for Azure Virtual Machines

ZCSPM offers bash scripts for hardening the Ubuntu 18.04 OS on your Azure virtual machines. 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_Ubuntu18_04_Remediation.sh: ZCSPM can remediate about 32 security policies to harden Ubuntu 18.04 OS on an Azure virtual machine.

  • Close

To run the ZCSPM recommended hardening script:

  1. Make sure you are logged in to the virtual machine as a root user.
  2. Open the bash terminal and download the script from GitHub using the following command:
wget https://raw.githubusercontent.com/Cloudneeti/os-harderning-scripts/master/Ubuntu18_04/Azure_CSBP_Ubuntu18_04_Remediation.sh -O Azure_CSBP_Ubuntu18_04_Remediation.sh
  1. Switch to root using the following command:
sudo su
  1. Run the script using the following command:
bash Azure_CSBP_Ubuntu18_04_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_Ubuntu18_04_Benchmark_v1_0_0_Remediation.sh: ZCSPM also offers a more extensive script which remediates 110 out of 189 security policies for the CIS Ubuntu 18.04 v1.0.0 Benchmark.

ZCSPM cannot remediate 79 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.

  • Close
  • Close

To run the CIS compliance hardening script:

  1. Make sure you are logged in to the virtual machine as a root user.
  2. Open the terminal and download the script from GitHub using the following command:
wget https://raw.githubusercontent.com/Cloudneeti/os-harderning-scripts/master/Ubuntu18_04/CIS_Ubuntu18_04_Benchmark_v1_0_0_Remediation.sh -O CIS_Ubuntu18_04_Benchmark_v1_0_0_Remediation.sh
  1. Switch to root using the following command:
sudo su
  1. Run the script using the following command:
bash CIS_Ubuntu18_04_Benchmark_v1_0_0_Remediation.sh
Related Articles
CentOS Linux 7 OS Hardening Scripts for Azure Virtual MachinesRed Hat Enterprise Linux 7 OS Hardening Scripts for AWS EC2 InstancesUbuntu 18.04 OS Hardening Scripts for Azure Virtual MachinesWindows Server 2019Windows Server 2016Windows Server 2012 R2