Hi @john_hartman ,
I’ve gone through these articles but unabe to create a query for my requirement.
I need to run a query for specific CVE and generate a csv report to show hostnam, ip address, title solution,fix & location tag
Please help
The query below should work a lot better but you’ll need to edit my two temporary tables for your region and land values. For example I have “home” and “work” as my two regions and then in my land tags I’m just saying anything that isn’t a region is a land tag.
You would of course need to specify a vulnerability as well. Keep in mind that the nexpose_id is not the exact CVE so I’m using the LIKE operator and prefixing the CVE with a % symbol to wildcard the beginning. So just paste your CVE aft…
-- Report of assets that have a specific list of CVE. You can specify the CVEs starting on line 11. Example CVEs listed below.
-- Copy the SQL query below
SELECT
da.host_name,
da.ip_address,
ds.nexpose_id,
dv.title,
ds.applies_to,
ds.solution_type,
ds.fix
FROM
dim_solution ds
JOIN dim_vulnerability_solution dvs USING(solution_id)
JOIN dim_asset_vulnerability_solution davs USING(vulnerability_id)
JOIN dim_vulnerability dv USING(vulnerability_id)
JOIN dim_asset da USING(asset_id)
WHERE
ds.nexpose_id ilike '%CVE-2018-20250%'
OR dv.title ilike '%CVE-2017-11882%'
OR dv.title ilike '%CVE-2017-11774%'