COMPLETED
Technical Summary
lin-triage.sh is a lightweight, highly portable Bash script designed to gather forensic evidence and indicators of compromise (IOCs) in enterprise Linux systems. The tool performs a baseline scan in less than 10 seconds, outputting a structured Markdown report ready for analyst review or import into SIEM/SOC tools.
Security Objectives
During active incident response, the first few hours are vital. Data collection must be rapid, reliable, and non-destructive, preserving file states and memory indicators without triggering heavy resource footprints on the production host.
Forensic & Collection Architecture
The utility automates triage across five core forensic vectors:
- Identity & Account Audits: Scans active logged-in users, audits
/etc/passwdfor unauthorized UID 0 (root-level) accounts, reviews user SSHauthorized_keys, and processes recent login histories (last/lastb). - Socket & Port Reconnaissance: Identifies active listening TCP/UDP sockets mapped to active PIDs and process names, as well as active outbound established connections.
- System Persistence Inspection: Reviews system crontabs, user cron jobs, and scheduled directories to locate backdoor vectors.
- File System Modification Audit: Automatically locates files modified within the last 7 days in temp paths (
/tmp,/var/tmp,/dev/shm) and public web root directories. - Event Log Scraping: Searches system authorization logs (
auth.log,secure) for brute-force attacks and elevated commands run via `sudo`.
Operational Guide & Commands
The tool is designed to run directly with no compiled dependency requirements:
# 1) Download directly and set execute permissions
curl -O https://perciocastelo.com.br/assets/downloads/lin-triage.sh
chmod +x lin-triage.sh
# 2) Run the script to produce a formatted Markdown report
./lin-triage.sh
# 3) Secure inline execution directly via Curl
bash <(curl -fsSL https://perciocastelo.com.br/assets/downloads/lin-triage.sh)
Operational Safety
- Read-Only Baseline: The script performs audit scans and does not delete or alter any files.
- Privilege Isolation: Can run as an unprivileged user, safely skipping tests that require root permissions (e.g. reading log files).
- No Dependencies: Written in pure POSIX Bash using native utilities.
GitHub Activity (issues)
Tracking progress and issues in the LinTriage repository.
live feed
open issues on githubloading progress...
unable to load issues at this time. please open on GitHub via the link above.
Real-world results
The markdown report format enables immediate copy-pasting into executive incident files and technical audits.
Architecture & Tools
- Shell Script / Bash
- System Info
- SSH/User Auditing
- TCP/UDP Sockets (ss)
- Modified Files (find)
- Log Analysis (grep)
Execution and Operation
Forensic triage and file hashes provide swift, evidence-safe audit logs with original data integrity preserved.
Screenshots
Discuss This Project
Looking for custom audit script development or technical incident response support for your Linux infrastructure?