Courseiva

CPENT Practice Question: Privilege Escalation Lateral Movement And Post Exploitation

You are assessing a Linux privilege escalation path. Which THREE techniques would allow you to escalate to root if you have write access to the /etc/passwd or /etc/shadow file?

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

Creating a new user entry with UID 0

If you can write to these files, you can create a new user with UID 0, change the root password, or add a backdoor account.

Answer analysis

Option-by-option breakdown

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

  • Creating a new user entry with UID 0

    Why this is correct

    UID 0 is reserved for the root account.

  • Adding a user to the /etc/sudoers file

    Why this is correct

    Grants the user the ability to run commands as root.

  • Changing the root password hash in /etc/shadow

    Why this is correct

    Allows access to the root account with a known password.

  • Modifying /etc/hosts

    Why it's wrong here

    This affects DNS resolution, not privilege status.

  • Running a kernel exploit using gcc

    Why it's wrong here

    This is an independent method, not related to file manipulation.

About these practice questions

This CPENT question is part of Courseiva's 274-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official EC-Council exam blueprint

This CPENT practice question is part of Courseiva's free EC-Council 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 CPENT exam.