{"id":29782,"date":"2025-10-21T13:53:00","date_gmt":"2025-10-21T08:23:00","guid":{"rendered":"https:\/\/opstree.com\/blog\/?p=29782"},"modified":"2025-10-21T13:53:00","modified_gmt":"2025-10-21T08:23:00","slug":"a-practical-guide-to-applying-cis-benchmarks-for-system-hardening","status":"publish","type":"post","link":"https:\/\/opstree.com\/blog\/2025\/10\/21\/a-practical-guide-to-applying-cis-benchmarks-for-system-hardening\/","title":{"rendered":"A Practical Guide to Applying CIS Benchmarks for System Hardening"},"content":{"rendered":"<h2 id=\"fe0c\" class=\"lv lw gm bg lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms bl\" data-selectable-paragraph=\"\">Introduction<\/h2>\n<p id=\"3c71\" class=\"pw-post-body-paragraph mt mu gm mv b mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq gf bl\" data-selectable-paragraph=\"\">In today\u2019s world, where cyber threats keep evolving every day, system security is no longer optional &#8211; it\u2019s a must. Many organizations depend on trusted frameworks to secure their infrastructure. One such framework is the <strong class=\"mv gn\">CIS Benchmark<\/strong>, created by the\u00a0<strong class=\"mv gn\">Center for Internet Security (CIS)<\/strong>.<\/p>\n<p id=\"72f8\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">CIS Benchmarks are detailed recommendations that help you configure operating systems, servers, databases, and applications securely. Whether you\u2019re managing a Linux server or a Windows workstation, these benchmarks give you a clear checklist of what to configure and why it matters.<\/p>\n<p id=\"3617\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">This blog explains what CIS Benchmarks are, why they\u2019re important, when you should use them, and how they can improve your system security\u00a0 with some real examples from implementation experience.<!--more--><\/p>\n<h2 id=\"f5a9\" class=\"lv lw gm bg lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms bl\" data-selectable-paragraph=\"\">What Are CIS Benchmarks?<\/h2>\n<p id=\"3916\" class=\"pw-post-body-paragraph mt mu gm mv b mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq gf bl\" data-selectable-paragraph=\"\">The CIS Benchmarks are a set of recommended practices for system configuration security. They are created by industry experts, government specialists, and cybersecurity professionals who collaborate to specify what \u201csecure configuration\u201d for each platform should entail.<\/p>\n<p id=\"aa71\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">A list of security controls, such as turning off unused services, establishing appropriate file permissions, or enforcing password policies, is provided by each CIS Benchmark. The purpose of these controls is to lower risk without impairing regular operation.<\/p>\n<p id=\"bc74\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">The benchmarks are divided into two levels:<\/p>\n<ul class=\"\">\n<li id=\"25c8\" class=\"mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq nw nx ny bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">Level 1:<\/strong>\u00a0Concentrates on fundamental security configurations that don\u2019t impact system functionality. Perfect for the majority of organisations.<\/li>\n<li id=\"90b1\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq nw nx ny bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">Level 2:<\/strong>\u00a0For sensitive or high-security environments, more stringent security configurations are added.<\/li>\n<\/ul>\n<p id=\"c0c6\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">In short, CIS Benchmarks give you a\u00a0<strong class=\"mv gn\">step-by-step guide<\/strong> to make your systems more resilient against attacks, serving as a vital foundation for effective <a href=\"https:\/\/opstree.com\/services\/middleware-database-and-data-engineering\/\" target=\"_blank\" rel=\"noopener\"><strong data-start=\"152\" data-end=\"197\">database security &amp; compliance consulting<\/strong><\/a>.<\/p>\n<h2 id=\"ff01\" class=\"lv lw gm bg lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms bl\" data-selectable-paragraph=\"\">Why CIS Benchmarks Are Important<\/h2>\n<p id=\"ba07\" class=\"pw-post-body-paragraph mt mu gm mv b mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq gf bl\" data-selectable-paragraph=\"\">Misconfigurations, rather than new vulnerabilities, are the cause of many security incidents. Attackers can gain access by making a simple error, such as leaving \/tmp executable or permitting unfettered SSH access. By providing validated settings that have been tested in a variety of environments, CIS Benchmarks aid in avoiding such errors.<\/p>\n<p id=\"8cb3\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">Following CIS Benchmarks also helps organizations:<\/p>\n<ul class=\"\">\n<li id=\"4694\" class=\"mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq nw nx ny bl\" data-selectable-paragraph=\"\">Stay compliant with standards such as\u00a0<strong class=\"mv gn\">ISO 27001, NIST, and SOC 2<\/strong><\/li>\n<li id=\"369f\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq nw nx ny bl\" data-selectable-paragraph=\"\">Reduce the time and cost needed for audits<\/li>\n<li id=\"f8cd\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq nw nx ny bl\" data-selectable-paragraph=\"\">Create consistency across systems and environments<\/li>\n<li id=\"d3c9\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq nw nx ny bl\" data-selectable-paragraph=\"\">Build a strong security foundation from day one<\/li>\n<\/ul>\n<p id=\"0404\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">In short, implementing CIS Benchmarks means your systems are not only secure , they\u2019re also <strong class=\"mv gn\">auditable and standardized<\/strong>, which is vital for long-term security management.<\/p>\n<p data-selectable-paragraph=\"\"><strong>[ Good Read: <a href=\"https:\/\/opstree.com\/blog\/2025\/10\/14\/data-engineering-with-azure-databricks\/\" target=\"_blank\" rel=\"noopener\">The Ultimate Guide to Cloud Data Engineering with Azure, ADF, and Databricks<\/a> ]<\/strong><\/p>\n<h2 id=\"3118\" class=\"lv lw gm bg lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms bl\" data-selectable-paragraph=\"\">Key Benefits of Using CIS Benchmarks<\/h2>\n<ol class=\"\">\n<li id=\"cdd9\" class=\"mt mu gm mv b mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq oe nx ny bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">Improved Security Posture:<\/strong><br \/>\nEach CIS Benchmark control addresses a particular security vulnerability. By implementing them, you shut down numerous typical attack vectors.<\/li>\n<li id=\"cb75\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq oe nx ny bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">Consistency Across Systems:<\/strong><br \/>\nWith all your systems having the same configuration settings, it becomes simpler to handle and audit them.<\/li>\n<li id=\"9bd1\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq oe nx ny bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">Ease of Validation:<\/strong><br \/>\nAutomated testing of your systems against CIS Benchmark rules using tools such as CIS-CAT, OpenSCAP, or Lynis spares you effort.<\/li>\n<li id=\"9620\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq oe nx ny bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">Community-Driven and Trusted:<\/strong><br \/>\nCIS Benchmarks are constructed by a worldwide group of experts, so they adapt to emerging threats and technology.<\/li>\n<li id=\"a04e\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq oe nx ny bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">Vendor Neutral:<\/strong><br \/>\nRegardless of whether you\u2019re using Linux, Windows, <a href=\"https:\/\/opstree.com\/blog\/2025\/05\/28\/aws-for-beginners-what-is-it-how-it-works-and-key-benefits\/\" target=\"_blank\" rel=\"noopener\">AWS<\/a>, or GCP, there\u2019s a benchmark for nearly every top-tier platform.<\/li>\n<\/ol>\n<h2 id=\"71bd\" class=\"lv lw gm bg lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms bl\" data-selectable-paragraph=\"\">When Should You Use CIS Benchmarks?<\/h2>\n<p id=\"3b54\" class=\"pw-post-body-paragraph mt mu gm mv b mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq gf bl\" data-selectable-paragraph=\"\">CIS Benchmarks can be applied at different stages depending on your setup:<\/p>\n<ul class=\"\">\n<li id=\"bf83\" class=\"mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq nw nx ny bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">During Initial System Setup:<\/strong>\u00a0Prior to installing a server, set it up according to the benchmark. This avoids unsafe defaults.<\/li>\n<li id=\"57eb\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq nw nx ny bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">During Regular Maintenance:<\/strong>\u00a0Review systems periodically to ensure no configuration drift has occurred.<\/li>\n<li id=\"2020\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq nw nx ny bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">Before Audits or Compliance Checks:<\/strong>\u00a0CIS alignment helps prepare for security audits.<\/li>\n<li id=\"e542\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq nw nx ny bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">In CI\/CD Pipelines:<\/strong>\u00a0Automate security checks as part of compliance workflow for ongoing compliance.<\/li>\n<\/ul>\n<p id=\"f01a\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">In short, CIS Benchmarks aren\u2019t just for audits &#8211; they\u2019re for everyday secure operations.<\/p>\n<h2 id=\"3747\" class=\"lv lw gm bg lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms bl\" data-selectable-paragraph=\"\">Real-World Examples of CIS Benchmark Implementation<\/h2>\n<p id=\"203b\" class=\"pw-post-body-paragraph mt mu gm mv b mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq gf bl\" data-selectable-paragraph=\"\">To understand how CIS Benchmarks strengthen system security, let\u2019s look at two practical examples &#8211; securing the <code class=\"de of og oh oi b\">\/tmp<\/code>\u00a0directory and enforcing authentication for single user mode.<\/p>\n<p data-selectable-paragraph=\"\"><strong>[ Case Study: <a href=\"https:\/\/opstree.com\/case-study\/automating-workflows-for-secure-and-scalable-delivery\/\" target=\"_blank\" rel=\"noopener\">Automating Workflows for Secure and Scalable Delivery<\/a>]<\/strong><\/p>\n<h2 id=\"2357\" class=\"lv lw gm bg lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms bl\" data-selectable-paragraph=\"\">Example 1: Securing\u00a0<code class=\"de of og oh oi b\">\/tmp<\/code>\u00a0with\u00a0<code class=\"de of og oh oi b\">nodev<\/code>,\u00a0<code class=\"de of og oh oi b\">nosuid<\/code>, and\u00a0<code class=\"de of og oh oi b\">noexec<\/code><\/h2>\n<p id=\"07fe\" class=\"pw-post-body-paragraph mt mu gm mv b mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq gf bl\" data-selectable-paragraph=\"\">The\u00a0<code class=\"de of og oh oi b\">\/tmp<\/code>\u00a0directory is used for temporary file storage by users and applications. Because it\u2019s world-writable, it can be exploited if not properly configured.<br \/>\nCIS recommends that\u00a0<code class=\"de of og oh oi b\">\/tmp<\/code>\u00a0should be mounted on a\u00a0<strong class=\"mv gn\">separate partition<\/strong>\u00a0with the\u00a0<code class=\"de of og oh oi b\">nodev<\/code>,\u00a0<code class=\"de of og oh oi b\">nosuid<\/code>, and\u00a0<code class=\"de of og oh oi b\">noexec<\/code>\u00a0options to prevent misuse.<\/p>\n<h3 id=\"9b68\" class=\"oj lw gm bg lx ok ol om mb on oo op mf ne oq or os ni ot ou ov nm ow ox oy oz bl\" data-selectable-paragraph=\"\">Audit<\/h3>\n<p id=\"1b3b\" class=\"pw-post-body-paragraph mt mu gm mv b mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq gf bl\" data-selectable-paragraph=\"\">To verify the mount options for\u00a0<code class=\"de of og oh oi b\">\/tmp<\/code>:<\/p>\n<pre class=\"pa pb pc pd pe pf oi pg bq ph bc bl\"><span id=\"1b60\" class=\"pi lw gm oi b bh pj pk m pl pm\" data-selectable-paragraph=\"\">findmnt -nk \/tmp<\/span><\/pre>\n<p id=\"cc26\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">Expected output example:<\/strong><\/p>\n<pre class=\"pa pb pc pd pe pf oi pg bq ph bc bl\"><span id=\"b08b\" class=\"pi lw gm oi b bh pj pk m pl pm\" data-selectable-paragraph=\"\">\/tmp   tmpfs  tmpfs  rw,nosuid,nodev,noexec<\/span><\/pre>\n<p id=\"2e55\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">To check each option individually, you can run:<\/p>\n<pre class=\"pa pb pc pd pe pf oi pg bq ph bc bl\"><span id=\"5eb2\" class=\"pi lw gm oi b bh pj pk m pl pm\" data-selectable-paragraph=\"\">findmnt -kn \/tmp | grep -v nodev     <span class=\"hljs-comment\"># Verify nodev<\/span>\r\nfindmnt -kn \/tmp | grep -v nosuid    <span class=\"hljs-comment\"># Verify nosuid<\/span>\r\nfindmnt -kn \/tmp | grep -v noexec    <span class=\"hljs-comment\"># Verify noexec<\/span><\/span><\/pre>\n<p id=\"8d6b\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">If nothing is returned, the respective option is correctly applied.<\/p>\n<ul class=\"\">\n<li id=\"f6db\" class=\"mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq nw nx ny bl\" data-selectable-paragraph=\"\"><code class=\"de of og oh oi b\"><strong class=\"mv gn\">nodev<\/strong><\/code>\u00a0ensures that no special device files (block or character devices) can be created inside\u00a0<code class=\"de of og oh oi b\">\/tmp<\/code>.<\/li>\n<li id=\"540b\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq nw nx ny bl\" data-selectable-paragraph=\"\"><code class=\"de of og oh oi b\"><strong class=\"mv gn\">nosuid<\/strong><\/code>\u00a0prevents executable files in\u00a0<code class=\"de of og oh oi b\">\/tmp<\/code>\u00a0from running with elevated privileges, blocking privilege escalation attacks.<\/li>\n<li id=\"ff09\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq nw nx ny bl\" data-selectable-paragraph=\"\"><code class=\"de of og oh oi b\"><strong class=\"mv gn\">noexec<\/strong><\/code>\u00a0stops execution of programs from\u00a0<code class=\"de of og oh oi b\">\/tmp<\/code>, preventing attackers from running malicious scripts from this directory.<\/li>\n<\/ul>\n<p id=\"a361\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">Mounting\u00a0<code class=\"de of og oh oi b\">\/tmp<\/code>\u00a0separately with these options reduces attack surfaces and helps maintain system stability and integrity.<\/p>\n<h4 id=\"89b6\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\"><strong class=\"mv gn\">Solution using Ansible:<\/strong><\/h4>\n<p class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">This configuration can be applied automatically using an Ansible role. The role mounts <code class=\"de of og oh oi b\">\/tmp<\/code>\u00a0as a separate partition with secure options (<code class=\"de of og oh oi b\">nodev<\/code>,\u00a0<code class=\"de of og oh oi b\">nosuid<\/code>, and\u00a0<code class=\"de of og oh oi b\">noexec<\/code>) in line with CIS recommendations.<\/p>\n<figure class=\"pa pb pc pd pe pq pn po paragraph-image\">\n<div class=\"pr ps em pt bi pu\" tabindex=\"0\" role=\"button\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-29787 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/10\/download-1024x273.png\" alt=\"\" width=\"840\" height=\"224\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/10\/download-1024x273.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/10\/download-300x80.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/10\/download-768x205.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/10\/download.png 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<\/div>\n<\/figure>\n<p id=\"9c3a\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">Using automation ensures that these security controls are consistently enforced across all managed nodes, reducing manual effort and configuration drift.<\/p>\n<p data-selectable-paragraph=\"\"><strong>[ Also Read: <a href=\"https:\/\/opstree.com\/blog\/2025\/05\/06\/technical-case-study-amazon-redshift-and-athena-as-data-warehousing-solutions\/\" target=\"_blank\" rel=\"noopener\">Amazon Redshift and Athena as Data Warehousing Solutions<\/a> ]<\/strong><\/p>\n<h2 id=\"8d0d\" class=\"lv lw gm bg lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms bl\" data-selectable-paragraph=\"\">Example 2: Enforcing Authentication in Single User and Emergency Modes<\/h2>\n<p id=\"bb60\" class=\"pw-post-body-paragraph mt mu gm mv b mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq gf bl\" data-selectable-paragraph=\"\">Single user and emergency modes are recovery states that provide direct root access to troubleshoot or repair the system.<br \/>\nIf authentication isn\u2019t enforced, anyone with physical or console access could use these modes to gain root privileges without a password.<\/p>\n<p id=\"71eb\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">CIS recommends using\u00a0<code class=\"de of og oh oi b\">sulogin<\/code>\u00a0to ensure authentication is required in both modes.<\/p>\n<h3 id=\"1920\" class=\"oj lw gm bg lx ok ol om mb on oo op mf ne oq or os ni ot ou ov nm ow ox oy oz bl\" data-selectable-paragraph=\"\">Audit<\/h3>\n<p id=\"0e18\" class=\"pw-post-body-paragraph mt mu gm mv b mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq gf bl\" data-selectable-paragraph=\"\">To check if authentication is enforced, run:<\/p>\n<pre class=\"pa pb pc pd pe pf oi pg bq ph bc bl\"><span id=\"0af2\" class=\"pi lw gm oi b bh pj pk m pl pm\" data-selectable-paragraph=\"\">grep \/sbin\/sulogin \/usr\/lib\/systemd\/system\/rescue.service\r\ngrep \/sbin\/sulogin \/usr\/lib\/systemd\/system\/emergency.service<\/span><\/pre>\n<p id=\"f172\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">Expected output example:<\/strong><\/p>\n<pre class=\"pa pb pc pd pe pf oi pg bq ph bc bl\"><span id=\"5973\" class=\"pi lw gm oi b bh pj pk m pl pm\" data-selectable-paragraph=\"\">ExecStart=-\/bin\/sh -c <span class=\"hljs-string\">\"\/sbin\/sulogin; \/usr\/bin\/systemctl --fail --no-block default\"<\/span><\/span><\/pre>\n<p id=\"ac52\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">If\u00a0<code class=\"de of og oh oi b\">\/sbin\/sulogin<\/code>\u00a0appears in both outputs, it confirms that authentication is properly enabled.<br \/>\nThis setup ensures that only authorized administrators can access recovery modes, preventing unauthorized users from bypassing normal login security.<\/p>\n<h4 id=\"3a05\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\"><strong class=\"mv gn\">Solution with Ansible<\/strong><\/h4>\n<p class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">The same configuration can be enforced automatically using Ansible.<br \/>\nThe following task updates both\u00a0<code class=\"de of og oh oi b\">rescue.service<\/code>\u00a0and\u00a0<code class=\"de of og oh oi b\">emergency.service<\/code>\u00a0files to include\u00a0<code class=\"de of og oh oi b\">sulogin<\/code>, ensuring that authentication is always required when entering single user or emergency mode.<\/p>\n<figure class=\"pa pb pc pd pe pq pn po paragraph-image\">\n<div class=\"pn po pw\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-29788 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/10\/image-1024x189.png\" alt=\"\" width=\"840\" height=\"155\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/10\/image-1024x189.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/10\/image-300x55.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/10\/image-768x142.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/10\/image-1200x222.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/10\/image.png 1217w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/div>\n<\/figure>\n<p id=\"20cc\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">Using this automated approach ensures all systems consistently enforce authentication in recovery modes, reducing the risk of unauthorized access.<\/p>\n<h2 id=\"2eba\" class=\"lv lw gm bg lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms bl\" data-selectable-paragraph=\"\">Conclusion<\/h2>\n<p id=\"7d4d\" class=\"pw-post-body-paragraph mt mu gm mv b mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq gf bl\" data-selectable-paragraph=\"\">CIS Benchmarks offer a dependable and workable approach to hardening systems against prevalent misconfigurations. The guidelines enable administrators to normalize settings, enhance defenses, and ensure compliance with established security standards. Whether implemented manually or using automated tools such as Ansible, CIS Benchmarks enable the creation of a uniform and secure environment that\u2019s simpler to manage and audit<\/p>\n<h2 id=\"29d7\" class=\"lv lw gm bg lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms bl\" data-selectable-paragraph=\"\">Frequently Asked Questions (FAQs)<\/h2>\n<h4 id=\"96c2\" class=\"pw-post-body-paragraph mt mu gm mv b mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq gf bl\"><strong class=\"mv gn\">1. Who creates CIS Benchmarks?<\/strong><\/h4>\n<p class=\"pw-post-body-paragraph mt mu gm mv b mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq gf bl\" data-selectable-paragraph=\"\">They are authored by the Center for Internet Security (CIS) with contribution from cybersecurity professionals, vendors, and government agencies.<\/p>\n<h4 id=\"0ea4\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\"><strong class=\"mv gn\">2. Are CIS Benchmarks equivalent to DISA STIGs?<\/strong><\/h4>\n<p class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">No. CIS Benchmarks are best practices developed by the community, whereas STIGs are U.S. Department of Defense security guides.<\/p>\n<h4 id=\"1310\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\"><strong class=\"mv gn\">3. Can CIS Benchmarks be automated?<\/strong><\/h4>\n<p class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">Yes. CIS-CAT, OpenSCAP, and Ansible roles can automatically scan and apply CIS configurations.<\/p>\n<h4 id=\"f350\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\"><strong class=\"mv gn\">4. In what ways do CIS Benchmarks assist with compliance?<\/strong><\/h4>\n<p class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">They closely align with standards such as ISO 27001, NIST, and SOC 2, which enable organizations to pass audit and security compliance requirements.<\/p>\n<h4 id=\"973f\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\"><strong class=\"mv gn\">5. Do CIS Benchmarks have any impact on system performance?<\/strong><\/h4>\n<p class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">Level 1 settings do not have much or any effect. Level 2 might slightly impact it, as they contain more strict security rules.<\/p>\n<h4 id=\"00ca\" class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\"><strong class=\"mv gn\">6. Are CIS Benchmarks customizable?<\/strong><\/h4>\n<p class=\"pw-post-body-paragraph mt mu gm mv b mw nr my mz na ns nc nd ne nt ng nh ni nu nk nl nm nv no np nq gf bl\" data-selectable-paragraph=\"\">Yes, you can make them fit your company\u2019s requirements , if changes are documented and approved.<\/p>\n<h2 id=\"9d18\" class=\"lv lw gm bg lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms bl\" data-selectable-paragraph=\"\">References<\/h2>\n<ol class=\"\">\n<li id=\"5cac\" class=\"mt mu gm mv b mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq oe nx ny bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">Center for Internet Security (CIS) Benchmarks<\/strong><br \/>\nOfficial documentation and benchmark guides for different operating systems and platforms.<br \/>\n\ud83d\udd17\u00a0<a class=\"ah px\" href=\"https:\/\/www.cisecurity.org\/cis-benchmarks\" target=\"_blank\" rel=\"noopener\">https:\/\/www.cisecurity.org\/cis-benchmarks<\/a><\/li>\n<li id=\"34ee\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq oe nx ny bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">CIS-CAT Pro Assessor User Guide<\/strong>\u00a0\u2014 Center for Internet Security<br \/>\nDetails on using CIS\u2019s official auditing tool to assess compliance.<br \/>\n\ud83d\udd17\u00a0<a class=\"ah px\" href=\"https:\/\/www.cisecurity.org\/tools\/cis-cat-pro\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/www.cisecurity.org\/tools\/cis-cat-pro<\/a><\/li>\n<li id=\"b717\" class=\"mt mu gm mv b mw nz my mz na oa nc nd ne ob ng nh ni oc nk nl nm od no np nq oe nx ny bl\" data-selectable-paragraph=\"\"><strong class=\"mv gn\">OpenSCAP Project Documentation<\/strong><br \/>\nOpen-source framework for automated compliance checking and vulnerability assessment.<br \/>\n\ud83d\udd17\u00a0<a class=\"ah px\" href=\"https:\/\/www.open-scap.org\/\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/www.open-scap.org\/<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In today\u2019s world, where cyber threats keep evolving every day, system security is no longer optional &#8211; it\u2019s a must. Many organizations depend on trusted frameworks to secure their infrastructure. One such framework is the CIS Benchmark, created by the\u00a0Center for Internet Security (CIS). CIS Benchmarks are detailed recommendations that help you configure operating &hellip; <a href=\"https:\/\/opstree.com\/blog\/2025\/10\/21\/a-practical-guide-to-applying-cis-benchmarks-for-system-hardening\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;A Practical Guide to Applying CIS Benchmarks for System Hardening&#8221;<\/span><\/a><\/p>\n","protected":false},"author":244582708,"featured_media":29792,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[801],"tags":[40273722,768739409,343865,768739407],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/10\/Applying-CIS-Benchmarks-for-System-Hardening-1.jpg","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfDBOm-7Km","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/29782"}],"collection":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/users\/244582708"}],"replies":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/comments?post=29782"}],"version-history":[{"count":4,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/29782\/revisions"}],"predecessor-version":[{"id":29791,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/29782\/revisions\/29791"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media\/29792"}],"wp:attachment":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media?parent=29782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/categories?post=29782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/tags?post=29782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}