Skip to content

Adding new fields for vulnerability detector alerts#4836

Merged
chemamartinez merged 7 commits into4749-vuln-NVDfrom
4763-alerts-with-vulnerabilities-metadata
Apr 15, 2020
Merged

Adding new fields for vulnerability detector alerts#4836
chemamartinez merged 7 commits into4749-vuln-NVDfrom
4763-alerts-with-vulnerabilities-metadata

Conversation

@DProvinciani
Copy link
Copy Markdown
Contributor

Related issue
4763

Description

This pull request is intended to improve the information provided in the vulnerability detector alerts by the addition of some extra information. Here a description of the new fields.

  • Ubuntu: Now the alerts report the bugzilla_reference if it is provided in the vulnerability feed.
  • RedHat: Now the alerts report the CVSS3 vector information. Before this change, this information was not taken from the feed generating multiple error logs.
  • NVD: Now the alerts report the assigner and cve version information.

Configuration options

No new configurations were added. In order to test this change is just needed to generate alerts for each platform and verify the presence of the new information fields.

Logs/Alerts example

  • Ubuntu alert sample
    {
        "timestamp": "2020-04-02T02:03:24.212-0300",
        "rule": {
            "level": 7,
            "description": "CVE-2017-9763 on Ubuntu 18.04 LTS (bionic) - medium.",
            "id": "23504",
            "firedtimes": 7,
            "mail": false,
            "groups": [
                "vulnerability-detector"
            ],
            "gdpr": [
                "IV_35.7.d"
            ],
            "pci_dss": [
                "11.2.1",
                "11.2.3"
            ]
        },
        "agent": {
            "id": "001",
            "name": "Ubuntu-WAgent",
            "ip": "192.168.0.122"
        },
        "manager": {
            "name": "centos-wserver"
        },
        "id": "1585803804.39009",
        "decoder": {
            "name": "json"
        },
        "data": {
            "vulnerability": {
                "cve": "CVE-2017-9763",
                "title": "CVE-2017-9763 on Ubuntu 18.04 LTS (bionic) - medium.",
                "severity": "Medium",
                "published": "2017-06-19T16:29:00Z",
                "state": "Fixed",
                "package": {
                    "name": "grub-common",
                    "version": "2.02-2ubuntu8.15",
                    "architecture": "amd64",
                    "condition": "Package less than 2.02~beta3-4ubuntu5"
                },
                "bugzilla_reference": "https://github.com/radare/radare2/issues/7723",
                "reference": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9763"
            }
        },
        "location": "vulnerability-detector"
    }
  • RedHat alert sample
    {
        "timestamp": "2020-04-02T02:03:07.611-0300",
        "rule": {
            "level": 10,
            "description": "hw: Machine Check Error on Page Size Change (IFU)",
            "id": "23505",
            "firedtimes": 1,
            "mail": false,
            "groups": [
                "vulnerability-detector"
            ],
            "gdpr": [
                "IV_35.7.d"
            ],
            "pci_dss": [
                "11.2.1",
                "11.2.3"
            ]
        },
        "agent": {
            "id": "000",
            "name": "centos-wserver"
        },
        "manager": {
            "name": "centos-wserver"
        },
        "id": "1585803787.7629",
        "decoder": {
            "name": "json"
        },
        "data": {
            "vulnerability": {
                "cve": "CVE-2018-12207",
                "title": "hw: Machine Check Error on Page Size Change (IFU)",
                "severity": "High",
                "published": "2019-11-12T18:00:00Z",
                "state": "Fixed",
                "cvss": {
                    "cvss3": {
                        "vector": {
                            "attack_vector": "local",
                            "access_complexity": "low",
                            "confidentiality_impact": "low",
                            "integrity_impact": "none",
                            "availability": "high",
                            "privileges_required": "low",
                            "user_interaction": "none"
                        },
                        "base_score": "6.500000"
                    }
                },
                "package": {
                    "name": "kernel",
                    "version": "4.18.0-147.el8",
                    "architecture": "x86_64",
                    "condition": "Package less than 4.18.0-147.0.2.el8_1"
                },
                "advisories": "RHSA-2019:3841,RHSA-2019:3842,RHSA-2019:3941,RHSA-2019:3843,RHSA-2019:3832,RHSA-2019:3833,RHSA-2019:3844,RHSA-2019:3860,RHSA-2019:3840,RHSA-2020:0026,RHSA-2020:0028,RHSA-2020:0204,RHSA-2019:3838,RHSA-2019:3839,RHSA-2019:3916,RHSA-2019:3834,RHSA-2019:3835,RHSA-2019:3836,RHSA-2019:3936,RHSA-2019:3837",
                "cwe_reference": "CWE-226",
                "bugzilla_reference": "https://bugzilla.redhat.com/show_bug.cgi?id=1646768",
                "reference": "https://access.redhat.com/security/cve/CVE-2018-12207"
            }
        },
        "location": "vulnerability-detector"
    }
  • Windows alert sample
{
    "timestamp": "2020-04-03T02:38:11.815-0300",
    "rule": {
        "level": 10,
        "description": "A memory corruption vulnerability exists in the Windows Server DHCP service when processing specially crafted packets, aka 'Windows DHCP Server Denial of Service Vulnerability'. This CVE ID is unique from CVE-2019-1206.",
        "id": "23505",
        "firedtimes": 1,
        "mail": false,
        "groups": [
            "vulnerability-detector"
        ],
        "gdpr": [
            "IV_35.7.d"
        ],
        "pci_dss": [
            "11.2.1",
            "11.2.3"
        ]
    },
    "agent": {
        "id": "003",
        "name": "W10RS3-WAgent",
        "ip": "192.168.0.125"
    },
    "manager": {
        "name": "centos-wserver"
    },
    "id": "1585892291.30256004",
    "decoder": {
        "name": "json"
    },
    "data": {
        "vulnerability": {
            "cve": "CVE-2019-1212",
            "title": "A memory corruption vulnerability exists in the Windows Server DHCP service when processing specially crafted packets, aka 'Windows DHCP Server Denial of Service Vulnerability'. This CVE ID is unique from CVE-2019-1206.",
            "severity": "High",
            "published": "2019-08-14",
            "updated": "2019-08-20",
            "state": "Fixed",
            "cvss": {
                "cvss2": {
                    "vector": {
                        "attack_vector": "network",
                        "access_complexity": "low",
                        "authentication": "none",
                        "confidentiality_impact": "low",
                        "integrity_impact": "none",
                        "availability": "complete"
                    },
                    "base_score": "7.800000"
                },
                "cvss3": {
                    "vector": {
                        "attack_vector": "network",
                        "access_complexity": "low",
                        "confidentiality_impact": "low",
                        "integrity_impact": "none",
                        "availability": "high",
                        "privileges_required": "none",
                        "user_interaction": "none",
                        "scope": "unchanged"
                    },
                    "base_score": "7.500000"
                }
            },
            "package": {
                "name": "Windows 10",
                "generated_cpe": "o:microsoft:windows_10:1709:::::::",
                "condition": "4512517 patch is not installed."
            },
            "cwe_reference": "CWE-119",
            "reference": "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-1212",
            "assigner": "cve@mitre.org",
            "cve_version": "4.0"
        }
    },
    "location": "vulnerability-detector"
}

Tests

  • Compilation without warnings in every supported platform
    • Linux
    • Windows
    • MAC OS X
  • Source installation
  • Package installation
  • Source upgrade
  • Package upgrade
  • Review logs syntax and correct language
  • QA templates contemplate the added capabilities
  • Memory tests for Linux
    • Scan-build report
    • Coverity
    • Valgrind (memcheck and descriptor leaks check)
    • Dr. Memory
    • AddressSanitizer

@chemamartinez chemamartinez merged commit 53b9210 into 4749-vuln-NVD Apr 15, 2020
@chemamartinez chemamartinez deleted the 4763-alerts-with-vulnerabilities-metadata branch April 15, 2020 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vulnerability Detector: Populate alerts with the vulnerabilities metadata

2 participants