Skip to content

Instantly share code, notes, and snippets.

@jfrantz1-r7
Created December 4, 2018 14:57
Show Gist options
  • Select an option

  • Save jfrantz1-r7/c5a597e84c30baa8593b372a4ed78053 to your computer and use it in GitHub Desktop.

Select an option

Save jfrantz1-r7/c5a597e84c30baa8593b372a4ed78053 to your computer and use it in GitHub Desktop.
SELECT
dv.title AS "Vulnerability Title",
Htmltotext(dv.description) AS "Description",
dv.cvss_score AS "CVSSv3 Score",
dv.exploits AS "Exploit Count",
dv.malware_kits AS "Malware Kit Count",
da.host_name AS "Instances"
FROM
dim_vulnerability dv
JOIN fact_asset_vulnerability_instance favi USING(vulnerability_id)
JOIN dim_asset da USING(asset_id)
WHERE
dv.cvss_v3_attack_vector = 'N'
AND dv.cvss_v3_user_interaction = 'N'
AND dv.cvss_v3_privileges_required = 'N'
AND dv.cvss_v3_confidentiality_impact = 'H'
AND dv.cvss_v3_availability_impact = 'H'
AND dv.cvss_v3_integrity_impact = 'H'
AND (
dv.exploits != 0
OR dv.malware_kits != 0
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment