GO KALI FREE

LinPEAS

Post Exploitation

Intermediatelow risk

LinPEAS is a script that searches for possible paths to escalate privileges on Linux hosts. It highlights findings using colors to signal potential misconfigurations or vulnerabilities.

Installation

curl -L https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh -o linpeas.sh

Basic Syntax

sh linpeas.sh [options]

Quick Facts

Full Name
LinPEAS - Linux PEASS
License
MIT
Language
Bash
Interface
CLI
Category
Privilege Escalation
Requires
Shell Access on Target

Tool Overview

LinPEAS is the premier privilege escalation enumeration script for Linux systems. It performs hundreds of checks to identify misconfigurations and vulnerabilities that can be exploited to elevate from a low-privileged user to root.

With color-coded output, zero dependencies, and regular updates reflecting the latest privilege escalation techniques, LinPEAS is an essential tool for any Linux post-exploitation assessment.

Common Commands

./linpeas.shRun the default set of local privilege-escalation checks
curl -L https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh | shDownload the latest release and run it entirely in memory
wget https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh -O linpeas.shDownload the latest linpeas.sh release to disk
chmod +x linpeas.sh && ./linpeas.shMake the script executable and run it
sh linpeas.sh -hShow the help text and available options
./linpeas.sh -aRun all checks including su brute-force and process monitoring (noisy)
./linpeas.sh -sStealth/superfast mode: skip slow checks and avoid writing files
./linpeas.sh -ePerform extra, more thorough enumeration
./linpeas.sh -P '<PASS>'Supply a password for sudo -l and to brute-force other users
./linpeas.sh -o SysI,Net,UsrIOnly run the selected comma-separated check groups
./linpeas.sh -qSuppress the banner
./linpeas.sh -NDisable colored (ANSI) output
./linpeas.sh -rSkip the privesc detection regexes to run faster
./linpeas.sh -LForce-run the linux-exploit-suggester checks
./linpeas.sh -DEnable debug mode for troubleshooting
./linpeas.sh -d 192.168.1.0/24Discover live hosts on the network using ping/fping
./linpeas.sh -d 192.168.1.0/24 -p 22,80,443Discover hosts by scanning specific TCP ports
./linpeas.sh -i 10.10.10.10 -p 22,80,443Scan a specific host and ports using netcat
./linpeas.sh > linpeas.txtRedirect the full output to a file
./linpeas.sh -a | tee linpeas.logRun all checks while also saving output to a log
./linpeas.sh -N > linpeas.txtSave clean, color-free output to a file for reporting
bash linpeas.shRun the script explicitly with bash
curl -L https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh | sh -s -- -aStream the script and pass the -a (all checks) flag
less -r linpeas.txtView saved colored output with its ANSI colors intact
PATH="$PATH:/usr/sbin:/sbin" ./linpeas.shAdd sbin directories to PATH so all binaries are found

Step-by-Step Guide

  1. 1Move the script file onto the destination machine
  2. 2Modify file permissions to allow execution
  3. 3Execute the audit script
  4. 4Scan the output prioritizing the color-coded warnings
  5. 5Investigate any items marked in red or yellow
  6. 6Determine if the highlighted misconfigurations can be exploited

Use Cases

Privilege Escalation

Find paths to escalate to root.

System Audit

Audit Linux security posture.

Container Escape

Detect container escape vectors.

Credential Hunting

Find passwords in configs and files.

Key Features

Related Tools

WinPEAS

Post Exploitation

WinPEAS is a script designed to discover local privilege escalation paths on Windows environments. It audits configurations, user security rights, system vulnerabilities, and active processes.

Mimikatz

Post Exploitation

Mimikatz is a powerful post-exploitation tool that exposes vulnerabilities in Windows authentication protection mechanisms, capable of extracting plaintexts passwords, hashes, PINs, and kerberos tickets from memory.

sshuttle

Post Exploitation

sshuttle acts as a transparent proxy server that forwards traffic over an SSH connection, configuring local routing rules without requiring administrator privileges on the remote server host.

BloodHound

Post Exploitation

BloodHound uses graph theory to reveal the hidden and often unintended relationships within an Active Directory or Azure environment, allowing attackers or defenders to identify complex attack paths.

Chisel

Post Exploitation

Chisel is a fast TCP/UDP tunnel utility that encapsulates traffic over an HTTP transport channel, secured via SSH. It is useful for traversing firewall boundaries and pivoting inside network environments.

Evil-WinRM

Post Exploitation

Learn how to use Evil-WinRM, a Ruby-based client for the Windows Remote Management (WinRM) protocol. This guide covers installation, your first connection, password, pass-the-hash and Kerberos authentication, file transfers and script execution, all for use in authorized lab environments.

Related Cybersecurity Guides

Active Directory · Advanced

BloodHound Guide: Mapping Active Directory Relationships

Learn how to use BloodHound and SharpHound for Active Directory reconnaissance, attack path analysis, privilege escalation detection, and security assessment.

Active Directory · Advanced

Domain Enumeration: Active Directory Reconnaissance Techniques

Comprehensive guide to Active Directory enumeration using native tools, PowerShell, and specialized utilities for discovering users, groups, computers, and trust relationships.

Active Directory · Advanced

Pass-the-Hash: Understanding NTLM Authentication Attacks

An in-depth look at pass-the-hash attacks against NTLM authentication, how they work, real-world exploitation scenarios, detection techniques, and defense strategies.

Active Directory · Advanced

Active Directory Fundamentals: Windows Network Domains

A comprehensive introduction to Microsoft Active Directory covering domain services, LDAP, Group Policy, authentication protocols, and security fundamentals for Windows enterprise environments.

Frequently Asked Questions

What is LinPEAS used for?

LinPEAS (Linux Privilege Escalation Awesome Script) scans Linux systems for misconfigurations and vulnerabilities that could lead to privilege escalation, including SUID binaries, cron jobs, sudo rules, and kernel exploits.

How does LinPEAS color-code results?

LinPEAS uses a color system: Red/Cyan for high-privilege findings, Yellow for potential issues, and Purple for interesting information that requires manual investigation.

Do I need to install anything for LinPEAS?

No, LinPEAS is a standalone shell script. Just download it and execute with sh. It works on most Linux distributions without dependencies.

What types of checks does LinPEAS perform?

LinPEAS checks SUID/SGID binaries, sudo misconfigurations, cron jobs, world-writable files, kernel vulnerabilities, network information, processes running as root, password policies, and credentials in configuration files.

How do I run LinPEAS without saving it on the target?

Streaming the script to a shell can avoid saving an explicit script copy, but it is not a guarantee of memory-only or write-free behavior: checks, subprocesses and logging can leave artifacts. Review and pin a trusted release before executing it, and use only an authorized environment with approved options.

What should I check first in LinPEAS output?

Start with the red-highlighted findings, then work through: SUID/SGID binaries you can abuse, sudo permissions (especially NOPASSWD entries), writable cron jobs and service files, credentials in configuration or history files, and the kernel-exploit section. LinPEAS lists hundreds of observations; the color coding exists so these high-value items are not buried.

What is the difference between LinPEAS and LinEnum?

Both provide Linux enumeration information, but their checks and options differ by version. LinPEAS adds extensive categorized output and optional checks; modes involving authentication or additional probing require separate approval. Neither a colored finding nor a default report proves an exploitable issue.

How do I save LinPEAS output to a file?

Use ./linpeas.sh | tee linpeas-output.txt to view and save output, or ./linpeas.sh > output.txt to save it without the live view. Redirection does not itself strip ANSI color sequences. Upstream shows reading saved colors with less -r; the documented -N option disables colors when supported by the chosen version. Protect saved reports as sensitive data.

Is LinPEAS safe to run on a production system?

No blanket safety or read-only guarantee applies. Enumeration can read sensitive files, write artifacts and create observable activity. Opt-in modes such as -a and -P may add noisy checks or authentication attempts. Review a pinned release, approve the exact options, and prefer a disposable lab or maintenance window; faster modes do not prove safety.

Tags

#post-exploitation#privilege-escalation#linux#enumeration

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.