A hardening baseline is the fleet's standard secure configuration:
what is on, what is off, and what is monitored, applied to every
endpoint. This skill covers building one that is actually adopted:
adapting CIS benchmarks, choosing controls with user impact in mind,
checking compliance, and handling exceptions. It is for fleets you
manage.
Quick Workflow
- Pick the starting benchmark: CIS level 1 for the OS in use.
- Adapt to your environment: remove what breaks business apps,
document why.
- Prioritize the controls that stop real attacks: attack surface
reduction first.
- Implement via configuration management, not manual tweaks.
- Check compliance continuously: drift alerts, not annual audits.
- Handle exceptions formally: ticket, expiry, compensating control.
- Measure: compliance percentage per control, trending up.
- Review the baseline yearly or after major OS changes.
1. Control selection
# Priority controls (the ones that earn their user impact):
# - firewall on, inbound default deny
# - automatic updates on, reboot policy defined
# - no local admin for daily use
# - USB mass storage restricted or monitored
# - EDR installed, tamper protected, reporting
# - disk encryption on
# - screen lock <= 5 min, password required
# - unnecessary services disabled (telnet, SMBv1, LLMNR where possible)
echo "each control: setting, enforcement method, exception process"
#!/usr/bin/env python3
"""Baseline compliance sketch: control, expected, found, status."""
checks = [
("firewall enabled", True, True),
("disk encrypted", True, True),
("local admins <= 2", True, False),
("EDR reporting", True, True),
]
for name, want, got in checks:
print(f"[{'OK' if want == got else 'FAIL'}] {name}")
print("trend the pass rate; investigate new FAILs within a day")
2. Compliance checking
# Linux example checks (adapt per OS):
# firewall: ufw status | firewall-cmd --state
# encryption: lsblk -o NAME,FSTYPE | grep crypto
# updates: unattended-upgrades status or last patch date
# EDR: service status and last check in
echo "automate: config management enforces, scanner verifies, SIEM alerts"
Edge cases
- Developers need local admin. Give just in time elevation with
logging, not standing admin.
- Legacy apps need old protocols. Isolate those machines and
document the risk acceptance.
- BYOD in scope. Then the baseline is MDM enforced minimums, not
full control; be honest about the difference.
Escalation
- Compliance dropping: find whether it is drift, exceptions, or
new devices; fix the process, not just the machines.
- Control breaks business: the exception process exists for this;
undocumented workarounds are the real risk.
Detection and defender view
Hardening is prevention; its detection side is compliance
monitoring: drift from the baseline is the alert. Attackers look
for the non compliant machines, which is why coverage matters more
than perfection on a few. The durable program measures compliance
like uptime and treats exceptions as temporary by default.
Key references
- CIS Benchmarks: per OS hardening guides.
- NIST SP 800-53: control catalog.
- Related skills: linux-hardening, ssh-hardening.
See also
linux-hardening-baseline: Use it instead for the Linux-only fleet baseline, with its SSH, filesystem, and kernel sub-skills.
defensive-macos-hardening: Use it instead for the macOS-specific baseline, including Gatekeeper, XProtect, MDM profiles, and FileVault.
1---2name: endpoint-hardening-baseline3description: Use when building or auditing endpoint hardening4 baselines for Windows, macOS, or Linux fleets. Covers CIS benchmark5 adaptation, practical control selection, compliance checking, and6 exception handling. Also use when a fleet needs a defensible7 standard configuration.8version: 1.0.09domain: defensive10lifecycle: stable11last_verified: "2026-10-23"12requires: []13extends: []14relates: [linux-hardening, ssh-hardening, edr-basics]15tools:16 - name: Python17 version: "3.12"18metadata:19 source: https://skillmd.com/skills/mizazhaider-ceh/endpoint-hardening-baseline20---2122A hardening baseline is the fleet's standard secure configuration:23what is on, what is off, and what is monitored, applied to every24endpoint. This skill covers building one that is actually adopted:25adapting CIS benchmarks, choosing controls with user impact in mind,26checking compliance, and handling exceptions. It is for fleets you27manage.2829## Quick Workflow30311. Pick the starting benchmark: CIS level 1 for the OS in use.322. Adapt to your environment: remove what breaks business apps,33 document why.343. Prioritize the controls that stop real attacks: attack surface35 reduction first.364. Implement via configuration management, not manual tweaks.375. Check compliance continuously: drift alerts, not annual audits.386. Handle exceptions formally: ticket, expiry, compensating control.397. Measure: compliance percentage per control, trending up.408. Review the baseline yearly or after major OS changes.4142## 1. Control selection4344```bash45# Priority controls (the ones that earn their user impact):46# - firewall on, inbound default deny47# - automatic updates on, reboot policy defined48# - no local admin for daily use49# - USB mass storage restricted or monitored50# - EDR installed, tamper protected, reporting51# - disk encryption on52# - screen lock <= 5 min, password required53# - unnecessary services disabled (telnet, SMBv1, LLMNR where possible)54echo "each control: setting, enforcement method, exception process"55```5657```python58#!/usr/bin/env python359"""Baseline compliance sketch: control, expected, found, status."""60checks = [61 ("firewall enabled", True, True),62 ("disk encrypted", True, True),63 ("local admins <= 2", True, False),64 ("EDR reporting", True, True),65]66for name, want, got in checks:67 print(f"[{'OK' if want == got else 'FAIL'}] {name}")68print("trend the pass rate; investigate new FAILs within a day")69```7071## 2. Compliance checking7273```bash74# Linux example checks (adapt per OS):75# firewall: ufw status | firewall-cmd --state76# encryption: lsblk -o NAME,FSTYPE | grep crypto77# updates: unattended-upgrades status or last patch date78# EDR: service status and last check in79echo "automate: config management enforces, scanner verifies, SIEM alerts"80```8182## Edge cases8384- Developers need local admin. Give just in time elevation with85 logging, not standing admin.86- Legacy apps need old protocols. Isolate those machines and87 document the risk acceptance.88- BYOD in scope. Then the baseline is MDM enforced minimums, not89 full control; be honest about the difference.9091## Escalation9293- Compliance dropping: find whether it is drift, exceptions, or94 new devices; fix the process, not just the machines.95- Control breaks business: the exception process exists for this;96 undocumented workarounds are the real risk.9798## Detection and defender view99100Hardening is prevention; its detection side is compliance101monitoring: drift from the baseline is the alert. Attackers look102for the non compliant machines, which is why coverage matters more103than perfection on a few. The durable program measures compliance104like uptime and treats exceptions as temporary by default.105106## Key references107108- CIS Benchmarks: per OS hardening guides.109- NIST SP 800-53: control catalog.110- Related skills: linux-hardening, ssh-hardening.111112## See also113114- `linux-hardening-baseline`: Use it instead for the Linux-only fleet baseline, with its SSH, filesystem, and kernel sub-skills.115- `defensive-macos-hardening`: Use it instead for the macOS-specific baseline, including Gatekeeper, XProtect, MDM profiles, and FileVault.