Linux Smart Enumeration
Table of Contents
Linux Smart Enumeration (LSE) is an automated tool used in the
Post Exploitation phase of a
cybersecurity assessment. After an attacker has gained initial
low-privileged access to a Linux machine, running LSE is one of the
first steps to rapidly discover how to gain root access. Its main
differentiator from LinPEAS is tunable verbosity — you control how
noisy and thorough the scan is, rather than getting one fixed level
of output every time.
Related: Linux Privilege Escalation LinPEAS GTFOBins [[Denote query for ‘20260718T113500’]]
How LSE Works
LSE is written entirely in Bash, meaning it does not rely on external dependencies and can run on nearly any Linux distribution with minimal preparation. It works by executing a comprehensive series of checks against the local system, focusing on weaknesses that can be exploited for privilege escalation:
- System Information: Gathers OS details, kernel version, installed software, and network configuration.
- User and Groups: Lists all users, their home directories, and the groups they belong to, often highlighting high-value accounts.
- Permissions and Configuration: This is LSE's main focus. It searches for:
- Writable files in sensitive locations (e.g., cron jobs, system binaries).
- Misconfigured SUID/SGID binaries (often cross-referenced with tools like GTFOBins).
- Insecure file permissions on
/etc/passwdor/etc/shadow.
- Credential Discovery: Searches for cleartext passwords and private keys stored in configuration files (e.g., SSH keys, database credentials in web application files).
- Running Services: Identifies services that may be running with elevated permissions or are locally exploitable.
Running LSE
# Level 0 — quickest, least noisy pass, high-confidence findings only ./lse.sh -l 0 # Level 1 — more thorough, default working level for most cases ./lse.sh -l 1 # Level 2 — deep, noisy scan; use when levels 0/1 come back empty ./lse.sh -l 2 # Save output to a file for later review, particularly useful over # a slow or unstable shell ./lse.sh -l 1 -i | tee lse_output.txt # Select a specific check category rather than running everything ./lse.sh -s # section-select mode
The -i flag suppresses color codes — worth using when piping
output through a slow connection or into a file, since raw ANSI
color codes can otherwise clutter a saved report.
Output and Use
LSE's output is structured and color-coded. It uses different
levels of enumeration (-l 0 to -l 2) to control the verbosity
and intrusiveness of the scan, allowing the user to choose between
a fast, stealthy check and a deep, noisy scan.
The output provides a score or color-coded alert (often red for high-risk findings) next to each vulnerability found, immediately prioritizing the most viable path to Linux Privilege Escalation.
The script is a key aid in the local enumeration phase, bridging the gap between a low-privileged shell and finding the exploit necessary to gain a fully elevated session.
Tips
- Start at
-l 0rather than defaulting to the deepest level — a quick high-confidence pass often finds the answer immediately, and escalating verbosity only when needed keeps output manageable and reduces noise on a slow shell - See the Linux Privilege Escalation Tools comparison note for when to reach for LSE specifically over LinPEAS or LinEnum — the short version: LSE's tunable verbosity makes it the better choice when you want to start quiet and escalate only as needed, rather than getting a full dump immediately
- Cross-reference any SUID/SGID findings against GTFOBins immediately — LSE tells you a binary is misconfigured, GTFOBins tells you the actual command to exploit it