News for hackers. Stuff that matters.
Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Monday May 07, 2018 @11:06PM (#17018524)
The answer isn't quite "don't bother" but it's definitely not "install these tools and get started".

Most of the things you can easily set up to watch for security events are looking for problems you simply shouldn't have.

For instance: you can set up fail2ban, sure. But what's it doing for you? If you have password SSH authentication enabled anywhere, you're already playing to lose, and logging and reactive blocking isn't really going to help you. Don't scan your logs for this problem; scan your configurations and make sure the brute-force attack simply can't work.

The same goes for most of the stuff shrink-wrap tools look for in web logs. OSSEC isn't bad, but the things you're going to light up on with OSSEC out of the box all mean something went so wrong that you got owned up.

Same with URL regexes. You can set up log detection for people hitting your admin interfaces. But then you have to ask: why is your admin interface available on routable IPs to begin with?

What you want is an effectively endless sink for developer logs (Splunk is fine but expensive, ELK is fine but complicated to manage), and you want to add structured instrumenting logs to your applications in all the security-sensitive places, like authorization checks (which should rarely fail), and especially a very solid, very long-term audit trail of admin-like actions, so you have some prayer of tracking insider misuse. You could instrument your SQL queries and catch any query failures --- which should also be rare. That kind of stuff. I don't think there's a good shrink-wrap package that does that.

But really: focus on removing attack surface, rather than continuously monitoring it.

Re:Ask HN: How do you continuously monitor web logs for hack... by ivanr on Tuesday May 08, 2018 @02:58AM (#17019327)
I came here to add an important detail about WAFs that's missing in this thread. For context, I am the original author of ModSecurity (but haven't worked on it since at least 2009). I wrote ModSecurity for three use cases that still make a lot of sense sense; they are: 1) full HTTP transaction logging (meaning request and response bodies), 2) rule-based analysis of HTTP traffic (largely to trigger logging and otherwise highlight anomalies) and 3) virtual patching.

The first two use cases are all about traffic visibility, which has been, and remains a big problem. If we're talking about improving security, the third use case—virtual patching—is the exciting part. The story goes something like this: you discover a vulnerability in your code but you can't fix it immediately, for whatever reason (take your pick). In practice, it may be weeks until the problem is fixed. However, if you have ModSecurity installed, you can write a virtual patch for your problem, often to fix it 100% reliably.

However, it's very important to understand that virtual patching doesn't mean just slapping together some rule that appears to be doing the job. Blacklisting doesn't work. To properly virtual-patch, you have to fully understand the vulnerability and the entry point to the application. You have to carefully whitelist all parameters in that particular location. In other words, you have to almost replicate the work that should have been done by the developer.

Even in this context, it's not all rosy. Virtual patching requires a great deal of expertise to do properly. It's almost always better to spend your time fixing the actual problem. Sometimes, however, that's not possible to do in a reasonable time frame, and that's when a WAF (according to my definition), can be a life saver.

Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @07:09AM (#17020110)
Thanks for this. I admire ModSecurity! But the subtext of my comment is the needs of typical HN people, most of whom manage applications they wrote, for small companies. Overwhelmingly, those people should spend any time they would spend on things like ModSecurity instead shoring up the security of their code.
Re:Ask HN: How do you continuously monitor web logs for hack... by FuckOffNeemo on Tuesday May 08, 2018 @09:47AM (#17020833)
TLDR: Ivan, thank you for everything you've provided to the IT community.

- - - -

There's few people I am more pleased to see commenting here on a topic like Sec more than yourself Ivan, your work's exceptional. And the tools you've provided like Hardenize and SSL Labs have saved me countless hours.

Your books have been an immense source of knowledge for me (and I'm relatively a newcomer by my colleagues standards).

Really pleased to see you here on HN. Though, I'm not entirely surprised. The best of the best seem to haunt this place.

Re:Ask HN: How do you continuously monitor web logs for hack... by _b8r0 on Tuesday May 08, 2018 @03:21AM (#17019416)
The parent posted what is pretty much the right answer, but to add:

* Your logs should be there to help you find out what happened in the event of a compromise, not to detect it in progress.

What OP should be monitoring is the activity that occurs on the system - logins, processes spawned (e.g. php or mysql suddenly spawning shells for no reason), changes to content, resource volume spikes and as the parent said, configuration changes.

Much of this can be done with a variety of tools but there isn't really a one-size fits all approach. I'd start with resource spikes as it's easiest and work up to an OSSEC configuration reflecting the actual environment.

Also by way of middle ground on the log front, Graylog2 is a happy medium between Splunk and ELK, but it's better to log fewer (but more useful) things than a load of noise.

Re:Ask HN: How do you continuously monitor web logs for hack... by viraptor on Tuesday May 08, 2018 @08:32AM (#17020448)
> What OP should be monitoring is the activity that occurs on the system - logins, processes spawned (e.g. php or mysql suddenly spawning shells for no reason),

In my experience, monitoring this takes about as much effort as adding a new apparmor / selinux / firejail / ... rule which would block it in the first place. I mean, with processes spawned we're almost at auditd level already.

Re:Ask HN: How do you continuously monitor web logs for hack... by unethical_ban on Tuesday May 08, 2018 @01:41PM (#17022865)
>logs are not there.... to detect an attack in progress

I vehemently disagree with this assertion. I also disagree with tptacek's asseration that any admin interface should be inaccessble from the public Internet. That's just not how a lot of small businesses, non-profits, etc. operate. 2FA? Sure. Geo-fencing? Keeps out noise. Basic auth / some front-end to minimize app-specific attack surface? Perhaps.

Saying "you shouldn't look at logs to detect anomalous activity before the fact" is awful. So is "If you have and admin availability publicly, you're screwed".

My saying is "Security is a spectrum". A bank should not have their firewall admin interface publicly available. A community newsletter blog would probably be alright.

Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @02:09PM (#17023163)
I don't know what the maturity cutoff you're using here is, but I'll draw my line at "deploying on AWS". If you're on AWS, you have really no business exposing an admin interface on a routable address. Deploy it on an internal address and have admins use a VPN to reach it.

There are organizations on AWS that have publicly-routable admin interfaces. They should all be working on plans to migrate away from that, and, in the meantime, they should be extra careful about authentication and monitoring.

If you're too small to have a non-routable admin interface, you are definitely too small to pay for security products.

Re:Ask HN: How do you continuously monitor web logs for hack... by _b8r0 on Tuesday May 08, 2018 @03:11PM (#17023825)
Mixing discussions between people makes it harder to respond to your comments. It's better to have one comment aimed at me and one aimed at tptacek.

As for the content of your comment, it's hard to distinguish what's aimed at me and what's aimed at him, so I'll assume everything aside from your first sentence is aimed at him.

Re:Ask HN: How do you continuously monitor web logs for hack... by koolba on Monday May 07, 2018 @11:21PM (#17018570)
> But really: focus on removing attack surface, rather than continuously monitoring it.

You buried the lede on this one.

Re:Ask HN: How do you continuously monitor web logs for hack... by perlgeek on Tuesday May 08, 2018 @05:09AM (#17019740)
This applies if you are developing your own software.

If you do security for an enterprise with dozens or hundreds of apps that you don't develop yourself, you might not have the luxury of only trying to reduce attack surface, or instrumenting 3rd-party supplied code.

Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @07:02AM (#17020081)
Yes, that's true.
Re:Ask HN: How do you continuously monitor web logs for hack... by Neil44 on Tuesday May 08, 2018 @03:03AM (#17019354)
I use some custom fail2ban rules on my web servers, for example too many hits on url X in a 10 minute window = firewalled for a day. Helps stop brute forcing on web apps e.g. Wordpress and can cut down massively on the traffic the server is having to deal with.

I Also have some mod_rewrite rules in to 403 some URL’s that bots currently hit, mostly because I don’t want to spend 200ms of PHP time for the bot to discover that it’s exploit didn’t work.

I accept that when you’re hosting websites for a load of other people you’re gonna need backups too, that’s the bottom line.

Re:Ask HN: How do you continuously monitor web logs for hack... by busterarm on Tuesday May 08, 2018 @10:14AM (#17021002)
I don't even give them the courtesy of a 403. That's more information than they deserve. HAproxy severely throttles their requests, at no cost to my web servers, and eventually stops responding entirely.

Converting our WordPress sites to static sites greatly simplified and improved our infrastructure.

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)
.
Re:Ask HN: How do you continuously monitor web logs for hack... by jimktrains2 on Tuesday May 08, 2018 @08:00AM (#17020321)
> What you want is an effectively endless sink for developer logs (Splunk is fine but expensive, ELK is fine but complicated to manage

I'm pretty happy with sumo. A couple things I wish they'd change, but their core competency is searching logs and metrics and they do that really well. It is paid (there is a free tier but we outgrew it quickly) bit it's well worth it IMHO.

> But really: focus on removing attack surface, rather than continuously monitoring it.

So much this. Logs are great for telling you something bad has already happened and what that was, both security and faults. Reducing the attack service will get you more mileage from a security pov (again, in my opinion). Logs need to he there and some basic trawling of them is also necessary, but is purely reäctive.

Re:Ask HN: How do you continuously monitor web logs for hack... by wongma on Tuesday May 08, 2018 @02:35AM (#17019253)
Is there a course (or set of courses), books or other learning material you recommend for web developers to get to a competent level in terms of building, deploying and maintaining secure applications (including infrastructure)?

Edit: updated to be more clear

Re:Ask HN: How do you continuously monitor web logs for hack... by tachion on Tuesday May 08, 2018 @02:56AM (#17019321)
Get more into DevOps/SRE/Ops/SysAdmin/WordOfTheWeek where building secure infrastructure is part of their job. Writing secure applications is one thing, deploying them on secure infrastructure is another.
Re:Ask HN: How do you continuously monitor web logs for hack... by wongma on Tuesday May 08, 2018 @03:05AM (#17019363)
Thanks for the tips!

Yeah, I should have been more explicit. When I say build secure applications, I imply the full stack including infrastructure. I updated my comment accordingly.

Re:Ask HN: How do you continuously monitor web logs for hack... by drbawb on Tuesday May 08, 2018 @09:52AM (#17020856)
>focus on removing attack surface, rather than continuously monitoring it.

Amen to that. I stopped caring about these sorts of entries in my HTTP logs when I realized these automated attacks target software packages written for language runtimes I don't even have installed. I'm sure not losing any sleep at night that someone is trying to hit phpMyAdmin or wp-admin on my server that doesn't even have a PHP interpreter.

Re:Ask HN: How do you continuously monitor web logs for hack... by squarefoot on Tuesday May 08, 2018 @12:14PM (#17022049)
A while ago I was looking for a very lightweight system to set up a small CMS with no bells & whistles (Pico, Grav etc), but all of them seem to require PHP. Are there any alternatives around which could also dodge most common attacks by not having installed most common interpreters?
Re:Ask HN: How do you continuously monitor web logs for hack... by tracker1 on Tuesday May 08, 2018 @03:06PM (#17023776)
Look into static site generators... you basically write your site offline, and run a script to deploy it to a static web server (or mostly static). In the end, a web server that doesn't run any code outside delivering content is the most secure web server. It'll be fast, and (usually) near zero attack surface.
Re:Ask HN: How do you continuously monitor web logs for hack... by hueving on Tuesday May 08, 2018 @03:16AM (#17019400)
>But then you have to ask: why is your admin interface available on routable IPs to begin with?

You have railed against network isolation as defense in other threads. Locally-scoped IPs, VPNs, and ACLs are all about network isolation. Care to shed some light on the inconsistency?

Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @07:02AM (#17020083)
I did?
Re:Ask HN: How do you continuously monitor web logs for hack... by danieltillett on Tuesday May 08, 2018 @06:25AM (#17019963)
Removing attack surface make it viable to continuously monitor. I don’t think it is an either/or.

Just out of curiosity has anyone with a cryptographically strong ssh password ever been hacked via the password authentication path unless they gave this password to someone else?

Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @07:16AM (#17020134)
I don't know what "cryptographically strong" means in the context of a password, but I do know people with strong SSH passwords that got owned up, yes. Don't use "cryptographically strong" passwords with SSH. Use keys, disable passwords.
Re:Ask HN: How do you continuously monitor web logs for hack... by danieltillett on Tuesday May 08, 2018 @07:32AM (#17020214)
I mean a password with enough entropy that also hasn't been used before and is not shared with anyone.

Do you know how they were owned? Is there a write up anywhere as this is a super interesting topic.

Re:Ask HN: How do you continuously monitor web logs for hack... by weavie on Tuesday May 08, 2018 @09:44AM (#17020820)
> but I do know people with strong SSH passwords that got owned up

By having their password brute forced, or some other means?

Re:Ask HN: How do you continuously monitor web logs for hack... by sunstone on Wednesday May 09, 2018 @04:03AM (#17028129)
So for example, a 16 character random password is still vulnerable?
Re:Ask HN: How do you continuously monitor web logs for hack... by danieltillett on Wednesday May 09, 2018 @09:00PM (#17035682)
This is what I would like to know. If strong ssh passwords can be broken then there is a bigger issue than just turn off ssh password log in.
Re:Ask HN: How do you continuously monitor web logs for hack... by sunstone on Saturday May 12, 2018 @04:02AM (#17052993)
I am pretty sure that 16 character random passwords are safe from dictionary attacks, and I suspect you and I are using the same process for protecting these passwords. tptacek is leary of our process while you and I are leary of the certs getting out of our control without our knowledge. Security is a handful of trade offs.
Re:Ask HN: How do you continuously monitor web logs for hack... by IncRnd on Tuesday May 08, 2018 @08:56AM (#17020556)
For passwords "cryptographically strong" normally means a password with appropriate complexity and sometimes unpredictability requirements, since entropy is almost nonexistent in passwords.
Re:Ask HN: How do you continuously monitor web logs for hack... by namibj on Tuesday May 08, 2018 @09:54AM (#17020865)
Something out of pwgen or diceware would do though. If your application has length requirements that preclude the latter, make sure they are liable if you loose something due to preventing you from using a secure password. (No one can remember a short secure Password for more than a small handful of applications.)
Re:Ask HN: How do you continuously monitor web logs for hack... by yani on Tuesday May 08, 2018 @02:40AM (#17019265)
It is a good advice but the OP is asking for web log files not ssh and any other logs. You cannot remove the attack surface when the app/service is served via http
Re:Ask HN: How do you continuously monitor web logs for hack... by dx034 on Tuesday May 08, 2018 @11:23AM (#17021552)
If you use a service such as Cloudflare, you can restrict the ip range, ensuring that all requests go through that service (which probably has more experience with malicious requests than the website owner).
Re:Ask HN: How do you continuously monitor web logs for hack... by t3h2mas on Tuesday May 08, 2018 @01:26PM (#17022732)
You cannot remove the attack surface when the app/service is served via http

Remove? Probably not. There are many options for minimizing the attack surface with http.

Re:Ask HN: How do you continuously monitor web logs for hack... by mta13 on Tuesday May 08, 2018 @07:28AM (#17020190)
Good answer, I only came to add that OSQuery should be included in your tool box. Much easier to query for indicators of a problem, especially at scale, than it is to grep through logs and reconstruct an event. This is still a detective tool that would not likely catch an incident in real time, so the preventative measures listed are still best practice, but it should be included as a tool to fall back on.
Re:Ask HN: How do you continuously monitor web logs for hack... by ctack on Tuesday May 08, 2018 @05:56AM (#17019859)
Thanks for this. Just removed ssh login from a server.
Re:Ask HN: How do you continuously monitor web logs for hack... by jalk on Tuesday May 08, 2018 @06:04AM (#17019894)
The suggestion was to only allow logins with ssh keys - not disable ssh logins entirely.
Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @09:54AM (#17020863)
In an ideal world, literally no SSH at all. That's doable in container cattle fleet networks.

In a realistically achievable world for virtually every startup, no routable SSH. No security rule allows 22/tcp from a routable address into a VPC. You want to SSH into a host, you VPN to your network first. This is how most organizations with security teams set up SSH.

If you can't get there, at least get to jump box SSH --- 22/tcp is allowed to exactly one isolated host from the outside world (some people filter source addresses to their jump boxes, I don't bother); to get to real hosts, you bounce through that one.

A network where you can randomly connect to the sshd on real servers is one most security professionals will assume isn't being run competently.

Re:Ask HN: How do you continuously monitor web logs for hack... by ctack on Wednesday May 09, 2018 @04:54AM (#17028340)
Ja, should have been more clear. Removed password login while maintaining existing keys.
Re:Ask HN: How do you continuously monitor web logs for hack... by monkpit on Monday May 07, 2018 @11:47PM (#17018659)
I think you meant “Splunk” :)
Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Monday May 07, 2018 @11:51PM (#17018673)
thx
Re:Ask HN: How do you continuously monitor web logs for hack... by eeZah7Ux on Tuesday May 08, 2018 @07:57AM (#17020313)
Security monitoring is useful and part of a defense-in-depth strategy. So is fail2ban and many other things.
Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @09:55AM (#17020868)
"Defense in depth" is just a way security product salespeople get customers to buy more stuff. If you remove attack surface altogether, you don't need more depth of defense.
Re:Ask HN: How do you continuously monitor web logs for hack... by eeZah7Ux on Wednesday May 09, 2018 @06:48PM (#17034958)
> "Defense in depth" is just a way security product salespeople get customers to buy more stuff.

"just" that? That's a very bold statement that most of the security community would disagree with.

An example: you don't monitor network traffic on the border because you trust your server not to be compromised. Then one gets compromised and the incident goes undetected due to lack of monitoring.

> If you remove attack surface altogether

That's a big if. Services can have a complex life, with software and configuration changing often. Unless you pull the plug you attack surface is never going to be zero and, on top of that, there so guarantee that it stays small. Hence organizations usually have different people taking care of different layers.

Re:Ask HN: How do you continuously monitor web logs for hack... by rambossa on Tuesday May 08, 2018 @10:39AM (#17021186)
this is essential, love the analogy here: https://youtu.be/NUXpz0Dni50?t=14m13s
Re:Ask HN: How do you continuously monitor web logs for hack... by peterwwillis on Monday May 07, 2018 @11:56PM (#17018700)
Or, you know, install these tools and get started:

  Scanners:
   - Nikto (https://cirt.net/nikto2)
   - A comparison of tools from 2017 (http://sectoolmarket.com/price-and-feature-comparison-of-web-application-scanners-unified-list.html)

  Web Application Firewalls:
   - ModSecurity (https://geekflare.com/install-modsecurity-on-nginx/)
   - Enable OWASP rules in ModSecurity (https://geekflare.com/modsecurity-owasp-core-rule-set-nginx/)
   - Vulture (https://www.vultureproject.org/)
   - Pay $500 to have SpiderLabs configure ModSecurity for you (https://ssl.trustwave.com/web-application-firewall)
   - Nginx (https://www.nginx.com/products/nginx-waf/)
   - Azure (https://azure.microsoft.com/en-us/blog/azure-web-application-firewall-waf-generally-available/)
   - AWS (https://aws.amazon.com/waf/)
   - Symantec (https://www.symantec.com/products/web-application-firewall-reverse-proxy)
   - Incapsula (https://www.incapsula.com/website-security/web-application-firewall.html)
   - Smoothwall (holy cow, they're still around? https://us.smoothwall.com/utm/)
   - Shadow daemon (probably defunct, https://shadowd.zecure.org/overview/introduction/)
   - IronBee (same, https://github.com/ironbee/ironbee)

  Hardening guides:
   - Apache (https://www.tecmint.com/apache-security-tips/)
   - Nginx (https://geekflare.com/nginx-webserver-security-hardening-guide/)
Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @12:00AM (#17018723)
Don't do most of this.
Re:Ask HN: How do you continuously monitor web logs for hack... by andyfleming on Tuesday May 08, 2018 @12:04AM (#17018737)
Care to elaborate?
Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @12:06AM (#17018743)
You almost certainly don't want to set up a WAF.

Don't use any of those scanners, all of which look almost exclusively for vulnerabilities you don't have. Do look into getting a Burp license for every developer on your team.

By all means, harden Nginx. Don't pay SpiderLabs to do it for you.

Re:Ask HN: How do you continuously monitor web logs for hack... by _pdp_ on Tuesday May 08, 2018 @06:26AM (#17019968)
There are good burp alternatives too :)
Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @07:12AM (#17020118)
There definitely are! Your stuff included! Burp is just the industry standard.
Re:Ask HN: How do you continuously monitor web logs for hack... by sandGorgon on Tuesday May 08, 2018 @11:57AM (#17021912)
So is it "fix whatever Burp points out" ? Is that a good first step ? Especially for api endpoints (versus websites)
Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @12:25PM (#17022156)
You'd ideally want a dev process where all your developers were capable of conducting integration test runs with Burp; you'd probably set up a checklist of authz tests, and set up some custom wordlists for Intruder for database, filesystem, and DOM injection vectors.
Re:Ask HN: How do you continuously monitor web logs for hack... by sandGorgon on Tuesday May 08, 2018 @01:12PM (#17022606)
Thanks. This was a superuseful suggestion. I can now Google a lot of stuff on my own.
Re:Ask HN: How do you continuously monitor web logs for hack... by sandGorgon on Tuesday May 08, 2018 @12:14AM (#17018775)
This is brilliant.

Thanks !

Re:Ask HN: How do you continuously monitor web logs for hack... by peterwwillis on Tuesday May 08, 2018 @12:09AM (#17018758)
A WAF will stop a lot of the stupid junk that a kid with a "how 2 hax0r" book can make work a disturbing amount of the time.
Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @12:11AM (#17018767)
If any of that stuff is actually working on your site, not having a WAF is the least of your problems. Don't waste time with this stuff.
Re:Ask HN: How do you continuously monitor web logs for hack... by nxc18 on Tuesday May 08, 2018 @12:30AM (#17018827)
I assume you are writing in an attempt to persuade.

Your message is being lost/ignored as a result of your delivery.

We want to understand your message, but you aren't giving enough background. I don't trust your message because there is no supporting background. If you're going to tell me to not do something, either:

A) provide a compelling alternative (not doing $it is not a compelling alternative to $it in nearly all cases) B) explain in detail why you shouldn't do $it. Provide more details if asked.

I want to believe what you are saying and be convinced by it, please help me. (Note: I'm not trying to be a dick, I've just known a lot of people who are perpetually ignored because of this communication style and take forever to learn that lesson because no one bothers to say anything)

Re:Ask HN: How do you continuously monitor web logs for hack... by TeMPOraL on Tuesday May 08, 2018 @02:01AM (#17019125)
I think tptacek's implicit point is this: all the problems you're trying to address with the tools listed are the problems you shouldn't be having in the first place, so, to quote, "focus on removing attack surface, rather than continuously monitoring it".
Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @01:02AM (#17018929)
In this instance, I'm just interested in getting the right answer written down and moving on.
Re:Ask HN: How do you continuously monitor web logs for hack... by hueving on Tuesday May 08, 2018 @03:20AM (#17019412)
tptacek is using an appeal to authority given his standing as a security expert on this forum. That's the only reason his comment containing no justification is being taken seriously.
Re:Ask HN: How do you continuously monitor web logs for hack... by evgen on Tuesday May 08, 2018 @04:16AM (#17019590)
It is also being taken seriously because 1) he is correct, and 2) those of us who do this for a living are literally sick to fucking death of having to explain to management, developers, and sysadmins that there is no silver bullet that you can buy that will fix the mistakes you should have cleaned up five years ago. You still have to do the work. If you need to hear this ("reduce attack surface rather than spend time/money on monitoring attack surface") more than once you are beyond help and it is time for us to move on to people for whom there is at least a possibility that they won't be p0wned in the next 12 months.
Re:Ask HN: How do you continuously monitor web logs for hack... by irundebian on Tuesday May 08, 2018 @09:13AM (#17020637)
This isn't a religious/esoteric forum here. Technical statements should be backed by proper reasons regardless of who is stating something. If you are sick to tell technical reasons then why bothering posting on HN?
Re:Ask HN: How do you continuously monitor web logs for hack... by stronglikedan on Tuesday May 08, 2018 @10:25AM (#17021080)
You're relatively new, but after a while, you get to learn the credibility of some HN'ers by their usernames. Often, you can click their username to find previous comments from the same user where they expounded on the technical details, particularly for subjects that come up here a lot. I don't blame them for not wanting to go into detail each and every time, especially when their reputation gives their comments credibility in place of details.

I'd also like to add that you may want to work on the tone of your comments if you'd like to get enough karma to really participate in the community. Your comment history seems a bit confrontational and argumentative. There are better, friendlier ways to make the same points. I'll defer to the guidelines[0] to explain how you may improve your communication skills.

[0]https://news.ycombinator.com/newsguidelines.html

Re:Ask HN: How do you continuously monitor web logs for hack... by irundebian on Tuesday May 08, 2018 @10:30AM (#17021114)
I'm quite aware of some credibility of some HN users. That doesn't give them the right to give arrogant or non-argument-backed answers. Besides that: There is no reason to base your argument on the age of my account.
Re:Ask HN: How do you continuously monitor web logs for hack... by stronglikedan on Tuesday May 08, 2018 @10:33AM (#17021134)
You may have missed my edit to my previous comment regarding the tone of your comments. I suggest you go back and check it out. (Yet another sign of the age of your account, which is most definitely relevant.)
[dead]
Re:Ask HN: How do you continuously monitor web logs for hack... by stronglikedan on Tuesday May 08, 2018 @10:53AM (#17021289)
Since you're relatively new here, you may not be aware that there are levels of karma that unlock new ways to interact with the site. I'll omit the technical details, since they're readily available with a little research.

I hope your day gets better.

Re:Ask HN: How do you continuously monitor web logs for hack... by irundebian on Tuesday May 08, 2018 @11:04AM (#17021377)
No, not because I'm relative new here but because I don't put too much value in the karma system and what it's offering me, as I wrote before. But thank you and no offense! Hope you a better day, too!
Re:Ask HN: How do you continuously monitor web logs for hack... by tonyarkles on Tuesday May 08, 2018 @03:49PM (#17024225)
Ignore the karma system then. How's your current approach working out for you?
Re:Ask HN: How do you continuously monitor web logs for hack... by lvh on Tuesday May 08, 2018 @10:08AM (#17020958)
Because there are people who are willing to believe that something is good or bad without needing to understand the rationale behind it? Most people making the case for WAFs aren't posting detailed rationales of why WAFs are a good way to spend your resources either.

Example, same author: Cryptographic Right Answers.

(Disclaimer: I work with tptacek.)

[dead]
Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @10:58AM (#17021333)
You are being extremely rude. Nobody on this thread has been as personally abrasive as you have. If you have a technical argument to make, make it; nobody is going to call you names for doing that. Technical arguments, even those you don't feel are adequately supported with evidence, are not insults. But "whataboutism" and "appeals to authority" and "religion" and "arrogance" are insults, and speak to motives and intents, which are things you have no business bringing into this discussion. Stop.
Re:Ask HN: How do you continuously monitor web logs for hack... by irundebian on Tuesday May 08, 2018 @11:50AM (#17021852)
My posts aren't meant to be rude. I feel very sorry if I hurt you or others feelings. I'm not making a point on your general credibility and technical statements - quite the opposite - but some your answers today just seemed to be ignorant for me (and probably some others). If you're giving a simple statement without background (just based on your opinion) and you're friendly asked for your information, then imo you should either don't answer or give back more information, but not just continuing giving answers without background. That's all, and that's not meant to be rude. Just my opinion on your way of posting today, as others have giving me today.
Re:Ask HN: How do you continuously monitor web logs for hack... by c22 on Tuesday May 08, 2018 @02:14PM (#17023223)
No one means to be rude. Rudeness is the byproduct of a lack of self awareness and concern for social mores. Gp (and others in this ridiculous subthread) are trying to give you pointers that will improve the quality of your interactions with this community, which is ironic given the comments that sparked this discussion.
Re:Ask HN: How do you continuously monitor web logs for hack... by SmellyGeekBoy on Tuesday May 08, 2018 @04:57AM (#17019706)
Nope. I upvoted it before even seeing who wrote it. The advice is absolutely spot on. Harden your servers, don't just install a load of tools that look for intrusions after-the-fact and call it a day. I'm not sure why some people aren't getting it.
Re:Ask HN: How do you continuously monitor web logs for hack... by srean on Tuesday May 08, 2018 @06:19AM (#17019947)
Its not that he owes a justification or an explanation or that readers can legitimately feel entitled to one. Paid support is another matter.
Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @07:17AM (#17020141)
If you think I'm wrong, rebut.
Re:Ask HN: How do you continuously monitor web logs for hack... by 0xbadcafebee on Tuesday May 08, 2018 @08:26AM (#17020427)
The fan boys came out to rep you, but they're wrong.

First of all - it takes less than an hour to set up a WAF, and it doesn't worsen your security position. Not only is it free, it's fast and easy and will demonstrably be better than no security at all.

Saying "don't put up a firewall because it isn't perfect" is stupid. You don't have to be a security guru to get that, which obviously several people have, or they wouldn't all be giving you crap about it.

Securing your application long term is a complex, expensive, time consuming process. Suggesting that spending a couple months to be "serious about security" is somehow better than first taking one hour to do the most bare minimum effort is ridiculous.

If I have a computer on the internet, I put a firewall up. Is it defense in depth? No. But that doesn't mean it won't stop the most basic, most common attacks, and it takes no time and no skill to apply it.

I don't know what weird thing you have against WAFs other than apparently they aren't cool or sophisticated enough, but 1) they remove attack surface, 2) they filter the most common drive-bys, 3) they can be both passive and active, 4) they're free, 5) they're easy, 6) they're quick to deploy.

How is it 2018 and I have to explain to you of all people that the web equivalent of iptables might be a good idea if you have zero security?

Re:Ask HN: How do you continuously monitor web logs for hack... by viraptor on Tuesday May 08, 2018 @09:04AM (#17020593)
> WAFs (...) 1) they remove attack surface

They do what you configure them to do. Without knowledge of what's allowed and what's not, they're going to have either false positives or false negatives. And if you have that knowledge, you can fix those issues in the web app rather than hide them with the WAF. A lot of preconfigured WAFs will remove specific matches you don't care about anyway rather than attack surface.

> 2) they filter the most common drive-bys

Common as in known proxy or webapp exploits? If that's the case, why not patch them? (There's a reason to use WAF if you can't patch but that costs time/money to get right and test)

> 3) they can be both passive and active

I'm not even sure what passive WAF means... just logging?

> 4) they're free

Only for very small traffic.

> 5) they're easy 6) they're quick to deploy.

See point 1. If you can't put the right restrictions on the app, why do you think you can put them in WAF? If they're not in the app in the first place, why do you think this way is quicker? It's not a magic box will know your requirements. You need a proper setup or the only thing you achieve is removing obviously silly cgi-bin requests from your log files.

I'm not even against WAFs. Just think the gain from them is been none and minimal if you reduce it to "turn it on, it's cheap and easy". It's really similar to iptables - you can turn it on, but why are you doing it? (On a server anyway) If you have a specific reason/route to protect - great. If not, make sure you bind non-public services to local interfaces and you don't need iptables.

Re:Ask HN: How do you continuously monitor web logs for hack... by lvh on Tuesday May 08, 2018 @10:33AM (#17021129)
I'm going to assume that whenever you say firewall you're talking about a WAF, since you mention "web equivalent of iptables". Disclaimer: I also work with 'tptacek, but opinions my own.

> it takes less than an hour to set up a WAF

Not if you want it to do anything useful. Default WAF rules are mostly useless and come with bypasses -- kinda like XSS filters in browsers, and browsers are in a way better position to judge if XSS is going on or not. You can sort-of get useful WAF rules if you encode most of the invariants of your system in your WAF -- but your app is in a strictly better position to do that sort of validation for you instead.

> and it doesn't worsen your security position.

Yes, except for the shiny new TLS MITM, the pathological parser performance cases, the new attack surface in that WAF itself (hands up if you've seen XSS in a WAF interface) and the continued operational cost of having new infrastructure that sees plaintext... Sure! And then I'm being generous in assuming we're not talking about a virtual appliance or as I like to call them "mystery *nix box you can't patch or audit".

> Securing your application long term is a complex, expensive, time consuming process. Suggesting that spending a couple months to be "serious about security" is somehow better than first taking one hour to do the most bare minimum effort is ridiculous.

Also, unlike WAFs, it's effective.

To be clear: I am not conceding your point about cost. It does not take "months" to identify systemic appsec issues. It also does not take an hour to configure a WAF and have it do something vaguely useful for your application.

Anecdotal evidence: Latacora literally does this systemic-discovery-and-remediation-plan thing for a living as a part of our engagement. "Months" is not our timeline for any kind of systemic appsec issue like SQLi or XSS.

> ... the web equivalent of iptables might be a good idea

Are you really sure you want to stand by that equivalence? How often does one come across iptables bypasses?

Re:Ask HN: How do you continuously monitor web logs for hack... by 0xbadcafebee on Tuesday May 08, 2018 @12:34PM (#17022255)
> Are you really sure you want to stand by that equivalence?

Yes. Both require some knowledge of how to use the tool and rules, but both are not difficult for even a novice to pick up quickly. Not to mention both can be done by either a dev or a sysadmin in the cloud right now, neither of them require in-depth knowledge of the code, and the scope of the change is simple enough that it can be tested and applied quickly.

> "Months" is not our timeline for any kind of systemic appsec issue like SQLi or XSS.

The discussion was about a dev or sysadmin fixing all this themselves ("taking appsec seriously" etc). Not just running Burp on their website. After they identify the vulns they have to have meetings to discuss fixes, figure out how to patch them and test that it works, go through QA and then roll into production. A fix may involve several systems and most people's deploy process is painful. I've never seen that take less than three weeks, and six is more reasonable. Can you do it in less time? Of course. Does that actually happen? Not without paying a consultancy $300k to hold your hand for two weeks.

It is completely plausible to get a WAF up and running and have it provide real protection immediately. CloudFlare's is probably the best example of this, considering the extensive add-ons they provide based on the intrusions they've seen. I don't like CloudFlare's TLS MITM either, but tens of thousands of their customers don't seem to mind.

Just like iptables, ModSecurity doesn't do anything at first. You have to actually make some decisions. Does that mean you shouldn't spend the extra 15 minutes to read a manual and enable some protection?

Earlier it was suggested that protecting against Drupal or Wordpress vulns is unnecessary. I disagree! There's no reason not to protect against drive-by vulns. Filters for XSS/SQLi, unnecessary HTTP features, malicious bots and scanners, directory traversal, RCE, etc are well worth preventing whenever possible.

As for false positives, they're not as bad as they used to be. There are thorough guides designed to help you identify and remove them from your site. https://www.netnea.com/cms/apache-tutorial-7_including-modse... https://www.netnea.com/cms/apache-tutorial-8_handling-false-... For a sysadmin this may take more time, just like it would if you were using iptables to secure a black box. A dev can change the filters immediately to suit their app.

But even if you don't do any active filtering, the passive filters can at least alert you that something is happening so you can go fix it. This is so standard that Kubernetes includes it as an option in their Nginx Ingress Controller. This guide can get you up and running on your existing K8s install in 10 minutes: https://karlstoney.com/2018/02/23/nginx-ingress-modsecurity-...

Re:Ask HN: How do you continuously monitor web logs for hack... by wglb on Tuesday May 08, 2018 @01:17PM (#17022647)
Might I suggest a little research, e.g., reading http://cs.unc.edu/~fabian/course_papers/PtacekNewsham98.pdf

This points out how WAF/NIDS is just a speed bump for a serious attacker.

You may conclude that they don't really 1) remove attack surface 2) Unclear if they really do this, and if they do what value there is 3) See the papers for detail on the differences 4) Zero cost to purchase, but what cost to maintain, run, keep up? 5) see #4 6) even if you have a large web farm?

This paper was writen 20 years ago.

Re:Ask HN: How do you continuously monitor web logs for hack... by peterwwillis on Tuesday May 08, 2018 @03:52PM (#17024251)
I already addressed this. The WAF is a temporary solution. It is not targeted at "serious attackers", it is targeted at drive-by scans and generic exploits.
Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @09:48AM (#17020838)
Nobody said "don't put up a firewall". By all means, set up the rules on your VPC so that only 80/443 hits your ALB and nothing else is routable. But don't futz with iptables on your hosts or god help you setting up a separate AMI for some 3rd party firewall.
Re:Ask HN: How do you continuously monitor web logs for hack... by hueving on Thursday May 10, 2018 @08:28PM (#17044051)
I don't. I was explaining why an comment lacking justifications wasn't being buried
Re:Ask HN: How do you continuously monitor web logs for hack... by raverbashing on Tuesday May 08, 2018 @05:28AM (#17019787)
It's not an appeal to authority when you're really an expert.

Or you go to the doctor and expect him to justify your treatment down to the minor detail? You sound like you talk to your doctor about $overpriced_drug.

Re:Ask HN: How do you continuously monitor web logs for hack... by irundebian on Tuesday May 08, 2018 @09:26AM (#17020711)
And still there are doctors who are prescribing homeopathy and other effect-less "medicine".

It's just reasonable to ask for rational arguments. That's the whole point of the rants here.

Re:Ask HN: How do you continuously monitor web logs for hack... by wglb on Tuesday May 08, 2018 @01:19PM (#17022663)
I posted this elsewhere in the thread. To be convinced, read this frightening paper: http://cs.unc.edu/~fabian/course_papers/PtacekNewsham98.pdf
Re:Ask HN: How do you continuously monitor web logs for hack... by anothergoogler on Tuesday May 08, 2018 @02:53AM (#17019310)
> We want

Please speak for yourself alone. tptacek's comments in the thread are quite clear.

Re:Ask HN: How do you continuously monitor web logs for hack... by pvg on Tuesday May 08, 2018 @01:08AM (#17018940)
I'm not trying to be a dick

You are succeeding without trying. You're essentially complaining some free advice does not fit your exact expectations and specifications. Which is fine, lots of free advice doesn't. Trying to pass this complaint off as some kind of favour to the person giving you free advice, though, is... less than great.

Re:Ask HN: How do you continuously monitor web logs for hack... by irundebian on Tuesday May 08, 2018 @02:07AM (#17019148)
No, tptacek just doesn't give proper answers here because he thinks he can afford it with his status here. He could have just left links to further links/literature.
Re:Ask HN: How do you continuously monitor web logs for hack... by pvg on Tuesday May 08, 2018 @02:44AM (#17019279)
There's nothing 'improper' about the answers, you just don't like how they're presented. As I said, that's a totally fair objection. It's just that nobody owes you free advice in the precise format you find acceptable. That's usually a feature of paid advice.
Re:Ask HN: How do you continuously monitor web logs for hack... by Alex3917 on Tuesday May 08, 2018 @12:38AM (#17018854)
> If any of that stuff is actually working on your site, not having a WAF is the least of your problems.

Is this advice assuming that it's devs who want the WAF, rather than ops or management?

For devs clearly it's not what they should be focusing on. But saying something isn't worth doing because it shouldn't work is a terrible security principle.

Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @12:45AM (#17018879)
I wrote a longer comment here, but decided it wasn't helping.

So, I'm just going to go with: no, if you're really building an application and care about application security, no, you shouldn't waste time setting up a WAF tool designed to help 10,000 employee insurance companies make sure their Wordpress marketing site isn't exposing some vulnerability from 3 years ago.

Not wasting time with dumb stuff like this isn't "terrible security"; every dumb thing you do exacts a cost from good things you could be doing instead.

Re:Ask HN: How do you continuously monitor web logs for hack... by Mandatum on Tuesday May 08, 2018 @01:57AM (#17019111)
Hit the nail on the head. Those suites of tools offered for existing vulnerable software is usually written for platforms and configurations that shouldn't be applicable to 99% of companies.

It's like throwing gauze over an open wound. Some companies don't care enough to put thought into healing the wound altogether, whereas some just wrap it in gauze and hope they don't bleed out. And it usually works - at least for a while, until you get big enough/become a lucrative enough target to a persistent hacker.

It isn't a case of "more security tools == better security", it's a case of "why do I need these tools in the first place". If you aren't analyzing attack surfaces and building security into your software development process, I can only hope the code you write isn't accessible externally.

* using 'you' incorrectly here, speaking to those looking to apply these tools to their setup.

Re:Ask HN: How do you continuously monitor web logs for hack... by lvh on Tuesday May 08, 2018 @10:37AM (#17021166)
To illustrate the principle of removing attack surface with your example of a WP site, instead of parking a WAF in front of it, create a static mirror and move the WP site to your internal network.
Re:Ask HN: How do you continuously monitor web logs for hack... by Alex3917 on Tuesday May 08, 2018 @10:39AM (#17021178)
> setting up a WAF tool designed to help 10,000 employee insurance companies

What's wrong with that use case though? If you get hired as the new CTO, you're not even going to know all the managers, let alone all the developers.

Clearly auditing all code, doing developer training, etc. is the right longterm approach. But putting a security culture in place and actually getting things right in this kind of environment is a multi-year process.

Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Tuesday May 08, 2018 @10:57AM (#17021314)
There's nothing wrong with that use case. I don't love WAFs really in any setting --- I tend to agree with the security nerds I hang out with who call it "the AV of appsec" --- but at least it makes sense in that context.

I'm writing for an audience of people whose businesses own the applications they're deploying. If you control code, you should have at least the security staff required to cut out the extremely low-hanging fruit attack surface that things like WAFs address. Most startups, even with 20+ developers, don't have any full-time security people, and that's fine, because even at the ~20 engineer scale, it's still perfectly feasible to cut out all the WAF-addressed attack surface for your environment.

On rare occasions I'll write advice or give an answer from the perspective of enterprise secops, but unless I say I'm doing that, I'm never really writing from the enterprise perspective. Reddit r/netsec is the right place for that POV.

Re:Ask HN: How do you continuously monitor web logs for hack... by subcosmos on Tuesday May 08, 2018 @01:48AM (#17019087)
"Don't invest in a home security system because your windows should be completely shatterproof"
Re:Ask HN: How do you continuously monitor web logs for hack... by pennaMan on Tuesday May 08, 2018 @02:28AM (#17019217)
"Don't invest in a home security system before you make sure your house has a door"
Re:Ask HN: How do you continuously monitor web logs for hack... by subcosmos on Tuesday May 08, 2018 @05:15PM (#17025194)
Something tells me those taking objection to my comment are missing the point that I am criticizing the parent....

If your counterexample is just reinforcing the parents erroneous point that WAFs only protect against specific applications with known vulnerabilities, and that not all websites have "doors", then you are missing the point that many WAFs have detectors for fairly generic sql injection and path traversal techniques that could very well find problems with even custom application endpoints....

Re:Ask HN: How do you continuously monitor web logs for hack... by tptacek on Wednesday May 09, 2018 @11:34AM (#17030602)
I'm one of a whole bunch of reviewers for Black Hat USA, which is the largest vulnerability research conference in the industry. For the past several years, if you were to submit a universal WAF bypass talk, enabling you to evade detection by every WAF on the market for every common attack, there is a really good chance that talk would not be accepted --- too boring. Almost certainly a WAF bypass that evaded all detection by a single WAF vendor wouldn't make the cut.

So, no, not really interested in generic SQL detection rules in WAFs.

Re:Ask HN: How do you continuously monitor web logs for hack... by balls187 on Tuesday May 08, 2018 @02:26AM (#17019205)
More like, "Don't invest in home security, because your most precious valuables are stored in a safety deposit box at a bank, and everything else is covered by home insurance."
Re:Ask HN: How do you continuously monitor web logs for hack... by sebcat on Tuesday May 08, 2018 @01:10AM (#17018945)
A WAF will also add an attack surface, just like anti-virus software before them.

Company X, a content publisher, has a wordpress site with a bunch of plugins. They hear that the security record of such a setup is less than ideal. They buy a WAF solution to protect them.

Company Y, also a content publisher in the same space, realizes that they don't need dynamically generated content. They don't need tons of JS. They start publishing static content and what little dynamic functionality they have is well-compartmentalized, with interactions to the outside world carefully audited.

Company Y could also get a WAF, but why? It increases the attack surface, Company Y probably don't have the time/expertise to audit it, it is not clear what benefits it will have.

Re:Ask HN: How do you continuously monitor web logs for hack... by technion on Tuesday May 08, 2018 @05:32AM (#17019796)
In addition to the points discussed..

If you follow the Geekflare link to modsecurity, and then follow the link there to a download page, there's this warning:

>NOTE: Some instabilities in the Nginx add-on have been reported (see the Github issues page for details). Please use the "nginx_refactoring" branch where possible for the most up to date version and stay tuned for the ModSecurity version 4.

That's not something I would suggest throwing in production, given that warning has been there for years.

The post itself describes Shadow daemon as "probably defunct".

Ironbee's last commit was two years ago and I get an nxdomain looking for their website.

AWS WAF is both expensive and and extremely manual. You won't get anything out of it without a major labour investment.

Nginx's built in WAF is only in the pro edition, and outside the price of many people.

This whole discussion however depends on your customer. I have an agency I support where I have to provide a report on every single hack attempt. That means if my Rails application gets hit with said three year old Wordpress exploit, and the web server "404", I have to report on how we "blocked" it. And no, "not applicable" is not an answer.

So we throw money at commercial products. And sometimes I recommend doing so. But like security can involve just being aware of your risks, this use of a WAF is about being aware of the real problem you're solving, which is a paper work based one.

Re:Ask HN: How do you continuously monitor web logs for hack... by peterwwillis on Tuesday May 08, 2018 @12:08AM (#17018750)
The problem with throwing tools at the thing is you have no idea what it's doing or how it works or IF it works, and it becomes forgotten about. But it's better than nothing in the short term while you figure out how to secure your application. Slap ModSecurity in front of your app while you go over OWASP and managing cloud infrastructure securely.