> For the complete documentation index, see [llms.txt](https://hardening.khandal.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hardening.khandal.tech/system-hardening/operating-system.md). Agents can also search and read this documentation through its [MCP server](https://hardening.khandal.tech/~gitbook/mcp).

# Operating System

Operating system hardening guides, security baselines, and platform-specific configuration.

Operating system hardening focuses on reducing host attack surface, enforcing secure defaults, controlling privileges, and verifying security controls at the OS level.

This section organizes platform-specific guidance for workstation, server, and specialized environments. Each guide should be version-aware and distinguish baseline controls from optional, threat-model-dependent hardening.

## Platform documentation

| Platform    | Coverage                                                                                                                                                                                                      |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Windows** | Windows 10/11 and Windows Server security baselines, Microsoft Defender, Firewall, BitLocker, account and privilege controls, PowerShell security, attack surface reduction, logging, and application control |
| **Linux**   | Distribution-specific baselines, users and sudo, SSH, service and package management, host firewalling, kernel parameters, MAC frameworks (SELinux/AppArmor), auditing, and filesystem permissions            |
| **macOS**   | Platform security architecture, FileVault, Gatekeeper, XProtect, application permissions, System Integrity Protection, firewall, profiles, privacy controls, and unified logging                              |

## Hardening workflow

1. **Identify the environment.** Record OS edition, version/build, architecture, device role, installed software, and management constraints.
2. **Establish the baseline.** Inspect accounts, privileges, services, startup items, listening ports, firewall policy, encryption, update state, and security telemetry.
3. **Model failure paths.** Determine what should not be exposed, executable, trusted, persistent, or accessible.
4. **Apply proportionate controls.** Remove unnecessary functionality and enforce least privilege, secure authentication, encryption, application restrictions, and host-level defenses.
5. **Validate behavior.** Verify effective configuration and expected security events; test compatibility and operational impact.
6. **Record recovery details.** Document rollback steps, recovery access, and configuration backups before high-impact changes.

## Documentation requirements

Every platform guide should include:

* **Scope:** Intended system role and threat model.
* **Supported versions:** Exact OS editions, releases, and builds where relevant.
* **Baseline:** Initial state and the security settings being assessed.
* **Implementation:** Exact commands, configuration paths, policies, and parameter explanations.
* **Risk and trade-offs:** Compatibility, performance, usability, and recovery implications.
* **Validation:** Evidence and commands that confirm the control is effective.
* **Rollback:** A safe method to reverse the change.
* **References:** Prefer vendor documentation, recognized security benchmarks, and authoritative advisories.

## Baselines and references

Use current, platform-appropriate security baselines rather than applying settings indiscriminately. Relevant starting points include:

* [Microsoft Security Compliance Toolkit](https://learn.microsoft.com/en-us/windows/security/operating-system-security/device-management/windows-security-configuration-framework/security-compliance-toolkit-10)
* [CIS Benchmarks](https://www.cisecurity.org/cis-benchmarks)
* [DISA Security Technical Implementation Guides (STIGs)](https://www.stigviewer.com/stigs)
* [Apple Platform Security](https://support.apple.com/guide/security/welcome/web)

{% hint style="warning" %}
Do not apply hardening commands blindly across systems. A workstation, server, forensic environment, and development machine have different operational requirements. Test changes, preserve recovery access, and verify the resulting state.
{% endhint %}

## Planned structure

Platform-specific child pages and procedures can be added beneath this page:

* **Windows** — workstation and server hardening.
* **Linux** — distribution and service hardening.
* **macOS** — Apple platform security configuration.
* **Cross-platform** — common host security controls, validation, and maintenance.

The goal is a small, maintainable baseline with measurable security outcomes—not a maximal collection of settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hardening.khandal.tech/system-hardening/operating-system.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
