A professional-grade Linux security auditing tool that performs comprehensive system security analysis with beautiful HTML and PDF reports. No external dependencies required - works on any Linux distribution.
- 🔒 Comprehensive Security Analysis - Audits 8+ security categories
- 📊 Professional Reports - Generates Text, HTML, and PDF reports
- 🎨 Beautiful Output - Gradient styling and color-coded severity levels
- ⚡ Zero Dependencies - Pure Bash + Python, works everywhere
- 🚀 Production Ready - Tested and verified for enterprise use
- 📈 Risk Assessment - Identifies and prioritizes security issues
- 🔧 Actionable Fixes - Provides exact commands to fix issues
git clone https://github.com/moon0deva/securityauit.git
cd securityauit
chmod +x securityaudit.sh
sudo ./securityaudit.sh- OS: Linux (Ubuntu, Debian, CentOS, RHEL, etc.)
- Shell: Bash 4.0+
- Privileges: Root access (via sudo) for full audit
- Dependencies: NONE (pure Bash + Python)
1. Run FULL COMPREHENSIVE AUDIT - All security checks (15-30 min)
2. Quick System Check - Basic security overview (2-3 min)
3. Network Security Only - Network and firewall checks (2-5 min)
4. User Security Only - User and account checks (1-2 min)
5. File System Security Only - Permissions and SUID checks (2-5 min)
6. View Last Report - Display previous audit results
7. Exit - Close the application
All reports are saved to:
~/.security_audits/
For each audit, three files are created with timestamp:
-
security_audit_YYYYMMDD_HHMMSS.txt
- Full human-readable text report
- All audit details and findings
- Technical information
-
security_audit_YYYYMMDD_HHMMSS.html
- Professional styled HTML report
- Gradient backgrounds
- Color-coded severity cards
- Print-friendly formatting
-
security_audit_YYYYMMDD_HHMMSS.pdf
- PDF version of the report
- Generated from HTML
- Perfect for sharing/emailing
- Print-ready
# View text report
cat ~/.security_audits/security_audit_*.txt
# View HTML report (on desktop)
open ~/.security_audits/security_audit_*.html
# View PDF report (on desktop)
open ~/.security_audits/security_audit_*.pdf
# Less command (works on servers)
less ~/.security_audits/security_audit_*.txt- CPU, Memory, Disk metrics
- Security features (AppArmor, SELinux)
- Uptime and performance
- User account enumeration
- Empty password detection
- Home directory verification
- Shell configuration analysis
- Sudo access review
- Listening ports analysis
- IPv6 capability check
- Connection statistics
- Active connections
- DNS configuration
- Critical file permissions
- /etc/passwd
- /etc/shadow
- /etc/sudoers
- /root/.ssh
- World-writable file detection
- SUID binary analysis
- Dangerous script interpreter check
- Firewall status (UFW)
- SSH configuration audit
- Fail2ban status
- Service verification
- Top resource-consuming processes
- Service enumeration
- Suspicious process detection
- Failed login attempt tracking
- Brute force attack detection
- Auditd status
- Available updates tracking
- System package status
- Recent package review
- ✗ Users with no password
- ✗ Dangerous SUID script interpreters
- ✗ World-readable sensitive files
- ✗ Disabled security features
- ✗ Firewall disabled
- ✗ SSH root login enabled
- ✗ Insecure file permissions
- ✗ Failed login attacks
- ✗ NOPASSWD sudo entries
- ✗ Available system updates
- ✗ Recently modified binaries
- ✗ Unusual listening ports
- ✗ Missing home directories
- ✗ Auditd not installed
- ✗ Fail2ban not installed
- ✗ SSH password auth enabled
- ✓ System metrics
- ✓ Enabled security features
- ✓ Proper account configuration
Daily audit:
# Add this line (runs daily at 6 AM)
0 6 * * * /path/to/security_audit_ultimate.sh# View today's audit
cat ~/.security_audits/security_audit_*.txt | grep -i critical
# Count issues by severity
cat ~/.security_audits/security_audit_*.txt | grep -c "CRITICAL"#!/bin/bash
# Email latest audit report
LATEST=$(ls -t ~/.security_audits/security_audit_*.pdf | head -1)
mail -s "Security Audit Report" admin@example.com < "$LATEST"For enhanced security monitoring, install:
# Fail2ban - Brute force protection
sudo apt-get install -y fail2ban
# Auditd - System auditing
sudo apt-get install -y auditd
# chkrootkit - Rootkit detection
sudo apt-get install -y chkrootkit- Production Servers: Weekly
- Web Servers: Weekly
- Database Servers: Weekly
- Development Machines: Monthly
- Personal Workstations: As needed
A: No, it's completely read-only. The script only reads system information and generates reports.
A: Yes, but many checks will be limited. Run with sudo for comprehensive audit.
A: For production systems, weekly. For development, monthly or as needed.
A: Yes, use cron. Example: 0 2 * * 0 /path/to/script (weekly Sunday 2 AM).
A: The script still works - HTML and text reports are always generated.
A: Currently supports TXT, HTML, and PDF. You can convert HTML to other formats manually.
A: Yes, the script is read-only and makes no changes to your system.
A: Any Linux distribution (Ubuntu, Debian, CentOS, RHEL, etc.).
- ✅ Zero external dependencies
- ✅ Pure Bash + Python
- ✅ Works on any Linux system
- ✅ Automatic PDF generation
- ✅ Beautiful HTML reports
- 8 comprehensive audit categories
- 4 report formats
- CVE reference tracking
- HTML to PDF conversion
- Professional styling
- Issue detection
- PDF export
- Beautiful HTML reports
- Issue categorization
- CIS Benchmarks: https://www.cisecurity.org/
- NIST Guidelines: https://www.nist.gov/
- Ubuntu Security Guide: https://ubuntu.com/security/
- fail2ban - Brute force protection
- rkhunter - Rootkit detection
- aide - File integrity monitoring
- auditd - System auditing