CEH Enumeration and System Hacking Practice Question
A Linux system has a script named 'backup' owned by root with the SUID bit set and world-executable permissions. A standard user executes the script and discovers it runs a command that reads /etc/shadow and writes output to a world-readable file. What is the most likely intended exploitation path?
⚠ Common exam trap
Many candidates confuse SUID with SGID or think LD_PRELOAD works on scripts, but the key is recognizing that SUID on a root-owned executable enables privilege escalation to read /etc/shadow, while LD_PRELOAD only applies to dynamically linked binaries, not scripts.
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
✓
SUID abuse to read sensitive files
The SUID bit on the 'backup' script, owned by root and world-executable, allows any user to execute it with root privileges. If the script reads /etc/shadow (which is normally root-only) and writes the output to a world-readable file, an attacker can exploit this to exfiltrate password hashes. This is a classic SUID abuse scenario where a privileged binary or script is used to access sensitive files.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
GUID abuse
Why it's wrong here
GUID (group ID) would grant group privileges, not root. The SUID bit is set for the owner (root).
- ✗
LD_PRELOAD injection
Why it's wrong here
LD_PRELOAD could be used to hijack libraries, but the direct attack here is via SUID.
- ✓
SUID abuse to read sensitive files
Why this is correct
The SUID bit makes the script run as root, so it can read /etc/shadow. Users can exploit this to get hashes.
- ✗
Token impersonation
Why it's wrong here
Token impersonation is a Windows technique, not Linux.
Go deeper
Related to this question
About these practice questions
One of 870 original CEH practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CEH 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 CEH exam.