This page describes the installation procedure for CVE-Search on Linux. This installation procedure is written for Ubuntu, but will work on most other distributions. In this guide, we assume you are using apt as your package manager. If you are using a different one, install the requirements using your package manager of choice
In order to install CVE-Search, you will need approximately 3 to 4GB of free disk space, as well as root or administrator access to the machine you want to install it on.
There is no minimum requirements regarding CPU or memory, but slower systems will have a longer load time.
CVE-Search requires the packages you find below in order to function.
Package | Installation |
Python3 | sudo apt-get install python3 |
MongoDB | sudo apt-get install mongodb |
Redis Server | sudo apt-get install redis-server |
PIP3 | sudo apt-get install python3-pip |
Before setting up CVE-Search, you have to make sure the scripts are present on your system. Your best choice is to use git
to clone CVE-Search from its github repository:
git clone https://github.com/cve-search/cve-search.git
Alternatively, you can download the project zip file and extracting it from the offical CVE-Search Project, based of Wim Remes work
The initial setup of CVE-Search happens only once, at the installation. This consists of three steps and one optional step.
Populating the database might take a while when you first run the script. Before you run this script, there are two important parameters you need to set in your configuration.ini file. These settings can be found under the [CVE] section. These settings are:
Setting | Default setting | Explanation |
StartYear | 2002 | The start year of CVE's you want in your database. The lowest setting is 2002, the highest is the current year. |
Setting | Default setting | Explanation |
Host | localhost | The host the Mongo database server is running on |
Port | 27017 | The port that Mongo uses on the host specified above |
DB | cvedb | The database CVE-Search will save its information to. Changing this is a good way to do some testing, without having to restore the entire database afterwards |
This script fills the database with the product information. This information one of the key features of cve-search, as this allows you to search for vulnerabilities for specific systems, and allows you to see to what systems a CVE applies.
It also allows for a user-friendly, readable format for the CPE. This script will translate CVE formats like cpe:/a:adobe:flash_player:14.0.0.125 to readable formats like Adobe Flash Player 14.0.0.125 APSB14-16 where possible.
To run this script, either type ./db_mgmt_cpe_dictionary.py or python3 db_mgmt_cpe_dictionary.py.
This script uses the CVE dictionary from NIST's NVD. As there are a lot of products, they can not make a title for each CVE manually. That's why CVE-Search has another script, called db_mgmt_cpe_other_dictionary.py.
This script takes the CVEs that have no title, and splits them into a human readable format.
To add this dictionary, type python3 db_mgmt_cpe_other_dictionary.py and hit enter.
NOTE: It is possible this script will crash, due to the large amount of information. If this happens, first run python3 db_mgmt_create_index.py
Before updating the database, you have to decide if you will use the web interface of CVE-Search. This interface uses Redis Cache to speed up CVE browsing. If you will be using this feature, make sure your configuration.ini file has the correct settings, and points to your Redis server. The table below explains the several settings.
Setting | Default setting | Explanation |
Host | localhost | The host the Redis database server is running on |
Port | 6379 | The port that Redis uses on the host specified above |
VendorsDB | 10 | The Redis database to store vendor information |
NotificationsDB | 11 | The Redis database to store notifications |
If you want to enable fulltext search, you have to enable this in the database.
To do this, log into the Mongo database ($ mongo) and run the following command: db.adminCommand({"setParameter": 1, "textSearchEnabled":true}).
Note: when the Mongo database is shut down, fulltext search will be disabled again. Simply run the same command again to activate it.
After this procedure the database is initialized and up to date. From this point on, to update the database, you only have to repeat the procedure to update the database.
If you decided not to the optional step, you can still initialize this later on.