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
User can save the output in a txt file or view instanly from the terminal the output of the scipt.
The txt file is saved within the folder of the script.
Open the terminal and enter the below command to change permissions on the script.
chmod +x LinuxAudit.sh
Execute ./LinuxAudit.sh
Tested on Debian OS