The security scanner that cried wolf
pythonspeed.com
pythonspeed.com
The question is "do you want to know about a valid CVE if there's no patch available"?
For high security environments, the answer might be yes (you want to evaluate individual patches to see if they impact your application)
For many environments the answer is likely (as is the case with OP) no, you only want to know about issues for which there is an updated package available.
Interestingly (well to me :) ) more established scanning tools (e.g. Tenable Nessus) default to "no" on this question and container scanning tools mostly default to "yes". (I did an example comparison https://raesene.github.io/blog/2020/11/22/When_Is_A_Vulnerab...)
The important part is that your organization makes an informed choice about which works best for them.
As a sidenote there are also differences in severities and how vulnerabilities are counted (e.g. if you have multiple issues in a package do you count each one or just count once for that package) which can lead to different numbers of issues being reported by different scanners. https://raesene.github.io/blog/2020/06/21/Container_Vulnerab...
I’m especially thinking about things like (IIRC) that old Debian man packaging issue where the exploit only affected the post-install script and since it was so late in the life of that release they basically said they wouldn’t ship an update unless there was another issue forcing it.
I've seen multiple known OSS authors speaking publicly unfavorably about these security scanners. It seems everyone is offering a "solution" to the vulnerability issue with Open Source, but they do it in a way that at best it's a reminder to update your dependencies (as noted in the article) and at worst it's a burden to OSS authors.
Their interests are also very misaligned with everyone else in the field; best security practices are to communicate security issues with the author privately, have you or them make a fix with a reasonable timeline and then publish a fix for everyone (or reveal the issues publicly after X days). That'd help both authors and users, but unfortunately it doesn't help selling the security tools.
Instead, due to this misalignment of incentives, the current player's workflow include bad practices like:
- First time someone notices a potential vulnerability they will register it in their system, and then if you are lucky you'll get a public issue. Responsive disclosure sounds like "no publicity for us so nah".
- Paint features as security vulnerabilities. Example: your "arbitrary command execution tool" can "execute arbitrary commands" or "your JSON reading tool can read JSON". Well, thanks, that's totally useless.
- Tell users that your dev libraries, that never end up in production, have critical vulnerabilities. Sure if my CSS compilation tool has one it won't matter since it doesn't end up in the production server (unless it's a vuln. in the output).
Edit: for a positive note, these are the current champions IMHO that are helping the ecosystem in this field (besides authors themselves ofc):
- Github's free Actions for OSS. This has been amazingly helpful for testing for free and easily, and basically my turning point on believing that Microsoft has evolved for the better.
- Hundreds or thousands of volunteer fellow OSS authors disclosing vulnerabilities privately. They are mostly anonymous, but def a huge force.
- Companies releasing open source, since they are in a better position to offer big well-rounded libraries that reduce your dependency graph.
This is pretty funny to me.
I live on the other side of this, and let me tell you, what you don't often hear, and what we legally can't tell you, is that there are dozens of financial institutions running your "command execution as a service" tool open to the internet with default admin creds because they think it's a simple uptime monitor.
I have broken into multiple Fortune 500 companies using these sorts of bugs, and because I actually do want to live in a world where people can trust their technology, I do the right thing and report them. These bugs often get de-prioritized, or closed as WONTFIX because they're only applicable in really obscure situations that would never happen in the real world.
My favorite example of this happening is when Homokov was trying to get mass assignment disabled by default, and his issues on GitHub kept getting closed because it was a feature, and only an idiot would screw up mass assignment, so he exploited a mass assignment bug in GitHub to create an issue from 1000 years in the future warning the past about letting mass assignment bugs persist. Since it was from the future, it was always on top of the issues list, serving as a constant reminder to the rails developers that their security posture is a joke.
If you want powerful tools these are also dangerous. Sure we should try to make our libraries as safe as possible and pick the safer version everything being the same, but everything is not the same.
"there are dozens of financial institutions running your "command execution as a service" tool open to the internet with default admin creds because they think it's a simple uptime monitor" that's 9 out of 10 on the companies' side in my experience (except for the "default admin creds", which we all know should be prompted/created on the first run).
What if the dev is the CTO? https://arstechnica.com/gadgets/2021/03/rookie-coding-mistak...
Of course, you can't just simply reject a PR from the CTO. Getting them to change their ways often require delicate skills in key stakeholder management and re-aligning them with core company vision.
If you end up not flagging something and it causes a vulnerability to become a data leak, you will end up getting blamed as a classic "noone could have seen this coming"
The risk of failure to you is low.
That's the difference, they are shifting the burden of security to you... since if you don't patch the "exploit" which may not be an exploit, they can always point back to you in case there is a security breach because you didn't listen to the "magical scanner".
It's a clear conflict of interest from twisted incentives. Additionally, if the thing never throws up any exploit warnings, you might wonder why you're paying so much for this fancy alerting thing.
Enterprise security tools care mostly about catering to people like you who can't be bothered to investigate security issues.
There are a totally different set of tools for those of us who actually want to find bugs, and the false positive rate (false:true ratio) on the best of those tools is more like 100:1. Often those tools have false positive rates of 1000:1 or even 10000:1, and people have built good machine learning models to sift through the findings automatically and sort them by likelihood of exploitability.
It blows me away to hear people complain about the existence of false positives at ratios like 1:1. If only 50% of the findings in your tool are false positives, you are absolutely missing a ton of real bugs that will eventually be found by people who get paid to find real bugs.
Now think about the fact that most auditors want you running a scanner on your network (and it's required for certain legislation like GDPR)
(Making something up here)
CVE: OpenSSL: RSA is broken
Likelihood of exploitation: high
Impact on our business: none. We migrated off RSA years ago.
Overall risk: Low
Of course, you shouldn't panic just because this issue exists, especially if you know it does not affect you right now. But leaving this unattended, especially without the huge exclaimer that you can not accept untrusted ciphertext, can easily come back to bite you. Maybe it was exactly what caused this (theoretical) issue in the first place.
Or do you consider "low" a won't fix / not applicable categorization?
If an automated process really could find vulnerabilities to the same fidelity as a human pentester, that would be groundbreaking. In most cases, companies don't want to fork out the cost for real security, so they run these useless scanners instead.
Here's a better idea, how about you flag when I actually use the mode? If I don't use it, don't flag and let me get on with my real job.
To top off the scanner didn't support suppressing single vulnerabilities so our options were (1) the build remained "unstable" forever or (2) we ignore the scanning result so we can get back to a stable build.
This reminds me of the era when everyone thought that the way to prevent users from doing things that permanently delete data and can't be undone was to throw up a big red "Are you sure?" confirmation. After a while users use got habituated to clicking "Yes", which made the warnings useless.
I revoked my own "mess with the hyper" credentials that time. I didn't even know i could do that.
One example: I enabled AWS Security Hub to have some sort of security score on my account and although it found a few interesting, it generates way too much noise to be usable.
Microsoft also has this sort of security score for Azure and Office 365 environments and they have the same issues.
One of the craziest recent examples was a scan using a tool called Twistlock. Many of our images are built from an upstream image that may have outdated apt dependencies, so one of the first things we do is upgrade them. Twistlock flagged _every instance_ of this because "Package binaries should not be altered" (in other words, between subsequent layers in an image). I am baffled how anyone at Twistlock decided that this was a useful thing for their product to detect, or why any Twistlock customer trusts it given issues like this.
If I was injecting something malicious into your containers via updates, this is exactly how I would go about doing it and exactly what would catch it.
What I'm seeing here is that Twistlock and other tools don't reliably do a good job of explaining why something is flagged in a way that's understandable and accessible to developers. Though honestly I've yet to find any approach to informing developers that actually works.
My favorite was giving them a clear link in the error message about why the build was failing and how to fix it.
It is annoying to have to mark false positives, but that's just the nature of the beast when it comes to being thorough about security. More annoying with this check than when you update packages in a container image instead of starting clean is that this same technique is often used to compare hashes of packages managed by an installer versus what is actually on disk, and thus flags every single package in a JIT-compiled language that caches byte code on disk as altered.
If they were serious about build errors they could use the built-in features of APT, YUM, etc. to only report binaries which don’t match the canonical distribution’s hashes, as has been standard sysadmin practice for aeons.
Security is a dynamic process, and scanners are a tool to help compare the current state of your systems with the policies you have set. Out of the box, the scanners can not be aware of your policies and will by necessity produce false positives.
Probably other people find it more useful.
I mean, a professional does. I'm not sure who you're working with but mapping an automated finding to a real risk is par for the course. If anyone ever just hands you the output of a Nessus scan with no context, then you just wasted your money on their services.
But while "no patch available" is a problem, I think it's the wrong problem to think about. One obvious concern about that line of thinking is that an exposure is an exposure regardless of whether there's a patch available.
The bigger problem, not just with container scanners but with all sorts of scanners (Node dependency scanners are another good example) is that there's a huge incentive to "enumerate" vulnerabilities with CVEs, and most of these vulnerabilities are meaningless.
I spent a couple years at my previous gig triaging security scanner results. Like pretty much everyone who does this professionally, I got so I could do this pretty quickly, and without much though about my actual environment; whole classes of vulnerabilities are pretty much garbage, and most people would be better off if their scanner required a special flag to alert on them.
What you really need to know is, given a vulnerability, is it likely to constitute an exposure in my environment? Clearly, a scanner vendor can't do this analysis perfectly. But they can do more than the zero they do now.
I started my computer security career at a firm called Secure Networks. We sold a security scanner called Ballista. We competed with a much-better-known firm called ISS, who sold the eponymous ISS scanner. The big debate between us and in the market was how to "count" vulnerabilities; ISS, for instance, had a huge collection of Windows registry best-practices rules, and claimed every one of them as (in effect) a vulnerability, while we tried to claim only what our scanner could actually exploit.
We lost that debate, obviously, and the CVE system followed shortly thereafter.
I think the general thing to keep in mind is that, for the most part, modern security scanner teams are pretty small. They're driven off vendorsec and CVE feeds because that's automatable. Like ISS vs SNI, they compete with each other, and their figure of merit is often "how many", not "how important" --- a metric they're not staffed to generate anyways. I wouldn't put much stock in their results.
I feel like there's an opportunity for a business where you can log a ticket with them for Debian issues and they just read the security tracker page and tell you whether it will be fixed or not.
Is IBM/redhat paying someone here? I don't understand why it would be different.
What scanners are often doing is pulling the published Sec-db for a distribution and using that as their data source. So as a result they can only report on things that are in the data source.
The common way to do that is to lean on the linux distribution's package management system, which is why the way it works varies from distro to distro.
> this image has every security update put out by Debian
But the scanner still flagged it.
Do you want to spend time in meetings explaining why 100+ CVEs are nonsense or would you rather get Alpine up and running? I know which I would have more fun doing ;)
I know, it's not really an issue (from a security perspective) but try explaining that to an audit manager who only wants to get a 'good' report for the board.
This is really more of an indication of what is wrong with the security industry.
Redhat came up with 0 security issues, whilst Debian came up with 63 illegal/wontfix issues. Just do your homework, Debian!