Repository navigation
LinFo v0.7
-- LinFo is a lightweight Linux system information and security enumeration tool designed for quick, comprehensive insights into a target system’s hardware, software, and security posture. It is intended for use by system administrators, penetration testers, and security researchers who need an efficient way to gather system details and identify potential security weaknesses.
Features
-
Collects detailed OS and kernel information.
-
Reports CPU, GPU, memory, disk usage, and package count.
-
Detects desktop environment and display resolution.
-
Enumerates network interfaces and IP/MAC addresses.
-
Provides an extensive security report covering firewall status, SELinux/AppArmor, kernel hardening features, SUID binaries, permissions, listening ports, and more.
-
Gathers "loot" relevant for red team operations: suspicious cron jobs, writable directories, SSH authorized keys, shell startup files, and recently modified binaries.
-
Interactive prompts for saving scan or loot reports to file.
-
Supports running with or without root privileges, with full functionality recommended under root.
-
Command-line options for scanning, loot gathering, hardening evaluation or all three combined.
Functional Enhancements
v0.6 → v0.7
07/4/2025
System Hardening Evaluation:
The run_hardening_check() function performs a comprehensive Linux system security assessment and makes hardening recommendations. Here's a breakdown of its features:
General Features
-
Colorized Output: Uses color codes for readability:
${GREEN}– Success/good${RED}– Errors, misconfigurations${BLUE}– Recommendations${YELLOW}– Informational${LIGHT_MAGENTA}– Process prompts
-
OS Detection:
- Determines package manager (
apt,dnf,yum,zypper,pacman) to tailor checks accordingly.
- Determines package manager (
Hardening Checks Performed
-
System Updates:
- Checks for available package updates using
check_updates_available.
- Checks for available package updates using
-
Hardening Tools:
- Checks if
fail2ban,auditd, andaideare installed and active. - If not present or inactive, gives recommendations.
- Checks if
-
Firewall:
- Calls
firewall_checkfunction to detect and evaluate firewalls (iptables,nftables,ufw,firewalld). - Recommends installing a firewall only if none are detected.
- Calls
-
Mandatory Access Control:
- For Debian/Ubuntu: checks for AppArmor directory and activity.
- For RHEL-based systems: checks for
SELinuxandfirewalld, and suggests enabling if inactive.
-
SSH Root Login:
- Verifies if
PermitRootLogin nois explicitly set and uncommented insshd_config. - Flags and recommends changes if improperly configured.
- Verifies if
-
PAM Password Policy:
- Looks for
pam_pwqualityorpam_cracklibin/etc/pam.d/common-password. - Warns if no complexity enforcement is detected and recommends configuring it.
- Looks for
-
Intrusion Detection Systems:
- Detects if
aideis installed or ifossecis active viasystemctl. - Recommends installation if neither is found.
- Detects if
-
Audit Logging:
- Confirms if
auditdis active. - Recommends installing and enabling
auditdif not.
- Confirms if
-
Automatic Security Updates:
-
Checks for:
unattended-upgrades(Debian/Ubuntu)dnf-automatic(Fedora/RHEL)
-
Warns for Arch systems (unsupported).
-
Recommends installing if missing.
-
Installation
Clone or download the repository:
git clone https://github.com/kaotickj/LinFo.git
cd LinFo
chmod +x linfo.sh
Run the script directly on the target Linux system.
Usage
Usage: linfo.sh [OPTIONS]
Options:
--quiet Run script in quiet mode (minimal output).
--no-ip Skip displaying network interface IP addresses.
--raw Output raw, uncolored text for easier parsing.
--scan Perform security scanning checks and display a security report.
--loot, --c2ready Gather potential loot, indicators, and staging areas for C2 readiness.
--fullscan Run both --scan and --loot checks; skips IP info for speed.
--help, -h Show this help message and exit.
Examples:
./linfo.sh --scan
Run only the security scan report.
./linfo.sh --loot
Run loot gathering report.
./linfo.sh --fullscan
Run full security and loot reports in one execution.