Cyber security

CVE Collector – A Python Tool For Managing CVE Data

Discover how to create a powerful CVE Collector using Python. This article provides guidance on collecting, managing, and staying updated on Common Vulnerabilities and Exposures (CVE) data.

Learn to build a simple, web-crawling tool that retrieves CVE information, stores it in a delimiter-based database, and keeps you informed about the latest vulnerabilities.

Simple Latest CVE Collector Written in Python

  • There are various methods for collecting the latest CVE (Common Vulnerabilities and Exposures) information.
  • This code was created to provide guidance on how to collect, what information to include, and how to code when creating a CVE collector.
  • The code provided here is one of many ways to implement a CVE collector.
  • It is written using a method that involves crawling a specific website, parsing HTML elements, and retrieving the data.

This collector uses a search query on to collect information on vulnerabilities with a severity score of 6 or higher.

Features

  • It creates a simple delimiter-based file to function as a database (no DBMS required).
  • When a new CVE is discovered, it retrieves “vulnerability details” as well.

How To Set Up

  1. Set the cvss_min_score variable.
  1. Add addtional code to receive results, such as a webhook.
  • The location for calling this code is marked as “Send the result to webhook.”
  1. If you want to run it automatically, register it in crontab or a similar scheduler.

Preview

# python3 main.py

*2023-10-10 11:05:33.370262*

1. CVE-2023-44832 / CVSS: 7.5 (HIGH)
- Published: 2023-10-05 16:15:12
- Updated: 2023-10-07 03:15:47
- CWE: CWE-120 Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

D-Link DIR-823G A1V1.0.2B05 was discovered to contain a buffer overflow via the MacAddress parameter in the SetWanSettings function. Th...
>> https://www.cve.org/CVERecord?id=CVE-2023-44832

- Ref.
(1) https://www.dlink.com/en/security-bulletin/
(2) https://github.com/bugfinder0/public_bug/tree/main/dlink/dir823g/SetWanSettings_MacAddress



2. CVE-2023-44831 / CVSS: 7.5 (HIGH)
- Published: 2023-10-05 16:15:12
- Updated: 2023-10-07 03:16:56
- CWE: CWE-120 Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

D-Link DIR-823G A1V1.0.2B05 was discovered to contain a buffer overflow via the Type parameter in the SetWLanRadioSettings function. Th...
>> https://www.cve.org/CVERecord?id=CVE-2023-44831

- Ref.
(1) https://www.dlink.com/en/security-bulletin/
(2) https://github.com/bugfinder0/public_bug/tree/main/dlink/dir823g/SetWLanRadioSettings_Type

How To Collect CVE Information

The methods for collecting CVE (Common Vulnerabilities and Exposures) information are divided into different stages. They are primarily categorized into two

(1) Method for retrieving CVE information after vulnerability analysis and risk assessment have been completed.

  • This method involves collecting CVE information after all the processes have been completed.
  • Naturally, there is a time lag of several days (it is slower).

(2) Method for retrieving CVE information at the stage when it is included as a vulnerability.

  • This refers to the stage immediately after a CVE ID has been assigned and the vulnerability has been publicly disclosed.
  • At this stage, there may only be basic information about the vulnerability, or the CVSS score may not have been evaluated, and there may be a lack of necessary content such as reference documents.
Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

Understanding the Model Context Protocol (MCP) and How It Works

Introduction to the Model Context Protocol (MCP) The Model Context Protocol (MCP) is an open…

4 hours ago

The file Command – Quickly Identify File Contents in Linux

While file extensions in Linux are optional and often misleading, the file command helps decode what a…

13 hours ago

How to Use the touch Command in Linux

The touch command is one of the quickest ways to create new empty files or update timestamps…

14 hours ago

How to Search Files and Folders in Linux Using the find Command

Handling large numbers of files is routine for Linux users, and that’s where the find command shines.…

14 hours ago

How to Move and Rename Files in Linux with the mv Command

Managing files and directories is foundational for Linux workflows, and the mv (“move”) command makes it easy…

14 hours ago

How to Create Directories in Linux with the mkdir Command

Creating directories is one of the earliest skills you'll use on a Linux system. The mkdir (make…

14 hours ago