Back to library
Offensive Beginner Premium

List commands the current user can run with sudo — key privesc enumeration step

List commands the current user can run with sudo — key privesc enumeration step

Linux CLI / Privilege Escalation

Log in to save

Premium content locked

You can preview the command metadata. Full explanation, examples, and lab-style details are available to premium subscribers.

View premium options

Command

sudo -l

Syntax

sudo -l

Use case

First check during Linux privilege escalation. Misconfigured sudo rules are one of the most common paths to root in CTFs and real engagements.

Explanation

Lists sudo permissions for the current user: • Shows which commands can be run as root (or other users) • Look for: NOPASSWD entries (no password required) • Check GTFOBins for allowed binaries (vim, less, awk, tee, etc.) • Even partial sud...

linux macos sudo privesc gtfobins linux enumeration

Related

Offensive Intermediate Premium

Find all SUID binaries on the system for privilege escalation opportunities

Find all SUID binaries on the system for privilege escalation opportunities

find / -perm -4000 -type f 2>/dev/null
suid privesc gtfobins linux post-exploitation
Linux CLI / Privilege Escalation Open