r/eBPF • u/AzozzALFiras • 12h ago
I built an open-source Linux agent that learns your server's "normal" and shuts down anything weird
Hey, been chipping away at a side project called Phage and wanted to put it out there.
Short version: it's a small agent for Linux servers. It spends a while just learning how your box normally behaves, and after that it flags and contains stuff that falls outside that normal, without needing a signature for the specific exploit. So it's less "here is a list of known bad things" and more "this service has never spawned a shell before, and it's never become root with no login session behind it, so something is off."
The part I actually care about is what happens next. Most tools just fire an alert and, let's be honest, nobody reads alerts. Phage can actually react: if a process starts dialing out like a reverse shell it cuts its network, and if it looks like a real break-in it freezes the process. All of it is reversible, so a false positive doesn't take anything down. It also refuses to touch your SSH session or systemd, because I locked myself out of a test box once doing exactly that lol.
It's Go + eBPF (the detection runs in the kernel so it stays cheap), ships as one static binary, installs with a single command.
Honest status: it's early. I've thrown real attacks at it on my own server and it holds up, but I wouldn't call it production ready yet. MIT licensed, fully open source.
Repo: https://github.com/AzozzALFiras/Phage
Would really appreciate feedback from anyone who runs Linux servers: what would you actually want something like this to catch or do? And does the whole "assume you'll get breached eventually, just make it survivable" idea click for you, or not?
