News for hackers. Stuff that matters.
Re:Ask HN: How do you continuously monitor web logs for hack... by dalore on Tuesday May 08, 2018 @06:07AM (#17019911)
Yeah I find young naive devops people implementing security watching and stuff like fail2ban but in the long run it reduces productivity. Stuff like fail2ban can block legitimate traffic (it blocked me on many occasion trying to work from home).

When I was young I too used to try implement detection and banning but realised it's a waste of time. Key only access to ssh and make sure you at least subscribe to security updates for all packages is enough.

For our own app we went the ELK route due to the number of log messages coming from our own application. But yes as you said it's a pain to manage. Also creating kibana graphs/views/desktop for each type of log is also painful.

A good service I believe would be someone to offer a turnkey/shrink wrapped managed ELK for self hosting. Not only managing the system side of it, but also offering services to help create custom kibana graphs.

Re:Ask HN: How do you continuously monitor web logs for hack... by danieltillett on Tuesday May 08, 2018 @06:19AM (#17019948)
Just set a short ban time in fail2ban. I have it set to 5 minutes. The aim is just to slow down the kiddies so that my logs don’t fill with a zillion pointless attempts.
Re:Ask HN: How do you continuously monitor web logs for hack... by spurgu on Tuesday May 08, 2018 @06:37AM (#17019998)
And/or just reconnect through another server or VPN.
Re:Ask HN: How do you continuously monitor web logs for hack... by danieltillett on Tuesday May 08, 2018 @06:43AM (#17020022)
Yes, but my aim is more to create a molasses pit to slow down the log fill rate rather than to ban anyone for long. If I manage to lock myself out I just get up and get a drink of water.

Using a short ban time keeps the load of running fail2ban to a minimum. I at one point was banning the kiddies/bots for a week and 40% of the server load was chewed up just running fail2ban.

Re:Ask HN: How do you continuously monitor web logs for hack... by gog on Tuesday May 08, 2018 @07:26AM (#17020179)
Fail2ban has issues when you have a lot of IPs blocked in memory.

The solution I came up with to this problem is to use a custom ban action that adds an IP to the blocked ipset list with a given TTL, but set fail2ban to think that the IP has to be only banned for 5 seconds or so.

The result is that ipset purges the IP from the list after the TTL expires, but fail2bans working set is a 5 second rolling windows of blocked IPs.

This works great and it's being used in production for a couple of years.

Re:Ask HN: How do you continuously monitor web logs for hack... by danieltillett on Tuesday May 08, 2018 @07:35AM (#17020230)
Sounds like a great solution. Have you written about this in any detail?
Re:Ask HN: How do you continuously monitor web logs for hack... by combatentropy on Tuesday May 08, 2018 @06:29PM (#17025888)

  > so that my logs don’t fill with a zillion pointless attempts
What about moving SSH to a different port?
Re:Ask HN: How do you continuously monitor web logs for hack... by danieltillett on Wednesday May 09, 2018 @04:59AM (#17028363)
I do this, but it is the port scanning that I am tracking. It is hard to find your ssh port if you get banned port scanning.
Re:Ask HN: How do you continuously monitor web logs for hack... by dalore on Tuesday May 08, 2018 @01:39PM (#17022839)
When your server is down and you need to ssh into an arbitrary 5 minute wait is going to frustrate you.

You don't really need fail2ban at all. Just don't log failed password attempts. Key access only, no one is going to get in.

Re:Ask HN: How do you continuously monitor web logs for hack... by danieltillett on Wednesday May 09, 2018 @05:01AM (#17028375)
I am not worried about people getting in via ssh, I am worried about some zero-day on some other service.
Re:Ask HN: How do you continuously monitor web logs for hack... by atomical on Tuesday May 08, 2018 @08:31AM (#17020443)
Do you really need the space or is it just some anxiety issue / ocd issue?
Re:Ask HN: How do you continuously monitor web logs for hack... by fragmede on Tuesday May 08, 2018 @11:18AM (#17021496)
If a sufficiently interested botnet discovers your SSH server, it'll hammer your server with 10's of connections a second, from many different IPs. That doesn't take up enough bandwidth to be noticeable, but it can fill up the disk, when you're least expecting, which can cause all sorts of trouble.

Of course there are ways to deal with it, but that's just extra work.

Re:Ask HN: How do you continuously monitor web logs for hack... by atomical on Tuesday May 08, 2018 @09:54PM (#17026899)
Fill up a terabyte? Doubt it, especially since logs are compressed nightly.
Re:Ask HN: How do you continuously monitor web logs for hack... by ishaan12345 on Wednesday May 09, 2018 @04:38AM (#17028263)
Re:Ask HN: How do you continuously monitor web logs for hack... by atomical on Wednesday May 09, 2018 @03:52PM (#17033347)
What does your comment have to do with mine? You seriously registered an account just to reply to me? What's going on?
Re:Ask HN: How do you continuously monitor web logs for hack... by atomical on Wednesday May 09, 2018 @11:55PM (#17036261)
.