CPENT Practice Question: Privilege Escalation Lateral Movement And Post Exploitation
You are performing a Linux privilege escalation assessment and identify a binary with the SUID bit set that executes system commands using relative paths. How do you exploit this?
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
✓
Create a malicious script named after the command and prepend its directory to the PATH.
If a SUID binary calls a command without an absolute path, you can modify the PATH environment variable to point to a malicious version of that command.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Create a malicious script named after the command and prepend its directory to the PATH.
Why this is correct
By changing the PATH, the binary executes your malicious script with the privileges of the owner.
- ✗
Modify /etc/ld.so.preload to inject a malicious library.
Why it's wrong here
This requires root access to write to the file.
- ✗
Exploit a buffer overflow in the binary using a NOP sled.
Why it's wrong here
While possible, modifying PATH is the standard configuration-based escalation path for relative path vulnerabilities.
- ✗
Use the --inject flag on the binary to force command execution.
Why it's wrong here
Standard SUID binaries do not support an injection flag.
- ✗
null
Why it's wrong here
This is a standard Linux path manipulation technique.
About these practice questions
Courseiva writes every CPENT question from scratch — 276 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 →
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.