Skip to content

GSoC 2019 Project Idea: Add new checkers to the CVE Binary Tool #24

@terriko

Description

@terriko

The CVE Binary tool team is hoping to participate in Google Summer of Code (GSoC) under the Python Software Foundation umbrella. You can read all about what this means at http://python-gsoc.org/. This issue, and any others tagged 'gsoc' are not generally available bugs, but related to project ideas for GSoC.

Project Idea : Add new checkers to the CVE Binary Tool

Project description: The CVE Binary Tool, at launch, only has checkers for 10 different open source libraries. We have a list of over 50 that are being added to our issues list (search for new checkers) that we'd like to have in our next few releases. For this project, you'll implement as many of those as you can, including producing tests.

(Don't worry that we're going to run out of checkers -- if we exhaust the current list, we can definitely find more to add.)

Skills: Python, git, experience reading source code for other languages a bonus

Difficulty level: Easy

Related Readings/Links: How to add new checkers

Potential mentors: @terriko @pdxjohnny @WhataTiberius

Getting Started: Python requires that all students submit a code sample as part of your application. For your first pull request, we recommend you write a new test case for an existing checker. The easiest one to do as a first pull request is a scanner test for a new version of a library we can already detect.

  • Existing tests are in test/
  • You can see the scanner tests in 'tests/test_scanner.py'
  • To add a new one, make a new test case that detects a few CVEs known to occur in this version, and a few that are known not to occur in that version. For example, here's what the current openssl test looks like:
    def test_openssl_1_0_2g(self):
        """Scanning test-openssl-1.0.2g.out"""
        self._binary_test(
            'test-openssl-1.0.2g.out',
            'openssl',
            '1.0.2g',
            [
                # Check for known cves in this version
                "CVE-2016-2107",
                "CVE-2016-2105",
                "CVE-2016-2106",
                "CVE-2016-2109",
                "CVE-2016-2176",
            ],
            [
                # Check to make sure an older CVE isn't included
                "CVE-2016-0800",
            ])
  • Not sure what CVEs apply to a version? The checkers themselves often have links, and have the vendor/product pair so you can find them in the national vulnerability database as well. Here's a link to the openssl checker for you to look at and the rest are in cve-bin-tool/checkers/
  • You'll also need to make a fake file designed to trick the checker into thinking it has found that version of the library. You can see these files in test/binaries/
  • Please note that sometimes the database we're using doesn't have perfect mapping between CVEs and product versions -- if you try to write a test that doesn't work because of that mapping but the description in the CVE says that version should be vulnerable, don't discard it! Instead, make a note of it in a comment here so we can investigate and maybe report it upstream.

Extra credit: Got your test working and want to try something more? You can also try adding a checker before the project starts. See the related readings above for instructions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gsocTasks related to our participation in Google Summer of Code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions