Greenbone Vulnerability Management Libraries
11.0.0
|
Go to the documentation of this file.
72 #define AV_NETWORK 1.0
73 #define AV_ADJACENT_NETWORK 0.646
74 #define AV_LOCAL 0.395
80 #define AC_MEDIUM 0.61
86 #define Au_MULTIPLE_INSTANCES 0.45
87 #define Au_SINGLE_INSTANCE 0.56
94 #define C_PARTIAL 0.275
95 #define C_COMPLETE 0.660
101 #define I_PARTIAL 0.275
102 #define I_COMPLETE 0.660
108 #define A_PARTIAL 0.275
109 #define A_COMPLETE 0.660
199 if (g_strcmp0 (str,
"A") == 0)
201 else if (g_strcmp0 (str,
"I") == 0)
203 else if (g_strcmp0 (str,
"C") == 0)
205 else if (g_strcmp0 (str,
"Au") == 0)
207 else if (g_strcmp0 (str,
"AU") == 0)
209 else if (g_strcmp0 (str,
"AV") == 0)
211 else if (g_strcmp0 (str,
"AC") == 0)
266 for (i = 0; i < 3; i++)
272 if (g_strcmp0 (impact->
name, value) == 0)
320 double impact = 1.176;
322 double exploitability_sub;
327 if (impact_sub < 0.1)
330 return (((0.6 * impact_sub) + (0.4 * exploitability_sub) - 1.5) * impact)
347 memset (&
cvss, 0x00,
sizeof (
struct cvss));
349 if (cvss_str == NULL)
352 base_str =
base_metrics = g_strdup_printf (
"%s/", cvss_str);
357 char *metric_name = token2;
364 if (metric_name == NULL)
367 metric_value = strtok (NULL,
":");
369 if (metric_value == NULL)
372 rc =
toenum (metric_name, &mval);
#define AV_ADJACENT_NETWORK
static double __get_cvss_score(struct cvss *cvss)
Final CVSS score computation helper.
static const struct impact_item impact_map[][3]
static int toenum(const char *str, enum base_metrics *res)
Determine base metric enumeration from a string.
static double get_exploitability_subscore(const struct cvss *cvss)
Calculate Exploitability Sub Score.
#define A_NONE
AvailabilityImpact (A) Constants.
#define Au_SINGLE_INSTANCE
#define I_NONE
IntegrityImpact (I) Constants.
static double get_impact_subscore(const struct cvss *cvss)
Calculate Impact Sub Score.
Describe a CVSS impact element.
#define C_NONE
ConfidentialityImpact (C) Constants.
#define AC_LOW
AccessComplexity (AC) Constants.
double get_cvss_score_from_base_metrics(const char *cvss_str)
Calculate CVSS Score.
base_metrics
Base metrics.
static int set_impact_from_str(const char *value, enum base_metrics metric, struct cvss *cvss)
Set impact score from string representation.
#define AV_NETWORK
AccessVector (AV) Constants.
#define Au_MULTIPLE_INSTANCES
Authentication (Au) Constants.