Skip to Content
← Back to Articles

Endpoint Security: Hardening Windows and Linux Systems

Your perimeter defenses mean nothing when an attacker is already living inside a compromised endpoint. In 2024, endpoints remain the number one initial access vector in enterprise breaches—and most of them fall not because of zero-days, but because of misconfigurations, excessive privileges, and default settings that never got changed. This post walks through the hardening techniques that actually move the needle.



Why Endpoint Hardening Still Matters

Endpoint Detection and Response (EDR) tools are essential, but they are reactive by design. Hardening is proactive—it eliminates attack surface before an adversary ever touches the system. A well-hardened endpoint forces attackers to be louder, slower, and more detectable. Think of hardening as the foundation that makes every other security control more effective.

Windows Hardening: Key Actions

1. Reduce the Attack Surface with ASR Rules

Microsoft's Attack Surface Reduction (ASR) rules block common malware behaviors at the OS level. Enable them via Group Policy or Intune:

# Enable ASR rule: Block credential stealing from LSASS
Set-MpPreference -AttackSurfaceReductionRules_Ids 9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2 -AttackSurfaceReductionRules_Actions Enabled

Start in audit mode (AuditMode instead of Enabled) to evaluate impact before enforcing across production.

2. Enforce Least Privilege

Remove standard users from the local Administrators group. Use Local Administrator Password Solution (LAPS) to rotate local admin passwords automatically:

# Verify LAPS is deployed and passwords are rotating
Get-AdmPwdPassword -ComputerName "WORKSTATION01" | Select-Object Password, ExpirationTimestamp

3. Harden SMB and Disable Legacy Protocols

SMBv1 is a known exploitation vector (WannaCry, EternalBlue). Disable it enterprise-wide:

Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol -NoRestart

Also disable LLMNR and NetBIOS Name Service via Group Policy to prevent poisoning attacks that tools like Responder exploit daily on internal networks.

4. Enable Credential Guard and Secure Boot

Credential Guard uses virtualization-based security to isolate LSASS, making credential dumping with Mimikatz significantly harder. Enforce it through Group Policy under Device Guard > Turn On Virtualization Based Security.

Linux Hardening: Key Actions

1. Minimize Installed Packages

Every installed service is a potential vulnerability. Audit and strip unnecessary packages:

# RHEL/CentOS: List installed packages and remove what's unnecessary
dnf list installed | grep -i telnet
dnf remove telnet-server -y

2. Enforce SSH Security

SSH is the front door to every Linux server. Lock it down in /etc/ssh/sshd_config:

PermitRootLogin no
PasswordAuthentication no
MaxAuthTries 3
AllowUsers deploy_admin secops_user
Protocol 2

Reload with systemctl reload sshd. Key-based authentication should be the only option in any enterprise environment.

3. Apply Mandatory Access Controls

SELinux (RHEL) or AppArmor (Ubuntu) confine processes to the minimum permissions they need. Never disable them—tune them:

# Check SELinux status and set to enforcing
getenforce
sudo setenforce 1
# Make persistent
sudo sed -i 's/SELINUX=permissive/SELINUX=enforcing/' /etc/selinux/config

4. Audit and Monitor with auditd

Configure the Linux audit daemon to track privilege escalation attempts and sensitive file access:

# /etc/audit/rules.d/hardening.rules
-w /etc/shadow -p wa -k shadow_access
-w /etc/sudoers -p wa -k sudoers_change
-a always,exit -F arch=b64 -S execve -F euid=0 -k root_commands

Establish a Baseline with CIS Benchmarks

Both Windows and Linux have free CIS Benchmarks that provide auditable, consensus-driven hardening standards. Use tools like CIS-CAT, OpenSCAP, or Microsoft Security Compliance Toolkit to scan systems against these baselines and track drift over time. Automate scans in your CI/CD pipeline or configuration management tool (Ansible, SCCM, Intune) so hardening is not a one-time event but a continuous guarantee.

Final Thought

Hardening is not glamorous work, but it is among the highest-ROI activities a security team can perform. Every disabled legacy protocol, every removed local admin right, and every enforced access control is one fewer door an attacker can walk through. Start with CIS Level 1 benchmarks, automate compliance checks, and iterate. The goal is not a perfect system—it is a system that is expensive and noisy to compromise.


Have questions about endpoint security: hardening windows and linux systems? I'm always happy to talk shop — reach out or connect with me on LinkedIn.

← Back to Articles