Linux Security Auditing & Enumeration

LinPEAS: Complete Linux Privilege Escalation & Security Auditing Guide

LinPEAS is a script that enumerates a Linux, Unix or macOS host and highlights possible privilege-escalation paths. This independent guide explains what it is, how to run it safely, what its output means, and the Linux concepts behind every check.

Open-source tool Linux · Unix · macOS PEASS-ng project Educational & authorised use

What is LinPEAS?#

Quick answer

LinPEAS (Linux Privilege Escalation Awesome Script) is an open-source enumeration script from the PEASS-ng project. Run on a Linux, Unix or macOS host, it collects system, user, permission, service and file information, then highlights configurations that may allow privilege escalation. It reports; it does not exploit.

It is maintained by Carlos Polop and contributors and is one of the most widely used tools for post-access enumeration in authorised penetration testing, CTFs and Linux security auditing. A highlighted result is a lead to investigate, not proof of a vulnerability — see how LinPEAS works and how to read its output.

Coverage

What LinPEAS checks#

LinPEAS groups its work into sections. Each card links to a deeper explanation of the concept and how LinPEAS reports it.

System enumeration

OS, kernel, sudo version, PATH, mounts, protections and known-exploit registry checks.

Users & groups

Accounts, UID 0 users, group memberships, login history and console users.

Kernel information

Kernel version and modules, plus checks against a bundled exploit registry.

Cloud checks

Metadata and credential checks for AWS, GCP, Azure, DO, Alibaba, IBM and Tencent.

Interesting files

Backups, databases, hidden files, writable logs and unexpected files.

Software enumeration

Installed software and app-specific configuration checks across 100+ applications.

Process

How LinPEAS works#

LinPEAS runs a fixed sequence of read-only checks, then colours the results by how interesting they are. The final and most important step is yours: manual verification.

Read the full walkthrough →

Get started

Install & run in one line#

LinPEAS is a script, not a package — there is no graphical installer. The most auditable approach is to download it, read it, then run it. The one-liner below is the quickest path for authorised labs; see the installation guide for safer patterns and offline use.

curl -L https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh -o linpeas.sh
chmod +x linpeas.sh
./linpeas.sh | tee linpeas.out
Review before you run

Piping a remote script straight into a shell (curl … | sh) runs code you have not read. Prefer download → review → run, especially outside a lab. A default run can also make outbound connections — see is LinPEAS safe?

Reading results

Understanding the output colours#

Colour marks how much attention a line deserves — not a verdict. In particular, green means “commonly seen” (matched by name), not “confirmed safe.”

ColourRuntime legendHow to read it
Red/Yellow95% a privilege-escalation vector (runtime legend). The README phrases this as 99%.Highest-interest finding. Investigate first, then manually verify.
RedYou should take a look into it.Suspicious configuration that may lead to escalation. Needs manual review.
GreenCommon things (users, groups, SUID/SGID, mounts, .sh scripts, cronjobs).Matched as commonly-seen BY NAME, not verified as safe by content. Green does not mean secure.
Light CyanUsers with console (shell).Accounts that can log in interactively.
BlueUsers without console and mounted devices.Informational grouping.
Light MagentaYour username.Highlights the current user in the output.

Full colour guide → How to read the output →

Reference

Sections you can target with -o#

You do not have to run everything. The -o flag limits LinPEAS to specific sections for faster, quieter audits. Each section is tagged with MITRE ATT&CK techniques.

-o nameSectionChecksATT&CKWhat it covers
system_informationSystem Information23T1082, T1068, T1518.001OS and kernel details, sudo version, PATH, mounts and disks, environment, kernel modules, protections (AppArmor/SELinux/etc.), and known-kernel-exploit registry checks.
containerContainer7T1611, T1613Detects Docker/LXC/containerd context, mounted service tokens, writable bind mounts, and known container-breakout conditions.
cloudCloud13T1552.005, T1580Detects and enumerates AWS (EC2/ECS/Lambda/CodeBuild), GCP, Azure (VM/App/Automation), DigitalOcean, Alibaba, IBM and Tencent metadata and credentials.
procs_crons_timers_srvcs_socketsProcesses, Crons, Timers, Services, Sockets31T1053.003, T1543.002, T1057Running processes, credentials in process memory, cron jobs and frequent-job monitoring, systemd services/timers and PATH, sockets and D-Bus.
network_informationNetwork Information17T1016, T1049Interfaces, hosts/DNS, neighbours, listening ports, firewall rules, and internet-access probes.
users_informationUsers Information23T1033, T1548.003, T1087.001Current user, sudo/sudoers and sudo tokens, pkexec/polkit, doas, UID 0 accounts, groups, login history, and optional su testing.
software_informationSoftware Information131T1552.001, T1587.001Useful software and compilers, and configuration/credential analysis for a very large set of applications (databases, web servers, CI/CD, mail, VPN, SSH, cloud CLIs, and more).
interesting_perms_filesFiles with Interesting Permissions16T1548.001, T1574.010SUID/SGID binaries, file capabilities, ACLs, ld.so misconfigurations, writable init/service files, and writable root-owned executables.
interesting_filesOther Interesting Files36T1083, T1552.001Scripts in PATH, unexpected files, writable logs, backups, databases, hidden files, and password/credential searches across the filesystem.
api_keys_regexAPI Keys Regex4T1552.001Regex searches for hashed passwords, raw hashes, API keys and other secrets. Runs only with -r.

All flags → Command builder →

Who uses it

Common use cases#

Authorised pentesting

Speed up post-access enumeration on engagements you are contracted to test.

CTF & training labs

Find footholds quickly on Hack The Box, TryHackMe and similar legal labs.

System hardening

Audit your own servers to find and fix misconfigurations before attackers do.

Learning Linux security

Use the output as a map of the Linux concepts worth understanding.

Comparison

LinPEAS vs other enumeration tools#

Summary only. Full breakdowns on the comparison pages.
ToolMaintainedScopeContainersCloudOutput
LinPEASActively (frequent releases)Linux/Unix/macOSYesYesColour-coded, ATT&CK-tagged, parsers to JSON/HTML/PDF
LinEnumNo (branch last updated 2020)LinuxMinimalNoPlain text
linux-smart-enumerationYesLinuxSomeNoVerbosity levels 0/1/2

vs LinEnum → vs LSE → All alternatives →

New here?

Beginner learning path#

LinPEAS output makes far more sense once you understand the concepts it reports. Follow this order, then come back and read a real scan.

  1. Linux file permissions and UID 0
  2. sudo, SUID and SGID
  3. Linux capabilities
  4. cron and systemd
  5. environment variables and PATH
  6. containers and namespaces
  7. Interpreting LinPEAS output

Start the learning path →

Safety & authorised use

A default LinPEAS run can contact external services (a HackTricks host-checker request and internet-connectivity probes) and, in this build, the documented -n flag does not actually disable them. Only run LinPEAS on systems you own or are authorised to test, and account for outbound traffic in your rules of engagement. Details: is LinPEAS safe?

Questions

LinPEAS FAQ#

Is LinPEAS free and open-source?

Yes. LinPEAS is part of the open-source PEASS-ng project, released under the GNU GPL (v2 or later, with clarifications in the repository LICENSE). You can read the source before running it.

Does LinPEAS require root?

No. LinPEAS is designed to run as a normal user to find escalation paths. Running it as root changes some behaviour and skips the checks that look for ways to become root.

Does LinPEAS exploit vulnerabilities?

No. LinPEAS enumerates and highlights; it does not exploit. Confirming and exploiting a finding is a separate, manual step you perform only where authorised.

Is a red or red/yellow finding always a vulnerability?

No. Colour indicates how interesting a line is. Red/yellow means “very likely worth your time,” not “confirmed exploitable.” Every finding needs manual validation.

Is this the official LinPEAS website?

No. This is an independent educational resource. The official project lives at github.com/peass-ng/PEASS-ng.

All FAQs →

Start with the fundamentals

Read what LinPEAS is, install it correctly, then learn to interpret every colour and section with confidence.