The security of operating systems is critical in safeguarding digital infrastructure, particularly server environments vulnerable to cyberattacks. One proven approach to enhancing OS security is hardening, which involves minimizing the system's attack surface. This study evaluates the effectiveness of the Center for Internet Security (CIS) Benchmark in hardening Ubuntu Server 22.04 against cyber threats. Using the PPDIOO framework, the research implemented hardening procedures via Ansible automation and conducted experimental tests comparing a hardened server against a standard (non-hardened) counterpart. Both servers were subjected to simulated attacks including DDoS, Port Scanning, Brute Force, Web Scanning, and Web Crawling. The results demonstrate a marked improvement in resistance for the hardened server, with attack success rates significantly reduced: 11% for DDoS (versus 94% on the standard server), 0% for Port Scanning, Brute Force, and Web Crawling (versus 20–100% on the standard server), and 67% for Web Scanning (versus 100% on the standard server). These findings underscore the substantial protective advantage conferred by the CIS Benchmark. The study contributes to the field by offering empirical evidence of CIS Benchmark's applicability to modern Linux environments and highlights the value of integrating automated hardening and attack simulations in cybersecurity practices. Future work should examine scalability across different OS platforms and real-world enterprise deployments.