Forum Discussion

dmarquesgn's avatar
dmarquesgn
Iron Contributor
Jan 03, 2023
Solved

Kusto Query to extract the number of exploitable vulnerabilities

Hi,   I need to build up a Kusto Query to extract the total number of Exploitable Vulnerabilities. The vulnerabilities are on the DeviceTvmSoftwareVulnerabilities table with their CVEID and the Exp...
  • dmarquesgn's avatar
    dmarquesgn
    Jan 05, 2023

    Rod_Trent 

    Thanks for the reference. But I found out what was the issue. Now it works as expected, like this:

    $vulnUrl = '{ "query": "DeviceTvmSoftwareVulnerabilities | join (DeviceTvmSoftwareVulnerabilitiesKB) on CveId | where IsExploitable == 1 | count" }'
    $vulnUrlUri = "https://graph.microsoft.com/beta/security/runHuntingQuery"
    $vulnResponse = Invoke-WebRequest -Method Post -Uri $vulnUrlUri -Body $vulnUrl -Headers $headers -ErrorAction Stop

    The difference was the " surrounding the 1 value. So I guess it doesn't deal well with multiple " on the variable.

     

Resources