,--,
,---,. ,---,. .--.--. ,--.'|
,' .' | ,' .' \ / / '. ,--, | :
,---.' | ,---.' .' | | : /`. / ,---.'| : '
| | .' | | |: | ; | |--` | | : _' |
: : : : : : / | : ;_ : : |.' |
: | |-, : | ; \ \ `. | ' ' ; :
| : ;/| | : \ `----. \ ' | .'. |
| | .' | | . | __ \ \ | | | : | '
' : ' ' : '; | / /`--' / ' : | : ;
| | | | | | ; '--'. / | | ' ,/
| : \ | : / `--'---' ; : ;--'
| | ,' | | ,' | ,/
`----' `----' '---'
A simple and practical Bash script for basic Linux system security auditing.
It provides quick insights into your systemβs security posture, highlighting weak spots and misconfigurations.
- π₯ Firewall status via
ufw,firewalld, andiptables - π Open ports using
ssornetstat - βοΈ Running services via
systemctl - π Users without passwords (from
/etc/shadow) - π Users with sudo privileges
- πͺ SSH port β detects if default
22is still in use - π Vulnerable or outdated packages via
apt,yum, ordnf - π Sudoers configuration β checks for overly permissive
ALLrules in/etc/sudoersand/etc/sudoers.d - π΅οΈββοΈ Rootkit detection using
chkrootkitandrkhunter(if installed) - π¬ Displays a clear colored startup notification
- π¨ Includes an ASCII art logo banner for better branding and UX
- πΉοΈ Rootkit detection commands (
chkrootkitandrkhunter) are run with a spinner animation for improved user experience. - π The complete security report is saved to a timestamped log file in the current working directory for review.
β οΈ Run the script asrootor viasudoto ensure all checks perform correctly.
bash <(curl -s https://raw.githubusercontent.com/hemansadeghi/FBSH/main/security-check.sh)git clone https://github.com/hemansadeghi/FBSH.git
cd FBSH
chmod +x security-check.sh
sudo ./security-check.shβΉοΈ Run as
rootor withsudoto ensure full access to system checks.
==> Firewall status (UFW + iptables)
UFW: Status: active
iptables is active. Sample rules:
...
==> Open ports
Netid State Recv-Q Send-Q Local Address:Port ...
==> Users without password
All users have passwords.
==> Vulnerable/Upgradable packages
libssl1.1/bionic-updates 1.1.1-1ubuntu2.1~18.04.14 upgradable from 1.1.1-1ubuntu2.1~18.04.13
==> Custom sudoers entries
root ALL=(ALL:ALL) ALL
==> Rootkit detection
chkrootkit: Nothing found
rkhunter: [Warning] Possible suspicious file...If you want full rootkit checks, install:
# Debian/Ubuntu
sudo apt install chkrootkit rkhunter.
# arch ..
sudo pacman -S chkrootkit rkhunter.
# RHEL/CentOS/Fedora
sudo yum install chkrootkit rkhunter.MIT β Β© Hemansadeghi, 2025
Feel free to fork, customize, and contribute.