Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marwan-ahmed-23/linux-system-security-checker
A simple Bash script for performing quick security audits on Linux systems, including checks for firewall status, sensitive file permissions, inactive user accounts, and running services. Generates detailed security reports.
https://github.com/marwan-ahmed-23/linux-system-security-checker
audit bash linux linux-tools security security-checker
Last synced: 10 days ago
JSON representation
A simple Bash script for performing quick security audits on Linux systems, including checks for firewall status, sensitive file permissions, inactive user accounts, and running services. Generates detailed security reports.
- Host: GitHub
- URL: https://github.com/marwan-ahmed-23/linux-system-security-checker
- Owner: marwan-ahmed-23
- License: mit
- Created: 2024-12-21T07:59:19.000Z (26 days ago)
- Default Branch: main
- Last Pushed: 2025-01-01T16:41:35.000Z (14 days ago)
- Last Synced: 2025-01-01T17:34:39.227Z (14 days ago)
- Topics: audit, bash, linux, linux-tools, security, security-checker
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: security-checker.sh
Awesome Lists containing this project
README
# 🛡️ Linux System Security Checker
A lightweight and powerful **Bash script** designed to perform a quick security audit of your Linux system. This tool checks for firewall status, sensitive file permissions, inactive users, running services, and available updates, then generates a detailed security report in both text and HTML formats.
## 🚀 Features
- 🔥 **Firewall Status**: Checks if UFW is active and lists current rules.
- 🔐 **Sensitive File Permissions**: Verifies permissions for critical files like `/etc/passwd`, `/etc/shadow`, and `/etc/hosts`.
- 👤 **Inactive User Accounts**: Detects unused or suspicious accounts based on login shells.
- 🛠️ **Service Monitoring**: Lists top 10 running services by memory usage.
- ⬆️ **System Updates**: Checks for available package updates to keep your system secure.
- 📄 **Detailed Report**: Automatically generates a comprehensive security report in both **text** and **HTML** formats for better visualization.## 📂 Directory Structure
```plaintext
linux-system-security-checker/
├── security-checker.sh
├── README.md
├── LICENSE
├── security-report.txt
├── security-report.html
└── example-report.txt
```## 📖 Usage
1. Clone this repository:```bash
git clone https://github.com/marwan-ahmed-23/linux-system-security-checker.git
cd linux-system-security-checker
```2. Make the script executable:
```bash
chmod +x security-checker.sh
```3. Run the script:
```bash
./security-checker.sh
```
4. View the generated report:- Text Report:
```bash
cat security-report.txt
```
- HTML Report: Open `security-report.html` in your favorite browser.## 🖼️ Example Report
Here's an example of the output generated by the script:
```plaintext
Security Report - Thu Dec 21 2024
---------------------------------------
Firewall Status:
Status: activeTo Action From
-- ------ ----
22 ALLOW Anywhere
---------------------------------------
File Permissions:
/etc/passwd -rw-r--r--
/etc/shadow -rw-------
/etc/hosts -rw-r--r--
---------------------------------------
Inactive Users:
root
admin
---------------------------------------
Top 10 Running Services by Memory Usage:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 102400 9280 ? Ss 12:00 0:03 /sbin/init
mysql 172 0.5 1.5 125000 11000 ? Ssl 12:00 0:30 /usr/sbin/mysqld
---------------------------------------
System Updates:
apt package-manager is up-to-date.
```### HTML Format:
Open `security-report.html` for a visually styled version of the report with structured sections and improved readability.
## 🛠️ Contributing
We welcome contributions to improve this tool! Here's how you can help:
- 🐛 **Report issues:** Found a bug? Open an issue and let us know.
- 🌟 **Suggest features:** Have an idea for improvement? We'd love to hear it.
- 🔧 **Submit pull requests:** Contribute code directly to the repository.## 🛠️ Future Improvements
- 📅 **Task Scheduling:** Add cron job integration for automated periodic checks.
- 🕵️ **Vulnerability Scanner:** Integrate CVE vulnerability scanning.
- 🎨 **Enhanced HTML Report:** Include charts and visual statistics.
- 🛡️ **Customizable Rules:** Allow users to define custom rules for security checks.## 🌟 Show Your Support
If you found this project helpful, please consider giving it a ⭐ on GitHub. Your support means the world to us!