Endpoint Security and Device Hardening
Protect laptops, phones and servers: why endpoints are the main target, antivirus versus EDR, disk encryption, patching, application control, least privilege and local admin rights, secure baselines (CIS, Microsoft), mobile device management, BYOD, USB and removable media, and secure configuration for Windows and Linux.
Why endpoints matter
An endpoint is any device that connects to your network or data: laptops, desktops, phones, tablets, servers, virtual machines, containers and IoT devices. Endpoints are where people read email, click links, plug in USB sticks and run software, so they are where most attacks land and where malware executes. The network perimeter no longer protects them: staff work from home, cafés and airports, and data lives in the cloud. Protecting each device is therefore central to modern security.
Layers of endpoint protection
| Layer | Purpose |
|---|---|
| Patching | Remove known vulnerabilities in the operating system and applications |
| Secure configuration (hardening) | Reduce attack surface; disable what is not needed |
| Least privilege | No everyday admin rights; limit what malware can do |
| Anti-malware / EDR | Detect and stop malicious code and behaviour |
| Application control | Run only approved software |
| Encryption | Protect data if the device is lost or stolen |
| Host firewall | Block unwanted inbound and outbound connections |
| Management (MDM/endpoint management) | Enforce policy, inventory, remote lock and wipe |
| Logging and monitoring | Visibility for detection and investigation |
| User awareness | Fewer risky clicks |
Antivirus, EDR and XDR
Traditional antivirus (AV) compares files against signatures of known malware. It still stops a lot of common threats, but attackers easily change files to evade signatures and increasingly use fileless techniques and legitimate tools (“living off the land”: PowerShell, WMI, PsExec) that signatures cannot catch.
Next-generation AV and EDR go further:
- Continuous telemetry: process creation, command lines, network connections, file and registry changes, logons.
- Behavioural detection: “Word spawned PowerShell, which downloaded a file and created a scheduled task” is suspicious even if no file is known bad.
- Investigation: search all endpoints for an indicator, view a process tree and a timeline.
- Response: isolate a host from the network, kill a process, quarantine a file, collect forensic data, roll back some ransomware changes.
- Often with 24/7 managed service (MDR) behind it.
XDR extends the same idea across email, identity, cloud and network telemetry.
Practical points: deploy on every device including servers; keep it updated and tamper-protected (so malware cannot disable it); watch for gaps (machines with the agent stopped); and tune exclusions carefully, because broad exclusions are favourite hiding places for attackers. Built-in tools (Microsoft Defender for Endpoint) are strong and often already licensed.
Keep software patched
Most successful endpoint attacks use known flaws. Enable automatic updates for the operating system, browsers and common applications (PDF readers, Office, Java, remote-access tools). For managed fleets use Windows Update for Business, Intune, WSUS/Configuration Manager, Jamf (macOS), or unattended-upgrades and configuration management on Linux. Track end-of-life systems (for example Windows versions out of support) and replace them. See the vulnerability management lesson.
Least privilege on the endpoint
- No local administrator rights for everyday users. Standard accounts mean malware cannot install drivers, disable security tools or change system settings so easily.
- Separate admin accounts for IT staff, used only for administrative tasks, never for email or browsing.
- Just-in-time elevation and privileged access workstations for sensitive admin work.
- Unique local administrator passwords on each machine, managed automatically (Microsoft LAPS), so one stolen password does not unlock every PC.
- Restrict who can log on where (tiered administration), so domain admin credentials never touch ordinary workstations.
- Limit macro and script execution: block macros from the internet, constrain PowerShell (constrained language mode, script block logging), and block risky file types in email.
Application control
Instead of trying to recognise every bad program, define the good ones:
- Allow-listing (Windows AppLocker and App Control for Business, macOS configuration profiles, Linux AppArmor/SELinux) lets only approved applications run.
- Start with block rules for user-writable locations (Downloads, Temp, AppData) where malware executes, and move to full allow-listing for high-risk systems such as servers and kiosks.
- Maintain a process for requesting new software, or users will route around the control.
- Keep to trusted app stores and software signed by known publishers, and block unapproved remote-access and file-sharing tools.
Encryption
- Full-disk encryption protects data at rest: BitLocker (Windows), FileVault (macOS), LUKS/dm-crypt (Linux). Use it on every laptop and phone, ideally with a TPM and a PIN or strong sign-in, and store recovery keys safely in your directory or MDM.
- Encrypt removable media and require it for data that must leave the building.
- Mobile devices: require a passcode, enable built-in encryption (on by default on modern phones when a passcode is set) and remote wipe.
- Encryption protects against loss and theft, not against malware running on an unlocked machine.
Secure baselines and hardening
A baseline is a documented, tested secure configuration that every device of a type receives. Sources: CIS Benchmarks (Windows, macOS, Linux, browsers, cloud), Microsoft Security Baselines and the DISA STIGs. Typical hardening steps:
Windows
- Enable and configure the host firewall; remove or disable unneeded features and services (SMBv1, legacy protocols, Remote Registry, unused roles).
- Enforce account policies, MFA, and Credential Guard where supported; disable NTLM where possible.
- Turn on audit policies and PowerShell logging; deploy Sysmon if you need richer telemetry.
- Enable Secure Boot, TPM, BitLocker, SmartScreen and attack surface reduction (ASR) rules.
- Remove unnecessary local accounts; rename or disable the built-in Administrator; use LAPS.
Linux
- Install only required packages; disable unused services; keep it patched.
- Harden SSH (no root login, key authentication, as in the Linux course), use a host firewall (ufw/nftables) and SELinux or AppArmor.
- Set secure mount options (
noexec,nosuidon/tmp), restrictsudo, enable auditd and central logging, and configure file integrity monitoring. - Use CIS-hardened images or configuration management (Ansible) to apply and re-apply the baseline.
Both: standard gold images, automated build pipelines, and drift detection: scan for deviations from the baseline and fix them.
Mobile devices, BYOD and remote work
- MDM / UEM (Intune, Jamf, Workspace ONE, Google Endpoint Management) enforces passcodes, encryption and OS updates; separates work and personal data; and allows remote lock and wipe.
- BYOD (bring your own device) needs clear rules: what the owner accepts (a managed work profile, the company’s right to wipe work data), the minimum security level, and access that depends on device compliance. Use app-level protection to keep corporate data inside managed apps.
- Conditional access: grant access to email and apps only from devices that are enrolled, encrypted, patched and not jailbroken.
- Remote workers: a VPN or zero-trust access, a managed device, a secure home router (changed default password, WPA2/WPA3), and awareness of public Wi-Fi risks.
USB and removable media
Removable media spread malware and leak data. Options: disable USB mass storage by policy where it is not needed, allow only company-encrypted devices, scan media automatically, and disable autorun. Be wary of unknown USB devices (including “keyboard” devices that type commands).
Servers, containers and IoT
- Servers: stricter than workstations: minimal software, no browsing or email, administrative access only from secured paths, strong logging, regular patching windows, and EDR designed for servers.
- Containers: scan images, use minimal base images, run as non-root, restrict capabilities, and rebuild instead of patching in place.
- IoT and OT devices (cameras, printers, building controls) often cannot run agents and rarely get patches: put them on separate network segments, change default credentials, disable unused services and monitor their traffic.
Visibility and response
- Keep a live inventory of endpoints, with owner, OS version, patch level, encryption and agent status.
- Send endpoint logs and EDR alerts to the SIEM (the logging lesson).
- Have a playbook for a suspected infected device: isolate, investigate, rebuild, reset credentials.
- Make reporting easy: staff should know how to report a lost laptop or a suspicious file immediately.
A practical checklist for a new laptop
- Standard image from the managed build pipeline, patched
- Full-disk encryption on, recovery key escrowed
- EDR/anti-malware installed and healthy
- User has a standard (non-admin) account; local admin password managed by LAPS
- Host firewall on; unneeded services off
- MFA enrolled (passkey or security key if available)
- Enrolled in MDM with compliance policy and remote wipe
- Logging to the central platform
- Macros and risky file types restricted; application control policy applied
Your company's laptops are all standard images with antivirus, but a stolen laptop led to a data breach. What protections were likely missing, and what would you add?
Probably full-disk encryption (data readable once the drive was removed) or a weak sign-in without a TPM and PIN. Add enforced full-disk encryption with recovery keys, a strong passcode or biometrics with lockout, MDM with remote lock and wipe, conditional access that cuts off the device’s sessions and tokens when it is reported lost, and a quick loss-reporting process.
Can You Explain It?
Close the lesson and answer these without looking back. The goal isn't the wording — it's whether you've formed a usable mental model.
- Explain how EDR differs from signature-based antivirus and give two response actions it enables.
- Why remove local administrator rights from everyday users, and what replaces them for IT tasks?
- What is a security baseline, and how do you keep devices from drifting away from it?
🧪 Want to practise this on your own computer? See how to set up your lab →