-
-
Save p0w3rsh3ll/12145c5a8278a18dc9160962c2198006 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Module MsrcSecurityUpdates | |
(Get-MSRCCvrfDocument -ID "$((Get-Date).ToString('yyyy-MMM',[System.Globalization.CultureInfo]'en-US'))").Vulnerability | | |
Foreach-Object { | |
$v = $_ | |
$Disclosed = $Exploited = $null | |
$Disclosed = ([regex]'Publicly\sDisclosed:(?<D>(Yes|No));').Match("$(($v.Threats | Where-Object { $_.Type -eq 1}).Description.Value)") | | |
Select-Object -ExpandProperty Groups| Select-Object -Last 1 -ExpandProperty Value | |
$Exploited = ([regex]'Exploited:(?<E>(Yes|No));').Match("$(($v.Threats | Where-Object { $_.Type -eq 1}).Description.Value)") | | |
Select-Object -ExpandProperty Groups| Select-Object -Last 1 -ExpandProperty Value | |
[PSCustomObject]@{ | |
CVEID = $v.CVE | |
Tag = $($v.Notes | Where-Object { $_.Type -eq 7}).Value | |
CNA = $($v.Notes | Where-Object {$_.Type -eq 8}).Value | |
Title = $v.Title.Value | |
Date = $($v.RevisionHistory | Select-Object -First 1 -ExpandProperty Date) | |
Revision = $($v.RevisionHistory | Select-Object -First 1 -ExpandProperty Number) | |
Severity = $( ($v.Threats | Where-Object { $_.Type -eq 3 }).Description | Select-Object -ExpandProperty Value -ErrorAction SilentlyContinue | Sort-Object -Unique) | |
CVSS = '{0:N1}' -f $($v.CVSSScoreSets.BaseScore | Sort-Object -Unique | ForEach-Object { [double]$_} | Sort-Object -Descending | Select-Object -First 1) | |
Public = $Disclosed | |
Exploited = $Exploited | |
Type = $( ($v.Threats | Where-Object { $_.Type -eq 0 }).Description | Select-Object -ExpandProperty Value -ErrorAction SilentlyContinue | Sort-Object -Unique) | |
} | |
} | Where-Object { [datetime]$_.Date -ge ((Get-Date).AddDays(-5)) } | | |
Select-Object -Property CVEID,Title,Severity,CVSS,Public,Exploited,Type,Date | | |
Out-GridView |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment