static void Main(string[] args) { Info.PrintLogo(); // Supported versions List<string> supportedVersions = new List<string>() { "10240", //1507 "10586", //1511 "14393", //1607 & 2K16 "15063", //1703 "16299", //1709 "17134", //1803 "17763", //1809 & 2K19 "18362" //1903 //"18363", //1909 }; // Get OS Build number string buildNumber = Wmi.GetBuildNumber(); if (!string.IsNullOrEmpty(buildNumber)) Console.WriteLine(" [*] OS Build Number: {0}", buildNumber); else return; if (!supportedVersions.Contains(buildNumber)) { Console.WriteLine(" [!] Windows version not supported\r\n"); return; } // List of KBs installed Console.WriteLine(" [*] Enumerating installed KBs...\r\n"); List<string> installedKBs = Wmi.GetInstalledKBs(); #if DEBUG foreach (string kb in installedKBs) Console.WriteLine(" {0}", kb); Console.WriteLine(); #endif // List of Vulnerabilities VulnerabilityCollection vulnerabiltiies = new VulnerabilityCollection(); // Check each one CVE_2019_0836.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_0841.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1064.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1130.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1253.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1315.Check(vulnerabiltiies, buildNumber, installedKBs); // Print the results vulnerabiltiies.ShowResults(); }
static void Main(string[] args) { Info.PrintLogo(); // OS Build number string buildNumber = Wmi.GetBuildNumber(); Console.WriteLine(" [*] OS Build Number: {0}", buildNumber); // Supported version? List <string> supportedVersions = new List <string>() { // 1703 1709 1803 1809 1903 "15063", "16299", "17134", "17763", "18362" }; if (!supportedVersions.Contains(buildNumber)) { Console.WriteLine(" [!] Windows version not supported\r\n"); Environment.Exit(1); } // List of KBs installed Console.WriteLine(" [*] Enumerating installed KBs...\r\n"); List <string> installedKBs = Wmi.GetInstalledKBs(); #if DEBUG foreach (string kb in installedKBs) { Console.WriteLine(kb); } Console.WriteLine(); #endif // List of Vulnerabilities VulnerabilityCollection vulnerabiltiies = new VulnerabilityCollection(); // Check each one CVE_2019_0836.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_0841.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_0863.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1064.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1069.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1129.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1130.Check(vulnerabiltiies, buildNumber, installedKBs); // Print the results vulnerabiltiies.ShowResults(); }
static void Main(string[] args) { Info.PrintLogo(); // Supported versions var supportedVersions = new Dictionary <int, string>() { { 10240, "1507" }, { 10586, "1511" }, { 14393, "1607" }, { 15063, "1703" }, { 16299, "1709" }, { 17134, "1803" }, { 17763, "1809" }, { 18362, "1903" }, { 18363, "1909" }, { 19041, "2004" }, { 19042, "20H2" } }; // Get OS Build number var buildNumber = Wmi.GetBuildNumber(); if (buildNumber == 0) { Console.Error.WriteLine(" [!] Could not retrieve Windows BuildNumber"); return; } if (!supportedVersions.ContainsKey(buildNumber)) { Console.Error.WriteLine(" [!] Windows version not supported"); return; } var version = supportedVersions[buildNumber]; Console.WriteLine(" [*] OS Version: {0} ({1})", version, buildNumber); // List of KBs installed Console.WriteLine(" [*] Enumerating installed KBs..."); var installedKBs = Wmi.GetInstalledKBs(); #if DEBUG Console.WriteLine(); foreach (var kb in installedKBs) { Console.WriteLine(" {0}", kb); } Console.WriteLine(); #endif // List of Vulnerabilities var vulnerabiltiies = new VulnerabilityCollection(); // Check each one CVE_2019_0836.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_0841.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1064.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1130.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1253.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1315.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1385.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1388.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2019_1405.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2020_0668.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2020_0683.Check(vulnerabiltiies, buildNumber, installedKBs); CVE_2020_1013.Check(vulnerabiltiies, buildNumber, installedKBs); // Print the results vulnerabiltiies.ShowResults(); }
public static void FindVulns() { Console.WriteLine(Beaprint.YELLOW + " [?] " + Beaprint.LBLUE + "Windows vulns search powered by " + Beaprint.LRED + "Watson" + Beaprint.LBLUE + "(https://github.com/rasta-mouse/Watson)" + Beaprint.NOCOLOR); // Supported versions var supportedVersions = new Dictionary <int, string>() { { 10240, "1507" }, { 10586, "1511" }, { 14393, "1607" }, { 15063, "1703" }, { 16299, "1709" }, { 17134, "1803" }, { 17763, "1809" }, { 18362, "1903" }, { 18363, "1909" }, { 19041, "2004" }, { 19042, "20H2" } }; // Get OS Build number var buildNumber = Wmi.GetBuildNumber(); if (buildNumber != 0) { if (!supportedVersions.ContainsKey(buildNumber)) { Console.Error.WriteLine($" [!] Windows version not supported, build number: '{buildNumber}'"); return; } var version = supportedVersions[buildNumber]; Console.WriteLine(" [*] OS Version: {0} ({1})", version, buildNumber); } else { Console.Error.WriteLine(" [!] Could not retrieve Windows BuildNumber"); return; } // List of KBs installed Console.WriteLine(" [*] Enumerating installed KBs..."); var installedKBs = Wmi.GetInstalledKBs(); #if DEBUG Console.WriteLine(); foreach (var kb in installedKBs) { Console.WriteLine(" {0}", kb); } Console.WriteLine(); #endif // List of Vulnerabilities var vulnerabilities = new VulnerabilityCollection(); // Check each one CVE_2019_0836.Check(vulnerabilities, buildNumber, installedKBs); CVE_2019_0841.Check(vulnerabilities, buildNumber, installedKBs); CVE_2019_1064.Check(vulnerabilities, buildNumber, installedKBs); CVE_2019_1130.Check(vulnerabilities, buildNumber, installedKBs); CVE_2019_1253.Check(vulnerabilities, buildNumber, installedKBs); CVE_2019_1315.Check(vulnerabilities, buildNumber, installedKBs); CVE_2019_1385.Check(vulnerabilities, buildNumber, installedKBs); CVE_2019_1388.Check(vulnerabilities, buildNumber, installedKBs); CVE_2019_1405.Check(vulnerabilities, buildNumber, installedKBs); CVE_2020_0668.Check(vulnerabilities, buildNumber, installedKBs); CVE_2020_0683.Check(vulnerabilities, buildNumber, installedKBs); CVE_2020_1013.Check(vulnerabilities, buildNumber, installedKBs); // Print the results vulnerabilities.ShowResults(); }