Courseiva
Enumeration and System HackingmediumMultiple ChoiceObjective-mapped

CEH Enumeration and System Hacking Practice Question

During a penetration test, a tester gains a low-privilege shell on a Linux server. The command `sudo -l` reveals that the user can run `/usr/bin/find` as root. Which technique can the tester use to escalate privileges?

⚠ Common exam trap

Watch out — candidates often think the SUID bit (Option A) is the only way to escalate with find, but the question explicitly states the user has sudo access to find, making the `-exec` flag the correct and immediate vector.

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

Use find with the -exec flag to spawn a shell

The `sudo -l` output shows the user can run `/usr/bin/find` as root without a password. The `find` command has a built-in `-exec` flag that allows executing arbitrary commands on each found file. By running `sudo find / -exec /bin/sh \;`, the tester can spawn a root shell, escalating privileges because the command runs with sudo (root) privileges.

Answer analysis

Option-by-option breakdown

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

  • Abuse the SUID bit on find

    Why it's wrong here

    While a SUID (Set User ID) bit on the `find` binary would indeed allow it to run with elevated privileges, `find` is not typically configured with the SUID bit by default on most modern Linux systems. Therefore, simply "abusing" a non-existent SUID bit is not a viable or common privilege escalation path in a standard low-privilege shell scenario. The technique described in the correct answer is what one would use *if* `find` were SUID, but the SUID bit itself isn't the *method* of exploitation.

  • Use find with the -exec flag to spawn a shell

    Why this is correct

    This is a well-known and highly effective privilege escalation vector. If the `find` binary has the SUID (Set User ID) bit set, or if a low-privilege user can execute `find` with `sudo` privileges without a password, the `-exec` flag can be leveraged to execute arbitrary commands as the owner of the `find` binary (typically root). For example, `find . -exec /bin/sh -p \;` would spawn a privileged shell, effectively escalating privileges from the low-privilege shell.

  • Exploit a kernel vulnerability

    Why it's wrong here

    Exploiting a kernel vulnerability for privilege escalation is a valid, but highly specific and complex, method. It typically requires identifying a specific, unpatched Common Vulnerabilities and Exposures (CVE) in the operating system's kernel, often involving custom exploit code. This approach is far less common and generally more difficult than leveraging misconfigurations or features of userland binaries like `find` during a standard penetration test.

  • Run a buffer overflow on the find binary

    Why it's wrong here

    Performing a buffer overflow on the `find` binary would necessitate discovering a specific memory corruption vulnerability within its code that allows for arbitrary code execution. While buffer overflows can lead to privilege escalation, standard system utilities like `find` are generally mature, well-audited, and hardened against such exploits. This method is highly unlikely to be a viable or practical approach in a typical penetration test scenario compared to leveraging existing functionality or misconfigurations.

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 →

How Courseiva writes practice questions · Editorial policy

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.