OS Hardening: 10 Best Practices

What is OS Hardening?

Operating system (OS) hardening, a type of system hardening, is the process of implementing security measures and patching for operating systems, such as Windows, Linux, or Apple OS X, with the objective of protecting sensitive computing systems. Hardening an operating system typically includes:

  • Following security best practices and ensuring secure configuration
  • Automatically updating the operating system with patches and service packs
  • Deploying additional security measures such as firewalls, endpoint protection systems, and operating system security extensions such as AppArmor for Linux.

10 Operating System Hardening Best Practices

Although each operating system has its own unique characteristics, there are several hardening practices common to all operating systems. Here are ten best practices that can help you enhance security for your operating systems.

OS Updates

  1. Service packs—keep programs up to date and install the latest version. No single action can protect against all attacks, especially against a zero-day attack, but using service packs dramatically reduces these risks
  2. Patch management—includes planning, testing, timely implementation, and continuously auditing, to ensure that operating systems and individual programs on client computers are always patched with the latest updates.

Secure Configuration

3. Clean programs—delete unnecessary and unused programs. Any program installed on your device should be evaluated regularly, as it is a potential entry point for malicious attackers. If software has not been approved or reviewed by the company, it should not be allowed. This technique can help you find and fix security holes and minimize risk.

4. Access control—use features that restrict access to files, networks, and other resources. Access control management features for users and groups are provided by all major operating systems, including Windows, Linux, and OS X. The default settings are usually less strict than needed, so you should configure access to apply the principle of least privilege, and provide access only to those who really need it, when they need it.

5. Group policies—assign users to groups, and define strict privileges for each group, to limit the damage that can be done by careless or malicious users. Continuously update the user policy, and communicate it to end users, to ensure they understand and comply with access privileges.

6. Security templates—use templates to manage and enforce security configurations in a centralized manner. Templates can be used to manage group policies and ensure consistency across the organization.

Additional Security Measures

7. Firewall configuration—not all operating systems have a firewall configured by default, and if a firewall is running—the firewall rules may not be strict enough. To ensure the firewall is running as needed, you should review and modify your firewall configuration. Ideally, you should set it to allow only traffic from known, approved IP addresses and ports. Unnecessary open ports represent a security risk.

8. Hardening frameworks—use frameworks like AppArmor and SELinux to add improved access control and protect against attacks like buffer overflow and code injection. These frameworks can automatically apply a large number of effective security best practices.

9. Endpoint protection—Windows comes with an advanced endpoint protection solution called Windows Defender. Beyond this solution, there is a selection of mature endpoint protection platforms (EPP) that provide several layers of protection for operating systems – including malware protection, email and social engineering protection, detection of malicious processes, and automated isolation of an OS in case of infection.

10. Data and workload isolation—ensure that sensitive databases or applications run in their own virtual machines or containers, to isolate them from other workloads and reduce the attack surface. Alternatively, you can isolate applications by restricting network access between different workloads. In this way, if attackers take control of one workload, they cannot get access to another.

OS hardening can help you reduce the risk of a successful cyber attack. However, to be truly effective, your OS hardening strategy should be implemented alongside a data backup process. This ensures that you have copies of your data and operational systems, and can use them to restore operations if failure occurs.

Beyond the Basics: Center for Internet Security (CIS) Benchmarks for OS Security

The Center of Internet Security (CIS) is a non-profit organization whose mission is to “identify, develop, validate, promote, and sustain best practice solutions for cyberdefense.” It is a collaborative effort by security and computing experts from governments, universities, and the private sector. The center develops security benchmarks and best practices with broad applicability, using a consensus model.

A CIS benchmark serves as a configuration baseline and also as a best practices for securely configurating systems. A benchmark consists of multiple recommendations, each consisting of one or more controls that can be implemented by organizations to improve security for a certain computing system. The recommendations and controls are mapped to compliance standards including ISO 27000, PCI DSS, HIPAA, NIST CSF, and NIST SP 800-53.

For operating systems, CIS provides a series of benchmarks that cover secure configuration, with a dedicated benchmark for all major versions of all popular operating systems – including Windows, Windows Server, OS X, and all common Linux distributions.

CIS also offers pre-configured and hardened OS images, which you can access via major cloud providers. Hardened images are pre-configured with security best practices, and greatly limit security vulnerabilities that may lead to network attacks.

The following are CIS benchmarks and hardened images for common operating systems:

Microsoft Windows Service

  • Security Benchmark Available For Versions: 2017 RTM, 2019 STIG, 2019, 2016 STIG, 2012 R2, 2012, 2008 R2, 2008, 2003
  • Hardened OS Image Available On: AWS, Azure, Google Cloud Platform, Oracle Cloud

Ubuntu Linux

  • Security Benchmark Available For Versions: 20.04 LTS, 18.04 LTS, 16.04 LTS, 14.04 LTS, 14.04 LTS Server, 12.04 LTS Server, 16.04 LTS
  • Hardened OS Image Available On: AWS, Azure, Google Cloud Platform, Oracle Cloud

Red Hat Enterprise Linux (RHEL)

  • Security Benchmark Available For Versions: 8, 7 STIG, 7, 6, 5
  • Hardened OS Image Available On: AWS, Azure, Google Cloud Platform

Apple OS X (MacOS)

  • Security Benchmark Available For Versions: 11.0, 10.15, 10.14, 10.13, 10.12, 10.9, 10.8, 10.12, 10.11, 10.10
  • Hardened OS Images: N/A

To access the CIS benchmarks and hardened OS images:

  • CIS benchmarks are here (filter by Operating Systems)
  • CIS hardened OS images are here

Learn more in our detailed guides about:

  • OS security (coming soon)
  • Windows hardening (coming soon)

OS Hardening with Hysolate

Hysolate is a full OS isolation solution for Windows 10, splitting your endpoint into a more secure corporate zone and a less secure zone for daily tasks. This means that one OS can be reserved for corporate access, with strict networking and security policies, and the other can be a more open zone for accessing untrusted websites and applications.

Admins can harden the Workspace OS by choosing which applications can be used, and they can remotely deploy applications, as well as deploy patches and security updates from the cloud. Policies can be set for transferring between Workspace and the host OS, including copy/paste, keylogging, screenshotting etc. Unlike traditional browser isolation solutions, Hysolate isolates your whole OS, including websites, files, documents, applications and even peripherals like USBs and printers.

For users, the Hysolate Workspace mimics their native Windows experience, and with minimal lag and latency issues, and users can easily switch between the different operating systems with a press of a button.

Try Hysolate Free here, a free isolation solution for Windows 10.