Pcornel
Security · Hardening

Disable Unused Services

Cheat sheet · https://pcornel.dk/topic.php?topic=4843

Back to the Topic

Answer

Disabling Unused Services removes unnecessary listening endpoints, background processes, privileges and update dependencies while retaining documented functions required for operations, monitoring, recovery and business workloads.

Remember

  • Service stopped ≠ disabled across boot, triggers and alternate instances.
  • No current user ≠ service unnecessary for recovery, dependencies or future role.
  • Desired baseline ≠ deployed, effective and persistent runtime state.
  • Compliant score ≠ secure workload, correct recovery or acceptable residual risk.

First checks

  • systemctl list-units --type=service --state=running — running services
  • Get-Service | ? Status -eq Running — Windows
  • ss -ltnp — listening ports

Verify in this order

service list → required only → others disabled

Where it usually breaks

First mismatch in asset inventory → applicable baseline/finding → risk/exception decision → remediation → verification → compliance/reporting; preserve identity/policy/pre-state before mutation.

Hardening → Disable Unused Services proof map

BoundaryEstablishDoes not establish
ScopeExact platform/version, role, threat model, required functions and approved profileGeneric benchmark selection does not prove suitability
Effective stateDesired source, deployment, precedence and loaded/runtime valueFile, policy or compliance result alone does not prove enforcement
BehaviorCorrelated allowed/denied test, events and protected workload resultOne blocked action does not prove the intended control caused it
AssurancePersistence, drift monitoring, exception state, recovery and regressionOne-time hardening does not prove maintained secure state

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4843

Confirmation

Confirm action

Continue?