Hardening: what it is and what it is not
Several misunderstandings have grown up around the term, and each leads to a different kind of wasted effort, so they are worth disarming at the outset.
Hardening is not a project with an end date. Configuration drifts away from the reference on its own, with nobody acting in bad faith: a temporary exception is made during an incident and never reversed, a new service appears, somebody changes a setting in a hurry. Without measuring that drift, after a year the organisation is in a state it knows nothing about.
Nor is it a synonym for patching or a substitute for threat detection software. An EDR works inside the system and reacts to what is already happening; hardening reduces what an attacker can act on at all. The two complement each other rather than replacing each other.
Finally, it has nothing to do with security through obscurity. Moving SSH from port 22 to port 2222 reduces the number of automated-scanning entries in the log and nothing else - an attacker who spends a minute on reconnaissance will find it just the same.
So what is it? A continuous process resting on three elements: a documented point of reference, regular measurement of deviations from it, and a formal path for approving exceptions. To that add standardised system images, so that every new server starts in the target state instead of being brought to it by hand.
Hardening and detection complement each other. Some techniques in the MITRE ATT&CK [5] matrix - T1059 command and scripting interpreter, T1543 create or modify system process, T1547 boot or logon autostart execution - can be cut off by configuration alone, before an EDR has anything to detect. Every such case is an alert that never happens, and one fewer analyst decision.
Standards: CIS, STIG, NIST and when to use each
The point of reference does not have to be invented, because three recognised libraries exist, differing in detail and purpose.
CIS Benchmarks [1] are the most common choice outside the defence sector. The Center for Internet Security publishes configuration recommendations for more than 25 product families, from operating systems through databases and application servers to cloud, network devices and containers. Each benchmark has two levels: L1 covers settings that can be deployed without risk of disrupting work, while L2 goes further at the cost of convenience and application compatibility.
DISA STIG [2] comes from the United States Department of Defense and is markedly more rigorous. In Polish conditions it is used mainly in the defence sector and wherever a contracting party requires it.
NIST SP 800-53 [3] operates at a different level: it is a control catalogue in which configuration falls under the CM family. It is far less detailed than CIS or STIG, but it maps directly onto the NIST CSF [6], so it is useful as a connecting layer. For servers specifically, the older but still sensible NIST SP 800-123 [7] guide is a practical supplement.
For a typical local authority with a few dozen workstations and a handful of servers, a sensible set looks like this: workstations at L1 with selected L2 settings for disk encryption and remote access, servers and domain controllers at L1 with L2 wherever the applications allow it, network devices to the benchmark for the relevant vendor, and Active Directory to Microsoft's configuration tooling supplemented by local account password rotation and a tiered administration model.
The choice of level is a risk decision, not a matter of ambition. Applying L2 everywhere usually ends the same way: the business reports that something has stopped working, the hardening is rolled back in full, and the organisation ends up below where it started.
What specifically gets hardened
There are seven layers, and each has a different owner and different typical gaps.
- The operating system. Disabling unnecessary services, tightening authentication - including multi-factor authentication for administrative accounts - retiring obsolete protocols such as SMBv1 and NTLMv1, password policy, and restricting local administrator rights.
- Active Directory, most often the weakest link in Polish public sector estates. Four things, in this order: a tiered administration model (domain controllers and critical systems, application servers, workstations, with administrative accounts never crossing a tier boundary), local administrator password rotation, restriction of default permissions for ordinary users, particularly the Authenticated Users group on the DNS partitions and in SYSVOL, and tightened Kerberos settings: no accounts with pre-authentication disabled, short ticket lifetimes, AES only.
- The network. Segmentation into zones, default-deny firewall rules, isolation of workstations from each other, 802.1X authentication on wired and wireless networks, and separation of management interfaces from production traffic, with no protocols that carry passwords in clear text.
- Workstations. Application control, disk encryption, exploit mitigation, and threat detection software configured to block rather than merely report.
- Applications. On the web server side: current TLS versions, security headers and reduced information disclosure. On the database side: minimal privileges for application accounts and access logging. In front of both, usually an intermediary layer with rate limiting.
- Cloud and external services. CIS Benchmarks for the individual providers, multi-factor authentication, administrative event logging, least privilege in identity management, encryption by default, and conditional access rules.
- Industrial systems. Following IEC 62443 [4]: separation from the office network by an intermediate zone, a strict allow list of permitted traffic, passive monitoring instead of active scanning, and an unambiguous procedure for remote access through a jump server.
Order matters. Hardening workstations while leaving an unpatched edge device in place changes nothing - the attacker will come in that way, and all the work inside the network will be irrelevant.
Automation: without it nothing lasts
After a few months configuration drifts away from the reference, and again without anybody acting in bad faith: temporary exceptions made during an incident, new services, changes made in a hurry. Without measurement, nobody even knows how far.
Holding the state rests on three mechanisms. The first is configuration as code, in Ansible, Puppet, Chef or in the mechanisms native to Windows. It gives reproducibility, a change history in a repository, and the ability to compare the actual state with the intended one.
The second is continuous compliance measurement - daily or weekly scanning that identifies which machines have departed from the reference. Scanners with built-in audit profiles and open implementations of the SCAP protocol serve this purpose.
The third is building system images reproducibly, so that every new deployment starts in the target state. This is the most effective approach, because it eliminates drift at source instead of correcting it after the fact.
Without these three elements hardening is a one-off exercise whose effect decays at a rate governed solely by how much the environment changes.
The most common mistakes
Several patterns recur in our audit practice.
- No drift measurement. The configuration was set at some point and nobody has checked it since. This is the commonest and costliest mistake, because it invalidates all the earlier work.
- The highest level everywhere. Applying L2 regardless of context leads to conflicts with applications and, in consequence, to the hardening being rolled back in full.
- No formal exceptions. The goal is not 100 per cent compliance but documented deviations. If a particular server cannot meet a requirement, that should be recorded together with a compensating control and a review date.
- A hardened interior and an open edge. Workstations and servers compliant with the benchmark, and at the internet boundary a device that has not been updated for several years. Edge devices are an attractive target precisely because they rarely make it into a maintenance window.
- Active Directory with no tier model. The same account is used for work on a workstation and for administering a domain controller. One successful credential phish is enough to take over the whole estate. Without that separation the path from the first compromised workstation to the domain controller is short, because there is no privilege boundary along it.
- Hardening without monitoring. Integrity checking and policy enforcement mechanisms generate events that nobody receives. See SOC 24/7.
Where the obligation comes from
No Polish rule uses the word "hardening", but several require exactly what it means.
The Polish national cybersecurity system act [14], following the amendment transposing NIS2 and in force since 3 April 2026, addresses its requirements not to operators of essential services but to essential and important entities. They implement an information security management system and, within it - article 8(1)(2) - technical and organisational measures appropriate and proportionate to the assessed risk. Hardening attaches to several points at once: (b) on security in the acquisition, development, maintenance and operation of systems including testing, (j) on basic cyber hygiene practices, (k) on cryptography and encryption, and (n) on access control policies. Point 5(b) and (c) add regular software updates and protection against unauthorised modification. Part of the public sector follows its own path: an important entity that is a public body applies the requirements of annex 4 instead of paragraph 1 (article 8(3)).
The NIS2 directive [8] is the source of those requirements. Closest to hardening are article 21(2)(e), covering security in the acquisition, development and maintenance of network and information systems including vulnerability handling, and (g) on basic cyber hygiene practices and training. Watch out for a frequent citation error: the supply chain is (d), and (h) concerns cryptography, not cyber hygiene.
The Polish KRI regulation [11] covers entities performing public tasks. Closest to hardening is § 19(2)(7)(c), on measures preventing unauthorised access at the level of operating systems, network services and applications. It is supplemented by point 12(e) on the security of system files and (h) on checking the conformity of ICT systems with the relevant standards and security policies - which is, directly, drift measurement against a reference. See the article on KRI.
Beyond that, DORA [9] imposes protection and prevention duties on financial sector entities in article 9, the GDPR [10] lists pseudonymisation and encryption among the technical measures in article 32(1)(a), and IEC 62443-3-3 [4] sets system requirements for industrial environments. On the documentary side, ISO/IEC 27001 [12] often supplements them, with deviations from the reference recorded in the statement of applicability.
Where the field is going
Three developments are changing the scope of the term today.
Zero trust architecture, described in NIST SP 800-207, is a natural extension: instead of hardening individual systems, it verifies every request regardless of where it comes from. It does not replace hardening, though - it presupposes it. A zero trust model built on devices in their default configuration has nothing to verify.
Hardening machine learning environments is an area that did not exist in the previous decade. It adds protection of training data against poisoning, protection of the model-serving layer against prompt manipulation, and control over the model repository. Some of this falls within the duties of the AI Act [13].
Confidential computing, built on isolation mechanisms in the processor, extends protection to data in use - until now it was protected at rest and in transit. This matters above all where sensitive data is processed in an environment the organisation does not fully control.
Checklist: ten elements of a hardening programme
A list for quarterly review, not for ticking off once.
- Point of reference. The chosen standard, with the reasons for choosing it and version control - a change means a new version and an entry in the change history.
- Coverage of every layer. Each of the seven layers has its own reference. A layer without one is a risk nobody has assessed.
- Automated deployment. Configuration as code for every layer. Hardening by hand is acceptable for a single server, not for a fleet.
- Drift measurement. Regular scanning compared against the reference, with a threshold above which a ticket is raised.
- Formal exceptions. Every deviation names the requirement, the reason, the compensating control, the review date and the approval.
- Local account password rotation. Every local administrator account with a unique, automatically changed password.
- Tiered administration model. Administrative accounts do not work on ordinary workstations, and the highest-privilege accounts work only from dedicated administrative endpoints.
- Multi-factor authentication for remote access. Across every channel: remote desktop, SSH, VPN and cloud administration consoles.
- Network devices. Management separated from production traffic, key-only access, no protocols carrying passwords in clear text, event logs forwarded to the monitoring system, and regular updates - especially for edge devices.
- Restore testing. Hardening lowers the probability of a problem but does not rule it out. Backups and the restore procedure have to be tested at least quarterly.
Frequently asked questions
- Is CIS level 2 excessive for a local authority?
For critical servers (domain controllers, file servers, backup) - no, L2 is appropriate. For workstations, apply it selectively (L2 for multi-factor authentication, disk encryption and endpoint protection; L1 for the rest). L2 applied wholesale to business users usually generates conflicts with spreadsheet macros and printers.
- How long does hardening a mid-sized organisation take?
From our experience: 40 to 80 hours of initial work (baseline, configuration as code, Active Directory hardening, golden image) and 8 to 16 hours a month of maintenance (drift correction, new systems, exception review). Without automation the maintenance effort doubles.
- Can hardening break applications?
Sometimes, particularly L2 and STIG. The strategy is:
- Harden a test environment before production.
- Log every application error that follows the hardening.
- Record formal exceptions for the conflicts identified, rather than rolling the whole baseline back.
- Is local administrator password rotation enough instead of privileged access management?
Unique, automatically rotated local administrator passwords are an important control. Privileged access management platforms such as CyberArk, BeyondTrust or Microsoft PIM can add just-in-time access, approval workflows, recorded sessions and application access without revealing credentials. Whether PAM is required depends on the risk assessment, architecture and applicable contractual or regulatory requirements; NIS2 and the Polish KSC act do not mandate a named PAM product.
- Do the CIS Benchmarks cover SCADA?
Partly. CIS has benchmarks for Windows Server, and SCADA servers are often Windows-based, but device-level OT security needs an industrial-control-system approach. IEC 62443 [4] is a widely used reference for that layer, although it is not universally mandatory unless a law, contract or sectoral requirement makes it so. In practice, CIS may support the IT and HMI layers, while IEC 62443 guides controls for PLCs, RTUs and industrial zones and conduits.
- Is group policy enough to harden Windows?
Group Policy and the Microsoft Security Compliance Toolkit can implement a substantial part of a Windows baseline, but there is no universal coverage percentage: it depends on the operating-system version, benchmark profile and estate architecture. Application control, endpoint protection, cloud-managed settings and parts of Active Directory hardening may require PowerShell DSC, modern device management or dedicated tooling.
- What is the difference between hardening and a security baseline?
A security baseline is a specific target configuration (for instance "CIS Windows 11 L1 build 12345"). Hardening is the process of implementing and maintaining that baseline. The baseline is a document; hardening is a practice.
- When does a CIS Benchmark appear for a newly released operating system?
Typically three to six months after the operating system ships. Check the CIS catalogue before assuming a benchmark for a given version already exists - for a freshly released system it usually does not. The interim strategy is:
- Use the CIS Benchmark for the previous version plus the Microsoft Security Compliance Toolkit (Microsoft security baselines for Windows appear faster, usually about a month after release).
- DISA STIG [2] - often on a faster release cycle than CIS.
- Map to NIST SP 800-53 Rev. 5 [3] controls as a fallback.
- Hardening broke Microsoft 365, Teams or OneDrive - what now?
A familiar conflict - CIS L2 for the browser and endpoint protection is sometimes too strict for Microsoft 365 web apps. The strategy:
- Microsoft security baselines instead of CIS L2 for consumer apps (Microsoft Security Compliance Toolkit). They are better matched to the native integration.
- Conditional access in the identity platform instead of hardening in the browser - enforcing multi-factor authentication, geofencing, blocking legacy auth (POP, IMAP, basic SMTP).
- A cloud access security broker plus data loss prevention to enforce information classification.
- Formal exceptions in the statement of applicability (ISO 27001:2022 clause 6.1.3 [12]) for the specific CIS controls that conflict, each with a documented compensating control.
- Where should Active Directory hardening start?
A practical order (from our projects and Microsoft's securing privileged access roadmap):
- Local administrator password rotation - in the first week. Without it, the remaining steps are security theatre.
- A tiered administration model (tier 0, 1, 2) - separating administrative accounts from workstations. NIST SP 800-53 Rev. 5 AC-6, AC-2 [3].
- Multi-factor authentication for every account with domain controller access (privileged access workstations, Windows Hello for Business, FIDO2 hardware keys).
- Disabling legacy protocols: NTLMv1, SMBv1, LM hashes, Kerberos DES.
- An AdminSDHolder review - check quarterly which accounts carry the
adminCountattribute, and remove from protected groups those that no longer belong. This is a separate mechanism from theProtected Usersgroup, with which it is often confused. - Active Directory ACL hardening - removing excessive
Authenticated Userspermissions on the DNS partitions and SYSVOL.
Consistent with the CIS Microsoft Active Directory Benchmark [1] and the Microsoft Security Compliance Toolkit. Without these six steps the path from the first compromised workstation to the domain controller is short, because there is no privilege boundary along it.
- Does CIS level 2 make sense for developer laptops with administrative rights?
Partly. Developers need elevation to work - installing tools, containers, a debugger. A workable compromise:
- CIS L1 as the base (disk encryption, endpoint protection, no SMBv1).
- L2 selectively: multi-factor authentication, pre-boot disk encryption, audit logging, blocked key export.
- Application control in audit-only mode for developers (logging, not blocking).
- Endpoint privilege management - just-in-time elevation instead of permanent administrative rights.
Consistent with NIST SP 800-53 Rev. 5 AC-6 [3] (least privilege) - rights matched to the role, but not permanent.
- Where should Docker and Kubernetes hardening start?
The CIS Docker Benchmark and CIS Kubernetes Benchmark [1] are the standard. The fastest value comes from:
- Image scanning in CI/CD (Trivy, Snyk, Grype) - no image with a critical vulnerability reaches production.
- Distroless images or at minimum a minimal base (Alpine, Wolfi) - a smaller attack surface.
- A non-root user in images (run as user > 0, with the NET_BIND_SERVICE capability if a port below 1024 is needed).
- A read-only root filesystem (
readOnlyRootFilesystem: true). - NetworkPolicy in Kubernetes - default deny plus explicit allow.
- Pod security standards (the restricted profile in production).
- Falco or Tetragon - runtime monitoring of container behaviour (see SOC).
Need consulting in this area?
A free 30-60 minute consultation. No obligations. We discuss needs, scale and a high-level timeline.
Related content
Other competence areas
- IT security audit
- Vulnerability scanning
- Penetration testing
- Email security audit
- KRI compliance audit
- KSC and NIS2 audit
- GDPR compliance audit
- Information security policy
- ISMS - information security management system
- Security awareness - onsite and online
- SOC 24/7 - monitoring and response
Compliance and regulation
Bibliography and sources
All cited sources are publicly available. ISO/IEC standards, IETF RFCs, EU directives and national legal acts link to the original documents.
- [1]guidelineCenter for Internet Security (2026). CIS Benchmarks. Zalecenia konfiguracyjne dla ponad 25 rodzin produktów - systemy operacyjne, chmura, sieć, bazy danych, kontenery. CIS · https://www.cisecurity.org/cis-benchmarks
- [2]guidelineDefense Information Systems Agency (DISA) (2024). Security Technical Implementation Guides (STIG). DISA Cyber Exchange · https://www.cyber.mil/stigs/
- [3]standardJoint Task Force (2020). NIST SP 800-53 Rev. 5: Security and Privacy Controls for Information Systems and Organizations. National Institute of Standards and Technology · DOI: 10.6028/NIST.SP.800-53r5
- [4]standardInternational Electrotechnical Commission (2018). IEC 62443 - Industrial communication networks - Network and system security. IEC · https://www.iec.ch/cyber-security
- [5]standardMITRE Corporation (2026). MITRE ATT&CK v19 (Enterprise, Mobile, ICS). Wydanie v19 z kwietnia 2026 r., aktualizacja v19.2 z 6 sierpnia 2026 r. MITRE · https://attack.mitre.org/
- [6]standardNational Institute of Standards and Technology (2024). NIST Cybersecurity Framework (CSF) 2.0. NIST CSWP 29, February 2024 · DOI: 10.6028/NIST.CSWP.29
- [7]standardScarfone, K., Jansen, W., Tracy, M. (2008). NIST SP 800-123: Guide to General Server Security. National Institute of Standards and Technology · DOI: 10.6028/NIST.SP.800-123
- [8]regulationParlament Europejski, Rada UE (2022). Dyrektywa (UE) 2022/2555 (NIS2) w sprawie środków na rzecz wysokiego wspólnego poziomu cyberbezpieczeństwa. Dziennik Urzędowy UE, L 333, 27.12.2022 · https://eur-lex.europa.eu/legal-content/PL/TXT/?uri=CELEX:32022L2555
- [9]regulationParlament Europejski, Rada UE (2022). Rozporządzenie (UE) 2022/2554 (DORA) w sprawie operacyjnej odporności cyfrowej sektora finansowego. Dziennik Urzędowy UE, L 333, 27.12.2022 · https://eur-lex.europa.eu/legal-content/PL/TXT/?uri=CELEX:32022R2554
- [10]regulationParlament Europejski, Rada UE (2016). Rozporządzenie (UE) 2016/679 (RODO) w sprawie ochrony osób fizycznych w związku z przetwarzaniem danych osobowych. Dziennik Urzędowy UE, L 119, 4.5.2016 · https://eur-lex.europa.eu/legal-content/PL/TXT/?uri=CELEX:32016R0679
- [11]regulationRada Ministrów RP (2024). Rozporządzenie Rady Ministrów z 21 maja 2024 r. w sprawie Krajowych Ram Interoperacyjności (KRI). Dz.U. 2024 poz. 773 · https://isap.sejm.gov.pl/isap.nsf/DocDetails.xsp?id=WDU20240000773
- [12]standardInternational Organization for Standardization (2022). ISO/IEC 27001:2022 - Information security, cybersecurity and privacy protection - Information security management systems - Requirements. ISO/IEC · https://www.iso.org/standard/27001
- [13]regulationParlament Europejski, Rada UE (2024). Rozporządzenie (UE) 2024/1689 (AI Act) ustanawiające zharmonizowane przepisy dotyczące sztucznej inteligencji. Dziennik Urzędowy UE, L seria, 12.7.2024 · https://eur-lex.europa.eu/legal-content/PL/TXT/?uri=CELEX:32024R1689
- [14]regulationSejm RP (2018). Ustawa z dnia 5 lipca 2018 r. o krajowym systemie cyberbezpieczeństwa. Dz.U. 2018 poz. 1560; tekst jednolity Dz.U. 2026 poz. 20, ze zmianami Dz.U. 2026 poz. 252 (transpozycja NIS2, w mocy od 3 kwietnia 2026 r.), poz. 815 i poz. 1003. Tekst ujednolicony Kancelarii Sejmu, stan na 18 sierpnia 2026 r. · https://api.sejm.gov.pl/eli/acts/DU/2018/1560/text/U/D20181560Lj.pdf