This Bash script gathers detailed information about your Linux system instantly and can help you during the hardening process.
The script checks for the following information:
- Linux Kernel Information
- Current User and ID Information
- Linux Distribution Information
- List Current Logged In Users
- Uptime Information
- Running Services
- Active Internet Connections and Open Ports
- Check Available Space
- Check Memory
- Command History
- Network Interfaces
- IPTables Information
- Check Running Processes
- Check SSH Configuration
- List All Packages Installed
- Network Parameters
- Password Policies
- Check Your Source List File
- Check for Broken Dependencies
- MOTD Banner Message
- List User Names
- Check for Null Passwords
- IP Routing Table
- Kernel Messages
- Check Upgradable Packages
- CPU / System Information
- TCP Wrappers
- Failed Login Attempts
- Cron Jobs
- Shells Used by Users
- Services Run by Root
- UID 0 users other than root
- Password aging
- World writable files
- SUID/SGID binaries
- Sysctl security params
- ARP table
- Last reboots
- Dangerous dotfiles
- Root privileges - Some checks require sudo/root for complete results
- Debian-based Linux distribution (Debian, Ubuntu, Mint, etc.)
- Standard system utilities (ss, ip, systemctl, etc.)
Open the terminal and enter the below command to change permissions on the script.
chmod +x LinuxAudit.sh
Execute with sudo for full results:
sudo ./LinuxAudit.sh
The script offers three output modes:
- txt - Save output to LinuxAudit.txt
- terminal output all - Full output to terminal
- terminal compact - Condensed summary to terminal
Tested on Ubuntu 20.04+