Skip to content
This repository was archived by the owner on Sep 17, 2021. It is now read-only.
This repository was archived by the owner on Sep 17, 2021. It is now read-only.

Incorrect logic check for vulnerable OS #23

@LalaNguyen

Description

@LalaNguyen

Hi, the following code marks a patched OS as vulnerable and a vulnerable one as patched.

... 
if (supersedence.Intersect(installedKBs).Any())
{
     vulnerabilities.SetAsVulnerable(name);
}
...

The supersedence stores a list of known KBs for a particular CVE. The installedKBs stores a list of KBs extracted from the target machine. Since we are enumerating for missing KBs, if none of installedKBs is presented in supersedence, the OS is considered as vulnerable. I think the correct one is:

...
if (!supersedence.Intersect(installedKBs).Any())
...

Bests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions