This script automates the process of hardening a Kali Linux system using well-established security practices for penetration testers, security professionals, and red teamers who want to defend and lock down their systems.
- Kernel-level sysctl security rules
- Strong password policy enforcement
- USB/firewire storage disablement
- SSH lock-down (no root login, no password auth)
- Automatic security updates
- iptables default rules
- Legal login banner
- PAM and audit logging tools
- Clone the repo or download from Gumroad
- Make the script executable:
chmod +x kali_hardening.sh
- Run with root privileges:
sudo ./kali_hardening.sh
- Kali Linux (Rolling)
- Internet connection
- Root or sudo access
This script is intended for educational and defensive security purposes only. The author and contributors are not responsible for any damage, data loss, or consequences resulting from its usage.
Use it only on systems you own or have explicit permission to test.
SmaRTy Saini
Cybersecurity Architect & Penetration Tester
GitHub: smarty-saini
MIT License β Free to use, modify, and distribute with proper attribution.