How to Use LinEnum to Identify Potential Privilege Escalation Vectors

How to Use LinEnum to Identify Potential Privilege Escalation Vectors

The art of privilege escalation is a skill that any competent hacker should possess. It's an entire field unto itself, and while it's good to know how to perform the techniques involved manually, it's often more efficient to have a script automate the process. LinEnum is one such script that can be incredibly useful for privilege escalation on Linux systems.


Privilege escalation is the method of exploiting specific bugs or flaws to obtain higher permissions relative to the current user. Usually, it involves going from a user-level shell to a root shell on Unix or a system shell on Windows.


There are a vast number of techniques out there for successful privilege escalation, and it can easily take years to master them all. On Linux, there are several basic methods used to try to escalate privileges as outlined in g0tmi1k's famous blog post. A lot of the commands can be automated, though, and that's exactly what LinEnum does.


LinEnum is a simple bash script that performs common commands related to privilege escalation, saving time and allowing more effort to be put toward getting root. It's not a perfect solution since there might be false positives or things it misses, so it's always a good idea to verify items manually after running the script.


In this guide, we're using linenum identify potential privilege escalation vectors