Show HN: TheProtector – Linux Bash script for the paranoid admin on a budget
I spent the past year building this in my spare time because I got tired of enterprise security tools that cost $50K/year and don't understand Linux.
TheProtector is a comprehensive security monitoring tool that actually runs on the systems we use (Linux) instead of being a Windows-first afterthought. Built it entirely on a $500 laptop because I believe good security shouldn't require unlimited budgets.
Features: - Real-time process, network, and file monitoring - YARA malware detection with custom rules - eBPF kernel monitoring (when available) - Behavioral baseline establishment and anomaly detection - Active threat response (blocks IPs, kills processes, quarantines files) - Anti-evasion detection for rootkits and advanced threats - Honeypots for attack detection - Web dashboard for monitoring - Single bash script, no complex installation
The tagline is "not perfect but better than most" because I'm tired of security vendors claiming their tools are flawless. This actually works, costs $0, and you can read every line of code.
I know bash isn't the sexy choice for security tools, but it runs everywhere, has zero dependencies, and most Linux admins can read/modify it. Sometimes boring technology that works is better than fancy technology that doesn't.
It's designed for the intersection of "paranoid about security" and "don't have enterprise budgets" - which describes most of us actually running Linux systems.
GitHub: https://github.com/IHATEGIVINGAUSERNAME/theProtector
Been running it on my own systems for months. Catches the stuff that matters and doesn't flood you with false positives. If you hate expensive security theater as much as I do, might be worth a look.
Open to feedback, especially from folks who know more about this stuff than I do.
Thanks, IHATEGIVINGAUSERNAME (yes, I really do hate giving usernames)
At first glance I questioned your choice of bash over something like Python, but you're right - bash is everywhere and every competent Linux admin knows how to use it. There's a zillion unprotected Linux servers out there where this would be very handy.
In terms of next steps, it might be worth documenting more about the notification framework and some simple examples of how we might use it. I can see you've mentioned integrations with email, Slack and webhooks in the tech paper, but I can't spot anything about how to use them
Congratulations on a really worthy project
- author attribution (in fact, a mockery is made of it)
- qualified independent security review and endorsement
- designs justifying irrational decisions such as unilateral superuser execution
- any sort of testing, validation or significant documentation of code functionality
- steps to undo whatever this does (since anything is possible, as all liability is explicitely disavowed)
This is not meant to discourage development, but such software should have a clear an EXPERIMENTAL disclaimer and not purport to secure anything; primum non nocere.
Here's what you should know:
The Good: It's a comprehensive monitoring solution that actually catches real threats. The YARA integration, eBPF monitoring, and honeypot features are impressive for a bash script.
Security Issues:
1. Command injection in process monitoring - Initially looked like a vulnerability because the code uses xargs basename on process names, which seemed dangerous. However, process names from ps output are already sanitized by the kernel (limited to 15 chars, no shell metacharacters executed).
2. Executing Python scripts from /tmp as root - Real privilege escalation vulnerability. Ghost Sentinel writes to world-writable /tmp then executes as root. Any local user can overwrite the file between write and execute to gain root. Trivial to exploit with inotify or loop, 100% reliable. Turns any compromised service account into root access. Fix: use root-owned directory instead of /tmp.
Email Configuration - Gmail will block direct server emails. Install msmtp and configure it with your Gmail app password (not regular password) to get theProtector to use msmtp's mail command:
Uninstall TheProtector: Auto-update concerns: The script does NOT auto-update. self_update() only runs when you explicitly execute ./the_protector.sh updatePerformance note: On resource-constrained VPS instances, set ENABLE_EBPF=false and MAX_FIND_DEPTH=1
I'm deploying a patched version this week. The creator spent a year on this and it shows - the eBPF/YARA integration is impressive. They should set up GitHub Sponsors or a donation link. It's better than many commercial solutions I've seen.
https://github.com/IHATEGIVINGAUSERNAME/theProtector/blob/ma...
Also, you're calling this TheProtector, but internally it seems to be called ghost sentinel?
> local update_url="https://raw[dot]githubusercontent[dot]com/your-repo/ghost-se..."
One thing though: I can imagine you being rather anonymous (no real name, new HN account, new GitHub account) might make people a bit nervous around a security tool. You probably have good reasons for that, but if not.. you might want to reconsider and take credit?
No comments yet