DedSec Project

Host Security Assessment and System Hardening — DedSec Project

Host Security Assessment and System Hardening Host security assessment examines how an operating system protects identities, privileges, processes, services, files, secrets, persistence…

Host security assessment examines how an operating system protects identities, privileges, processes, services, files, secrets, persistence mechanisms, and telemetry. The goal is to find weak trust boundaries and harden them—not to hide activity or disable evidence.

Authorized-use boundary: Perform host testing only on systems you administer or are explicitly authorized to assess. Do not deploy persistence, credential stealers, keyloggers, hidden backdoors, or anti-forensics techniques. Use harmless test accounts and disposable VMs for exercises.

Learning objectives

Identity and local accounts

Start with an inventory of human users, service accounts, groups, administrative roles, and authentication methods. Ask whether every identity has a current owner and a valid business purpose.

High-value checks include:

Authentication proves identity; group membership, sudoers policy, access tokens, ACLs, capabilities, and service configuration determine authorization.

Privilege boundaries

Privilege escalation risk appears when a less-trusted identity can influence something executed by a more-trusted identity. Common classes include:

In an assessment, prefer permission and configuration review over exploitation. If a proof is needed, use a harmless marker file or synthetic action in a disposable lab.

Services and exposed software

Inventory listening services and installed software. For each service, record owner, purpose, network exposure, execution identity, configuration location, update source, and relevant logs. Disable or remove services that have no operational purpose rather than merely blocking them at one network layer.

Secrets and credential material

Credentials can exist in configuration files, environment variables, shell history, browser storage, CI files, source repositories, password managers, OS credential stores, and process memory. Security review should minimize secret lifetime and access, not attempt to dump real credentials.

Use synthetic secrets for labs. If a real secret is accidentally exposed during an authorized assessment, stop unnecessary handling, notify the owner, and rotate/revoke it according to the incident process.

Persistence as a defensive concept

Attackers may attempt to survive restarts or credential changes through services, scheduled tasks, startup items, browser extensions, login hooks, management tools, or modified configuration. Defenders should establish a known-good baseline and monitor unexpected changes.

A safe lab can create a clearly named benign scheduled task that writes a timestamp to a temporary file, verify the expected telemetry, then remove it. The learning objective is to understand how legitimate persistence appears in logs—not to create stealthy persistence.

Logging and anti-forensics detection

Security logs are evidence. Do not clear, truncate, falsify, or disable them to conceal testing. Instead:

During a lab, you can safely test detection by creating a benign event and confirming it appears in the expected local and centralized logs.

File and permission review

On Linux, inspect ownership and mode bits; on Windows, inspect ACLs and inherited permissions. Focus on security-relevant paths such as service configuration, executable directories, scheduled-task definitions, sensitive data, key material, and administrative tooling.

Avoid “fixing” permission problems by applying broad recursive write access. Correct the specific owner/group/ACL that should have authority.

Patch and configuration baselines

A host baseline should include:

Evidence-driven assessment workflow

  1. Record system/version and assessment scope.
  2. Collect read-only inventory first.
  3. Map privileged identities and execution boundaries.
  4. Identify writable or user-influenced inputs to privileged components.
  5. Validate one hypothesis at a time with a harmless test.
  6. Correlate host logs, endpoint telemetry, and configuration.
  7. Restore the baseline and verify remediation.

Common mistakes

Safe lab

Create two local users in a disposable VM: a standard user and an administrator. Create one directory writable only by the administrator and another intended for both. Verify permissions from each account, create a benign scheduled task or service under the intended identity, generate a normal event, and confirm the event is logged. Remove the test object and record the before/after state.

Knowledge check

  1. What makes a writable file a privilege-escalation concern?
  2. Why should logging be centralized?
  3. How can persistence be studied without deploying a backdoor?
  4. What is the difference between an authentication weakness and an authorization weakness on a host?
  5. Why should a hardening change include a rollback plan?

Guided study workflow

Use the shared Study Method. The mastery goal is to identify one real privilege boundary in a lab host, collect evidence, harden it, and prove the control changed the result.

Continue with

Recommended next modules: 12, 32, 33, 73, 74.