zlacker

[return to "I got hacked: My Hetzner server started mining Monero"]
1. danpar+Gj[view] [source] 2025-12-17 23:02:50
>>jakels+(OP)
No firewall! Wow that's brave. Hetzner will let you configure one that runs outside of the box so you might want to add that too, as part of your defense in depth - that will cover you if you make a mistake with ufw. Personally I keep SSH firewalled only to my home address in this way; if I'm out and about and need access, I can just log into Hetzner's website and change it temporarily.
◧◩
2. Nextgr+wk[view] [source] 2025-12-17 23:08:14
>>danpar+Gj
But the firewall wouldn't have saved them if they're running a public web service or need to interact with external services.

I guess you can have the appserver fully firewalled and have another bastion host acting as an HTTP proxy, both for inbound as well as outbound connections. But it's not trivial to set up especially for the outbound scenario.

◧◩◪
3. danpar+5m[view] [source] 2025-12-17 23:16:45
>>Nextgr+wk
No you're right, I didn't mean the firewall would have saved them, but just as a general point of advice. And yes a second VPS running opnSense or similar makes a nice cheap proxy and then you can firewall off the main server completely. Although that wouldn't have saved them either - they'd still need to forward HTTP/S to the main box.
◧◩◪◨
4. Nextgr+Om[view] [source] 2025-12-17 23:20:48
>>danpar+5m
A firewall blocking outgoing connections (except those whitelisted through the proxy) would’ve likely prevented the download of the malware (as it’s usually done by using the RCE to call a curl/wget command rather than uploading the binary through the RCE) and/or its connection to the mining server.
◧◩◪◨⬒
5. denkmo+uq[view] [source] 2025-12-17 23:49:41
>>Nextgr+Om
How many people do proper egress filtering though, even when running a firewall
[go to top]