Courseiva

PEN-200 · topic practice

Linux Privilege Escalation practice questions

Linux Privilege Escalation on PEN-200 covers moving from a low-privileged shell to root by abusing misconfigurations rather than exploits alone. You enumerate sudo rights, SUID/SGID binaries, cron jobs, writable files, capabilities, and kernel versions, then pick the least disruptive path and prove root access with a reliable, repeatable exploit.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: Linux Privilege Escalation

What the exam tests

What to know about Linux Privilege Escalation

Enumerate sudo -l, SUID/SGID files, cron jobs, writable paths, and kernel version, then exploit the simplest misconfiguration to gain root. The key is verifying the exact command context and permissions before acting so the escalation is reliable and does not destabilize the host.

Reading sudo -l output and abusing NOPASSWD entries, wildcards, and GTFOBins-style command escapes

Finding SUID/SGID binaries and exploiting relative path or PATH hijacking in system() calls

Enumerating root cron jobs and writable scripts or directories they execute

Identifying kernel and service versions, then selecting a matching local privilege escalation exploit

Watch out for

Common Linux Privilege Escalation exam traps

  • ▸Running a kernel exploit first instead of checking sudo, SUID, and cron misconfigurations that are safer and more reliable
  • ▸Missing that a SUID binary calls a command without an absolute path, so PATH hijacking is possible
  • ▸Editing a root cron script without preserving permissions or triggering the job, or breaking the target so it crashes

Practice set

Linux Privilege Escalation questions

20 questions · select your answer, then reveal the explanation

You are performing enumeration on a Linux host. Which TWO of the following methods are effective for discovering potentially exploitable Cron jobs that run with elevated privileges?

You find a binary that uses the 'system()' function to call an absolute path, such as '/usr/bin/whois'. The binary is SUID root. How could you potentially exploit this if the system is not vulnerable to PATH manipulation?

During your post-exploitation phase, you want to identify writable configuration files or directories that could lead to privilege escalation. Which THREE of the following locations should you prioritize checking?

You discover a world-writable file that is being read by a root-owned service. What is the most reliable way to escalate privileges in this scenario?

You have gained a low-privileged shell on a Linux system and find a custom binary in /opt/scripts owned by root with the SUID bit set. The binary executes a system command using a relative path. Which method is most effective for gaining root privileges?

You find a user has sudo privileges to run a specific binary without a password. Which TWO of the following should you investigate to escalate privileges?

Refer to the exhibit. You are investigating the /usr/local/bin/backup binary. It performs a system-wide backup by executing 'tar' without an absolute path. How can you leverage this to gain root?

Exhibit

id
uid=1000(user) gid=1000(user) groups=1000(user),27(sudo)
ls -l /usr/local/bin/backup
-rwsr-xr-x 1 root root 15440 Sep 12 10:00 /usr/local/bin/backup

An ethical hacker discovers that a custom binary has the SUID permission set and is owned by root. Running strings on the binary reveals that it executes the system command 'service networking restart' without using an absolute path. Which technique can the hacker leverage to escalate privileges?

An analyst is reviewing a Linux system for potential kernel vulnerabilities and local privilege escalation vectors. Which TWO of the following misconfigurations or components represent viable methods for achieving local privilege escalation?

Refer to the exhibit. A penetration tester analyzing a Linux host finds the SUID binary shown in the exhibit. Running 'ltrace /usr/local/bin/check_logs' reveals that the program invokes the C library function system("tail -n 10 /var/log/syslog"). How can this SUID binary be exploited?

Exhibit

uid=1001(developer) gid=1001(developer) groups=1001(developer)
-rwsr-xr-x 1 root root 14280 Mar 12 14:00 /usr/local/bin/check_logs

During a post-exploitation enumeration phase on a Linux target, an assessor investigates scheduled tasks and background automation. Which TWO locations or mechanisms should be examined for potential privilege escalation vectors?

You have a low-privileged shell on a Linux host. During enumeration, you notice that the /etc/passwd file is writable by your user. You want to obtain root access. Which of the following is the most reliable method to escalate privileges using this misconfiguration?

Question 13mediummultiple choice
Study the full Python automation breakdown →

During a penetration test on a Linux host, you obtain a low-privileged shell as user 'www-data'. You run the command 'getcap -r / 2>/dev/null' and notice that the Python 3 interpreter has the capability 'cap_setuid+ep' assigned. Which of the following commands will most directly leverage this capability to escalate privileges to root?

During a penetration test, you obtain a low-privileged shell on a Linux host. You run `find / -perm -4000 -type f 2>/dev/null` and discover that `/usr/bin/passwd` is SUID root. You also notice that the system has an outdated version of `sudo` (1.8.16). Which of the following actions is MOST likely to yield privilege escalation?

You have obtained a low-privileged shell on a Linux system during a penetration test. You want to enumerate scheduled tasks that might run with higher privileges. Which TWO of the following commands or techniques are most effective for discovering such tasks? (Choose two.)

An assessor gains a low-privileged shell on a Linux host and wants to escalate privileges by exploiting a misconfigured SUID binary. Which TWO of the following conditions would MOST likely allow privilege escalation? (Choose two.)

During a post-exploitation assessment on a Linux host, you discover that the current user can run `/usr/bin/find` as root without a password, as shown in the sudoers output: `(root) NOPASSWD: /usr/bin/find`. Which command will most reliably escalate to a root shell?

You are enumerating a Linux system and find that the `sudo` version is 1.8.25. You also notice that the user `www-data` has sudo privileges to run `/usr/bin/awk` as root without a password. Which of the following commands will successfully spawn a root shell?

You have a low-privileged shell on a Linux system and discover that the /etc/passwd file is writable by your user. Which of the following methods is most reliable for escalating to root by modifying /etc/passwd?

You have obtained a low-privileged shell on a Linux system. You run `sudo -l` and see the following output: `(ALL) NOPASSWD: /usr/bin/vi`. Which command will allow you to escalate to root?

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Linux Privilege Escalation sessions

Start a Linux Privilege Escalation only practice session

Every question in these sessions is drawn from the Linux Privilege Escalation domain — nothing else.

Related practice questions

Related PEN-200 topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the PEN-200 exam test about Linux Privilege Escalation?
Enumerate sudo -l, SUID/SGID files, cron jobs, writable paths, and kernel version, then exploit the simplest misconfiguration to gain root. The key is verifying the exact command context and permissions before acting so the escalation is reliable and does not destabilize the host.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Linux Privilege Escalation questions in a focused session?
Yes — the session launcher on this page draws every question from the Linux Privilege Escalation domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other PEN-200 topics?
Use the topic links above to move to related areas, or go back to the PEN-200 question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the PEN-200 exam covers. They are not copied from any real exam or dump site.