CVE Search v2 Deprecated
Deprecated. Use CIRCL CVE Search instead.
Vulnerability Management · CVE Search (Deprecated)
Details
| ID | CVE Search v2 |
|---|---|
| Provider | Open Source |
| Category | Vulnerability Management |
| From Version | 5.0.0 |
| Docker Image | demisto/python3:3.10.12.63474 |
| Supported Modules | Agentix |
README
Overview
Search CVE Information - powered by circl.lu
This integration was integrated and tested with CVE Search (Version 2.1).
Use Cases
- Getting information about a specific cve
- Getting the latest published cve’s
Configure CVE Search on Cortex XSOAR
- Navigate to Settings > Integrations > Servers & Services.
- Search for CVE Search v2.
- Click Add instance to create and configure a new integration instance.
- Name: a textual name for the integration instance.
- Server URL
- Click Test to validate the URLs and connection.
Commands
You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.
- cve-latest
- cve
1. cve-latest
Retruns the latest updated CVEs.
Base Command
cve-latest
Input
| Argument Name | Description | Required |
| — | — | — |
Context Output
| Path | Type | Description |
|---|---|---|
| CVE.ID | String | The ID of the CVE. |
| CVE.CVSS | String | The CVSS score of the CVE. |
| CVE.Published | Date | The date the CVE was published. |
| CVE.Modified | Date | When CVE was last modified. |
| CVE.Description | String | The description of the CVE. |
| DBotScore.Indicator | String | The indicator value. |
| DBotScore.Score | Number | The indicator score. |
| DBotScore.Type | String | The indicator type. |
| DBotScore.Vendor | String | The vendor reporting the score of the indicator. |
Command Example
!cve-latest limit=2
Context Example
{
"CVE": [
{
"ID": "CVE-2020-7998",
"Published": "2020-01-28T05:15:00",
"CVSS": 5,
"Modified": "2020-01-28T05:15:00",
"Description": "An arbitrary file upload vulnerability has been discovered in the Super File Explorer app 1.0.1 for iOS. The vulnerability is located in the developer path that is accessible and hidden next to the root path. By default, there is no password set for the FTP or Web UI service."
},
{
"ID": "CVE-2020-7997",
"Published": "2020-01-28T05:15:00",
"CVSS": 5,
"Modified": "2020-01-28T05:15:00",
"Description": "ASUS WRT-AC66U 3 RT 3.0.0.4.372_67 devices allow XSS via the Client Name field to the Parental Control feature."
},
]
}
Human Readable Output
Integration log: {‘CVE(val.ID === obj.ID)’: [{‘ID’: ‘CVE-2020-7998’, ‘CVSS’: 5.0, ‘Published’: ‘2020-01-28T05:15:00’, ‘Modified’: ‘2020-01-28T05:15:00’, ‘Description’: ‘An arbitrary file upload vulnerability has been discovered in the Super File Explorer app 1.0.1 for iOS. The vulnerability is located in the developer path that is accessible and hidden next to the root path. By default, there is no password set for the FTP or Web UI service.’}, {‘ID’: ‘CVE-2020-7997’, ‘CVSS’: 5.0, ‘Published’: ‘2020-01-28T05:15:00’, ‘Modified’: ‘2020-01-28T05:15:00’, ‘Description’: ‘ASUS WRT-AC66U 3 RT 3.0.0.4.372_67 devices allow XSS via the Client Name field to the Parental Control feature.’}]}
cicle.lu Latest CVEs
| CVSS | Description | ID | Modified | Published |
|---|---|---|---|---|
| 5.0 | An arbitrary file upload vulnerability has been discovered in the Super File Explorer app 1.0.1 for iOS. The vulnerability is located in the developer path that is accessible and hidden next to the root path. By default, there is no password set for the FTP or Web UI service. | CVE-2020-7998 | 2020-01-28T05:15:00 | 2020-01-28T05:15:00 |
| 5.0 | ASUS WRT-AC66U 3 RT 3.0.0.4.372_67 devices allow XSS via the Client Name field to the Parental Control feature. | CVE-2020-7997 | 2020-01-28T05:15:00 | 2020-01-28T05:15:00 |
2. cve
Search CVE by ID
Base Command
cve
Input
| Argument Name | Description | Required |
|---|---|---|
| cve_id | A comma separated list of CVE IDs to search. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| CVE.ID | String | The ID of the CVE. |
| CVE.CVSS | String | The CVSS score of the CVE. |
| CVE.Published | Date | The date the CVE was published. |
| CVE.Modified | Date | The date the CVE was last modified. |
| CVE.Description | String | The description of the CVE. |
| DBotScore.Indicator | String | The indicator value. |
| DBotScore.Score | Number | The indicator score. |
| DBotScore.Type | String | The indicator type. |
| DBotScore.Vendor | String | The vendor reporting the score of the indicator. |
Command Example
!cve cve_id=CVE-2014-1234
Context Example
{
"CVE": [
{
"ID": "CVE-2014-1234",
"Published": "2014-01-10T12:02:00",
"CVSS": 2.1,
"Modified": "2014-01-10T17:57:00",
"Description": "The paratrooper-newrelic gem 1.0.1 for Ruby allows local users to obtain the X-Api-Key value by listing the curl process."
}
]
}
Human Readable Output
Integration log: {‘CVE(val.ID === obj.ID)’: [{‘ID’: ‘CVE-2014-1234’, ‘CVSS’: 2.1, ‘Published’: ‘2014-01-10T12:02:00’, ‘Modified’: ‘2014-01-10T17:57:00’, ‘Description’: ‘The paratrooper-newrelic gem 1.0.1 for Ruby allows local users to obtain the X-Api-Key value by listing the curl process.’}]}
CVE Search results
| CVSS | Description | ID | Modified | Published |
|---|---|---|---|---|
| 2.1 | The paratrooper-newrelic gem 1.0.1 for Ruby allows local users to obtain the X-Api-Key value by listing the curl process. | CVE-2014-1234 | 2014-01-10T17:57:00 | 2014-01-10T12:02:00 |
Configuration parameters
url— Server URL (required)proxy— Use system proxy settingsinsecure— Trust any certificate (not secure)
Commands (2)
-
cveReturns CVE information by CVE ID.
-
cve-latestReturns the latest updated CVEs.
import urllib3 from typing import Dict, Any, List, Union from CommonServerPython import * # Disable insecure warnings urllib3.disable_warnings() class Client(BaseClient): """ Client will implement the service API, and should not contain any Demisto logic. Should only do requests and return data. """ def __init__(self, base_url: str, verify=False, proxy=False): headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } super().__init__(base_url=base_url, headers=headers, verify=verify, proxy=proxy) def cve_latest(self, limit) -> List[Dict[str, Any]]: res = self._http_request(method='GET', url_suffix=f'/last/{limit}', timeout=60) return res def cve(self, cve_id) -> Dict[str, Any]: res: Dict[str, Any] = self._http_request(method='GET', url_suffix=f'cve/{cve_id}', timeout=60) return res or {} def cve_to_context(cve) -> Dict[str, str]: """Returning a cve structure with the following fields: * ID: The cve ID. * CVSS: The cve score scale/ * Published: The date the cve was published. * Modified: The date the cve was modified. * Description: the cve's description Args: cve: The cve response from CVE-Search web site Returns: The cve structure. """ cvss = cve.get('cvss') return { 'ID': cve.get('id', ''), 'CVSS': cvss or 'N\\A', 'Published': cve.get('Published', '').rstrip('Z'), 'Modified': cve.get('Modified', '').rstrip('Z'), 'Description': cve.get('summary', '') } def test_module(client: Client): """ Returning 'ok' indicates that the integration works like it is supposed to. Connection to the service is successful. Returns: 'ok' if test passed, anything else will fail the test. """ try: cve_latest_command(client, 1) except Exception as e: if "Read timed out." not in str(e): raise return 'ok', None, None def cve_latest_command(client: Client, limit) -> List[CommandResults]: """Returns the 30 latest updated CVEs. Args: limit int: The amount of CVEs to display Returns: Latest 30 CVE details containing ID, CVSS, modified date, published date and description. """ res = client.cve_latest(limit) command_results: List[CommandResults] = [] for cve_details in res: data = cve_to_context(cve_details) indicator = generate_indicator(data) readable_output = tableToMarkdown('Latest CVEs', data) command_results.append( CommandResults( outputs_prefix='CVE', outputs_key_field='ID', outputs=data, readable_output=readable_output, raw_response=res, indicator=indicator ) ) if not res: command_results.append( CommandResults( readable_output='No results found' ) ) return command_results def cve_command(client: Client, args: dict) -> Union[List[CommandResults], CommandResults]: """Search for cve with the given ID and returns the cve data if found. Args: client: Integration client args :The demisto args containing the cve_id Returns: CVE details containing ID, CVSS, modified date, published date and description. """ cve_id = args.get('cve_id', '') cve_ids = argToList(cve_id) command_results: List[CommandResults] = [] for _id in cve_ids: if not valid_cve_id_format(_id): raise DemistoException(f'"{_id}" is not a valid cve ID') response = client.cve(_id) if not response: cr = CommandResults(readable_output=f'### No results found for cve {_id}') else: data = cve_to_context(response) indicator = generate_indicator(data) cr = CommandResults( outputs_prefix='CVE', outputs_key_field='ID', outputs=data, raw_response=response, indicator=indicator, ) command_results.append(cr) return command_results def generate_indicator(data: dict) -> Common.CVE: """ Generating a single cve indicator with dbot score from cve data. Args: data: The cve data Returns: A CVE indicator with dbotScore """ cve_object = Common.CVE( id=data.get('ID'), cvss=data.get('CVSS'), published=data.get('Published'), modified=data.get('Modified'), description=data.get('Description') ) return cve_object def valid_cve_id_format(cve_id: str) -> bool: """Validates that the given cve_id is a valid cve ID. For more details see: https://cve.mitre.org/cve/identifiers/syntaxchange.html Args: cve_id: ID to validate Returns: True if cve_id is a valid cve ID else False """ return bool(re.match(cveRegex, cve_id)) def main(): params = demisto.params() proxy = params.get('proxy', False) use_ssl = not params.get('insecure', False) base_url = params.get('url', 'https://cve.circl.lu/api/') client = Client(base_url=base_url, verify=use_ssl, proxy=proxy) command = demisto.command() LOG(f'Command being called is {command}') try: if demisto.command() == 'test-module': return_outputs(*test_module(client)) elif demisto.command() == 'cve-latest': return_results(cve_latest_command(client, demisto.args().get('limit', 30))) elif demisto.command() == 'cve': return_results(cve_command(client, demisto.args())) else: raise NotImplementedError(f'{command} is not an existing CVE Search command') except Exception as err: return_error(f'Failed to execute {demisto.command()} command. Error: {str(err)}') if __name__ in ('__main__', '__builtin__', 'builtins'): main()