Courseiva
easyMultiple SelectObjective-mapped

CAS-004 Is hardening a Linux server Practice Question

A security engineer is hardening a Linux server. Which TWO of the following are best practices for preventing privilege escalation attacks?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Apply kernel hardening with sysctl

Options B and C are correct. Kernel hardening with sysctl (B) reduces the attack surface by disabling unnecessary kernel features and enforcing security settings (e.g., restricting dmesg, kernel pointer access). SELinux in enforcing mode (C) provides mandatory access control, limiting process capabilities and confining exploits even if a service is compromised. Option A is incorrect because disabling all non-root user accounts is impractical, violates the principle of least privilege, and does not directly prevent privilege escalation. Option D is incorrect because removing the SUID bit from all binaries is too broad; some SUID binaries are essential (e.g., sudo, passwd) and removing them breaks functionality without necessarily preventing escalation. Option E is incorrect; while restricting cron jobs to root may limit cron-based attacks, it is not a primary best practice for preventing privilege escalation and can break legitimate scheduled tasks.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Disable all user accounts except root

    Why it's wrong here

    Disabling all non-root accounts is impractical and violates least privilege.

  • Apply kernel hardening with sysctl

    Why this is correct

    Kernel hardening parameters (e.g., disabling IP forwarding) reduce attack surface.

  • Enable SELinux in enforcing mode

    Why this is correct

    SELinux provides mandatory access control, limiting the impact of privilege escalation.

  • Remove the SUID bit from all binaries

    Why it's wrong here

    Removing all SUID bits may break system functions; it is too restrictive.

  • Restrict cron jobs to root only

    Why it's wrong here

    This does not directly prevent privilege escalation and may limit automation.

Quick reference

Access Control Model Comparison

ModelAcronymWho Controls Access?Best For
Discretionary Access ControlDACResource ownerSmall teams, file shares
Mandatory Access ControlMACSystem / security labelsClassified govt / military
Role-Based Access ControlRBACAdministrator (via roles)Enterprise environments
Attribute-Based Access ControlABACPolicy engine (user + resource attributes)Fine-grained, dynamic policies
Rule-Based Access ControlRuBACSystem rules / ACLsFirewall rules, network ACLs

About these practice questions

Courseiva writes every CAS-005 question from scratch — 968 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CAS-005 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CAS-005 exam.