OS hardening reduces attack surface by removing or disabling unnecessary services and software. This limits the ways attackers can enter or exploit the system.
Default OS settings often enable many services and features to support various uses. Some of these may be unnecessary and create extra points for attackers.
Disabling unused network ports and services removes unnecessary ways attackers can access the system, effectively reducing the attack surface.
By limiting exposed features and services, OS hardening reduces the number of vulnerabilities that attackers can exploit.
OS hardening focuses on reducing the number of features and services that can be attacked, while patch management focuses on fixing security flaws in existing software.
