Soru

Zorluk: ZorMitigation Strategies and Enterprise Hardening Practices

A security audit reveals that several non-interactive service accounts on Linux production application servers have interactive login shells assigned in `/etc/passwd`. Additionally, auditors found that world-writable temporary storage locations (`/tmp` and `/var/tmp`) are mounted on the main filesystem partition without restrictive execution flags, allowing local users to execute binaries placed in these directories. Which of the following technical mitigation steps provides the most effective hardening baseline to directly address both audit findings?

  1. Mount temporary partitions using the `noexec` mount option and change non-interactive service account shells to `/sbin/nologin`.Cevap
  2. B
    Deploy a perimeter Web Application Firewall (WAF) rule to strip shell characters from incoming HTTP requests directed at service endpoints.
  3. C
    Configure an inline deception honeypot directory within `/tmp` to capture and automatically isolate unauthorized executable files.
  4. D
    Change ownership of `/tmp` to the root account while leaving standard read, write, and execute permission bits unchanged.

Cevap

Mount temporary partitions using the `noexec` mount option and change non-interactive service account shells to `/sbin/nologin`.
Mounting temporary partitions with the `noexec` flag disables the kernel execution bit for all files residing in those mount points, neutralising malware staging in shared folders like `/tmp`. Updating service account login shells to `/sbin/nologin` prevents adversaries from spawning interactive command shells if a service account context is compromised.

Adım Adım Çözüm

1
Analyze the first audit finding regarding execution of binaries from temporary locations.
Identify that mounting `/tmp` and `/var/tmp` on dedicated partitions with the `noexec` flag prevents the OS kernel from executing any binaries staged in those locations.
Attackers frequently stage and run privilege escalation scripts from world-writable temporary directories.
2
Analyze the second audit finding regarding non-interactive service accounts.
Identify that updating default shells in `/etc/passwd` to non-executable binaries such as `/sbin/nologin` or `/bin/false` prevents service accounts from obtaining interactive TTY sessions.
Daemon accounts (e.g., `www-data`, `nobody`) require system access to run processes but should never permit interactive shell access.
3
Select the host baseline control that addresses both findings directly.
Combining `noexec` partition flags with `/sbin/nologin` shell configuration mitigates both vulnerabilities at the OS level.
This baseline implementation enforces least privilege and attack surface reduction directly on the host.

Anahtar Kavram

Host Hardening Baselines and Attack Surface Reduction
Bu soruyu puanla