Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE Detection #240

Closed
cschuber opened this issue Jan 5, 2024 · 6 comments
Closed

CVE Detection #240

cschuber opened this issue Jan 5, 2024 · 6 comments
Labels
Pending Community Vote The handling of this issue will be determined by a community vote. See issue comments for voting.

Comments

@cschuber
Copy link

cschuber commented Jan 5, 2024

I don't know if there's a better way to do this but running ssh-audit against a RHEL server's sshd seems to result in false CVE reporting. For example, my FreeBSD systems, which use OpenSSH 9.6p1, will correctly report all CVEs being fixed because FreeBSD usually imports OpenSSH (though may backport patches when an import is not possible at the time). But RHEL servers, including RHEL 9.2, report CVEs that RH has documented as being fixed. ssh-audit version vulnerability database (versionvulnerabilitydb.py) performs a simple version check, which BTW commercial products such as Tennable also do. False reporting of CVEs makes no sense because Red Hat backports patches to their "ancient" openssh, updating the Red Hat build number in the RPM version number.

I think this gives a false sense of problem when there may not be. I suspect other Linux distros may do the same.

I don't know if it is worth expanding the vulnerability database to include vendor build numbers, not report on CVEs for vendor supplied OpenSSH, or simply provide an option not to report on the CVE. This is a similar problem I see with Tennable's Nessus product. Simple version number checks tell auditors and others that there is a problem when there may not be, and it casts doubt on the validity of the output. I understand the difference but others (auditors) may not.

An option may be to document this.

Just looking for you comment about this one way or another.

@jtesta
Copy link
Owner

jtesta commented Jan 28, 2024

The CVE code was written by the original author. I did make some additions to its database over time, but I haven't kept up with it... mainly for the same reasons you've mentioned: because they're solely based on version checks, which often lead to inaccurate results due to distros back-porting fixes.

I think its time to consider removing the CVE functionality. Not only does it give many false positives, but users have rarely complained that it hasn't been updated in quite some time with the latest vulns. I'm thinking very few people, if any, are consuming this info.

Let's use this post to vote from now until August 1, 2024. Anyone who wants to keep the version check-based CVE info, add a thumbs-down ( 👎 ) to this post.

@skull-squadron
Copy link

skull-squadron commented Apr 12, 2024

Version-based CVE "checking" is a bad idea and leads to mission creep.

Guessing based on version banners will produce both false alarms (false positives) and, worse, potentially a false sense of security (false negatives) in some instances which would be catastrophic.

This method of vulnerability auditing is extremely fragile because top-tier LTS Linux distros backport patches (albeit with some delay) to numerically "vulnerable" versions but don't consistently update their server banners to something that can be distinguished.

Instead, the gold standard of vuln auditing is using real, precise, accurate, and {,semi-}benign PoCs for each CVE to probe a service to determine with high confidence if they are actually patched. And it's far easier to roll out vulnerability auditing, management, and remediation on systems with local access, in which case "whitebox" testing is much easier. If one needs remote CVE management, the usual vendors like Tenable, Rapid7, CrowdStrike and similar vendor(s) exist and already have solutions. Unfortunately, independently cobbling together high-confidence CVE detection isn't something that would be cheap, quick, or easy.

If instead choosing to continue down this road, perhaps start with 1 CVE and create automated testing that can reliably prove detected on all major systems with both known vulnerable and known patched release packages. The fixed setup costs of this feature will be both a lot of work and require nontrivial rigor to ensure correctness.

Either way, PSA: please secure your systems with regular updates and do the work yourself to audit vendor's package source to verify remediation patches have been applied.

@FlyingPhish
Copy link

I agree it's probably best to comment out the CVE stuff until a more robust function is created.

@jtesta jtesta added the Pending Community Vote The handling of this issue will be determined by a community vote. See issue comments for voting. label Jul 2, 2024
@l4rm4nd
Copy link

l4rm4nd commented Aug 21, 2024

Version-based CVE "checking" is a bad idea and leads to mission creep.

Guessing based on version banners will produce both false alarms (false positives) and, worse, potentially a false sense of security (false negatives) in some instances which would be catastrophic.

This method of vulnerability auditing is extremely fragile because top-tier LTS Linux distros backport patches (albeit with some delay) to numerically "vulnerable" versions but don't consistently update their server banners to something that can be distinguished.

Instead, the gold standard of vuln auditing is using real, precise, accurate, and {,semi-}benign PoCs for each CVE to probe a service to determine with high confidence if they are actually patched. And it's far easier to roll out vulnerability auditing, management, and remediation on systems with local access, in which case "whitebox" testing is much easier. If one needs remote CVE management, the usual vendors like Tenable, Rapid7, CrowdStrike and similar vendor(s) exist and already have solutions. Unfortunately, independently cobbling together high-confidence CVE detection isn't something that would be cheap, quick, or easy.

If instead choosing to continue down this road, perhaps start with 1 CVE and create automated testing that can reliably prove detected on all major systems with both known vulnerable and known patched release packages. The fixed setup costs of this feature will be both a lot of work and require nontrivial rigor to ensure correctness.

Either way, PSA: please secure your systems with regular updates and do the work yourself to audit vendor's package source to verify remediation patches have been applied.

That's what it comes down too. Perfect summary.

Security backporting practice, especially in OpenSSH, will not allow to determine the exact patch level of the OpenSSH product from an outside view. Instead, only the regular version banner is exposed. Stating CVEs against this simple version banner leads typically to false-positives only. This is often seen in pentests, as the auditors do not really understand what security backporting practice is and that the disclosed version is not in fact the real version or patch status.

I would suggest removing the CVE section completely. Only return the version in use as info data point and that's it.

@jtesta
Copy link
Owner

jtesta commented Sep 26, 2024

In my above comment on January 28, 2024 (#240 (comment)), I sought feedback from the community regarding my proposal for removing CVE information based on version numbers. As of today, nearly 8 months later, the official vote is: 10 in favor of removal, and 3 against.

A patch to remove the version-based CVE information will be merged shortly.

@jtesta
Copy link
Owner

jtesta commented Sep 26, 2024

Completed in 93b30b4.

@jtesta jtesta closed this as completed Sep 26, 2024
This was referenced Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending Community Vote The handling of this issue will be determined by a community vote. See issue comments for voting.
Projects
None yet
Development

No branches or pull requests

5 participants