// Counts remote support / RMM and endpoint-management products in the CISA KEV catalog. // Usage: node rmm_count.js // Matching is on the exact vendorProject and a product pattern, never on free text, // so every counted entry can be traced. VPN and remote-access gateways are counted // separately and are not part of the RMM total. const fs = require('fs'); const crypto = require('crypto'); const file = process.argv[2]; const buf = fs.readFileSync(file); const d = JSON.parse(buf.toString('utf8')); const v = d.vulnerabilities; console.log('file sha256', crypto.createHash('sha256').update(buf).digest('hex'), 'bytes', buf.length); console.log('catalogVersion', d.catalogVersion, '| dateReleased', d.dateReleased, '| entries', v.length); const GROUPS = { 'Remote support and RMM': [ ['ConnectWise', /ScreenConnect/i], ['SimpleHelp', /SimpleHelp/i], ['BeyondTrust', /Remote Support|Privileged Remote Access/i], ['Kaseya', /VSA/i], ['N-able', /N-central/i], ['TeamViewer', /.*/], ], 'Endpoint management consoles': [ ['Ivanti', /^Endpoint Manager( \(EPM\)| Cloud Service Appliance)/i], ['Zoho', /Desktop Central/i], ], 'VPN and remote-access gateways (not in the RMM total)': [ ['Ivanti', /Connect Secure|Pulse Connect Secure/i], ['Fortinet', /SSL-VPN|FortiOS/i], ['Citrix', /Gateway|NetScaler$/i], ['SonicWall', /SSLVPN|Secure Remote Access/i], ['Cisco', /VPN/i], ], }; const year = (e) => e.dateAdded.slice(0, 4); let rmmTotal = 0; const rmmEntries = []; for (const [group, rules] of Object.entries(GROUPS)) { const hits = v.filter((e) => rules.some(([vendor, re]) => e.vendorProject === vendor && re.test(e.product))); console.log(`\n== ${group}: ${hits.length} entries`); const byProduct = {}; for (const e of hits) (byProduct[`${e.vendorProject} | ${e.product}`] ||= []).push(e); for (const [k, list] of Object.entries(byProduct).sort()) { console.log(` ${list.length} ${k} [${list.map((e) => `${e.cveID} ${e.dateAdded}${e.knownRansomwareCampaignUse === 'Known' ? ' R' : ''}`).join('; ')}]`); } const ys = {}; hits.forEach((e) => (ys[year(e)] = (ys[year(e)] || 0) + 1)); console.log(' by year added:', Object.keys(ys).sort().map((y) => `${y}: ${ys[y]}`).join(', ')); console.log(' known ransomware use:', hits.filter((e) => e.knownRansomwareCampaignUse === 'Known').length); if (!group.startsWith('VPN')) { rmmTotal += hits.length; rmmEntries.push(...hits); } } const ys = {}; rmmEntries.forEach((e) => (ys[year(e)] = (ys[year(e)] || 0) + 1)); console.log(`\n== RMM and endpoint management combined: ${rmmTotal} entries, ${new Set(rmmEntries.map((e) => e.cveID)).size} unique CVEs`); console.log(' by year added:', Object.keys(ys).sort().map((y) => `${y}: ${ys[y]}`).join(', ')); console.log(' known ransomware use:', rmmEntries.filter((e) => e.knownRansomwareCampaignUse === 'Known').length); console.log(' share of catalog:', ((100 * rmmTotal) / v.length).toFixed(1) + '%');