Skip to content

root0x7/decPEAS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🧩 decPEAS β€” Linux Persistence Detection Script

decPEAS (Detection PEAS) is a Bash-based security assessment tool for Blue Teamers and DFIR analysts.
Inspired by linPEAS, it focuses not on privilege escalation, but on detecting persistence mechanisms and post-exploitation traces within Linux systems.


πŸ•΅οΈβ€β™‚οΈ Overview

Attackers often establish persistence to maintain access after initial compromise.
decPEAS helps defenders detect common and advanced persistence methods by performing a deep inspection of system configurations, startup scripts, and background services.


βš™οΈ Features

βœ… System-wide Persistence Checks

  • Startup entries in /etc/rc.local, /etc/init.d/, and systemd services
  • Cron jobs (/etc/cron*, user crontabs, anacron)
  • at and batch scheduled tasks

βœ… User-level Persistence

  • .bashrc, .profile, .bash_login, .zshrc modifications
  • SSH authorized keys and command options
  • Hidden scripts in home directories
  • Sudoers file abuse for persistence

βœ… Advanced Techniques Detection

  • Malicious systemd units or timers
  • Modified /etc/profile or PAM configuration hooks
  • Suspicious binaries in $PATH
  • LD_PRELOAD or LD_LIBRARY_PATH injections
  • Kernel modules or backdoored drivers

βœ… Forensic Artifacts

  • Recently modified binaries and scripts
  • Unusual files in /tmp, /dev/shm, /var/tmp
  • Abnormal processes or startup entries
  • Potential reverse shells or listener scripts

βœ… Color-coded Output

  • πŸ”΄ High severity (definitely malicious)
  • 🟑 Suspicious or uncommon
  • 🟒 Benign / informational

🧰 Requirements

  • Linux (tested on Ubuntu, Debian, CentOS, and Kali)
  • bash β‰₯ 4.0
  • Optional tools (auto-detected):
    • grep, awk, sed, ps, ls, find, systemctl, crontab

πŸš€ Installation

git clone https://github.com/root0x7/decPEAS.git
cd decPEAS
chmod +x decPEAS.sh

πŸ§ͺ Usage

Run it as root for full visibility:

sudo ./decPEAS.sh

Or scan only the current user’s environment:

./decPEAS.sh --user

Example Output

[+] Checking for systemd persistence...
    πŸ”΄ Suspicious service found: /etc/systemd/system/ssh-backdoor.service

[+] Checking for modified bash profiles...
    🟑 /home/user/.bashrc modified recently (possible persistence)

🧬 Output Options

You can export the results for later analysis:

./decPEAS.sh --output report.txt

About

Linux persistence detector

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages