Esempio n. 1
0
        public static void Check(VulnerabilityCollection vulnerabilities, string BuildNumber, List <string> installedKBs)
        {
            List <string> Supersedence = new List <string>();

            switch (BuildNumber)
            {
            case "10240":

                Supersedence.AddRange(new string[] {
                    //
                });

                break;

            case "10586":

                Supersedence.AddRange(new string[] {
                    //
                });

                break;

            case "14393":

                Supersedence.AddRange(new string[] {
                    //
                });

                break;

            case "15063":

                Supersedence.AddRange(new string[] {
                    "4516068", "4516059", "4522011", "4520010", "4524151",
                    "4525245", "4530711"
                });

                break;

            case "16299":

                Supersedence.AddRange(new string[] {
                    "4516066", "4516071", "4522012", "4520004", "4524150",
                    "4525241", "4530714"
                });

                break;

            case "17134":

                Supersedence.AddRange(new string[] {
                    "4516058", "4516045", "4522014", "4520008", "4524149",
                    "4525237", "4530717"
                });

                break;

            case "17763":

                Supersedence.AddRange(new string[] {
                    "4512578", "4516077", "4522015", "4519338", "4524148",
                    "4523205", "4530715"
                });

                break;

            case "18362":

                Supersedence.AddRange(new string[] {
                    "4515384", "4517211", "4522016", "4517389", "4524147",
                    "4524570", "4530684"
                });

                break;

            default:
                return;
            }

            IEnumerable <string> x = Supersedence.Intersect(installedKBs);

            if (!x.Any())
            {
                vulnerabilities.SetAsVulnerable(name);
            }
        }
Esempio n. 2
0
        public static void Check(VulnerabilityCollection vulnerabilities, string BuildNumber, List <string> installedKBs)
        {
            List <string> Supersedence = new List <string>();

            switch (BuildNumber)
            {
            case "10240":

                Supersedence.AddRange(new string[] {
                    "4525232", "4530681"
                });

                break;

            case "10586":

                Supersedence.AddRange(new string[] {
                    //
                });

                break;

            case "14393":

                Supersedence.AddRange(new string[] {
                    "4525236", "4530689"
                });

                break;

            case "15063":

                Supersedence.AddRange(new string[] {
                    //
                });

                break;

            case "16299":

                Supersedence.AddRange(new string[] {
                    "4525241", "4530714"
                });

                break;

            case "17134":

                Supersedence.AddRange(new string[] {
                    "4525237", "4530717"
                });

                break;

            case "17763":

                Supersedence.AddRange(new string[] {
                    "4523205", "4530715"
                });

                break;

            case "18362":

                Supersedence.AddRange(new string[] {
                    "4524570", "4530684"
                });

                break;

            case "18363":

                Supersedence.AddRange(new string[] {
                    "4524570", "4530684"
                });

                break;

            default:
                return;
            }

            IEnumerable <string> x = Supersedence.Intersect(installedKBs);

            if (!x.Any())
            {
                vulnerabilities.SetAsVulnerable(name);
            }
        }
Esempio n. 3
0
        public static void Check(VulnerabilityCollection vulnerabilities, string BuildNumber, List <string> installedKBs)
        {
            List <string> Supersedence = new List <string>();

            switch (BuildNumber)
            {
            case "10240":

                Supersedence.AddRange(new string[] {
                    //
                });

                break;

            case "10586":

                Supersedence.AddRange(new string[] {
                    //
                });

                break;

            case "14393":

                Supersedence.AddRange(new string[] {
                    "4503267", "4503294", "4509475", "4507459", "4507460",
                    "4512495", "4512517", "4516044", "4516061", "4522010",
                    "4519998", "4524152", "4525236", "4530689"
                });

                break;

            case "15063":

                Supersedence.AddRange(new string[] {
                    "4503279", "4503289", "4509476", "4507450", "4507467",
                    "4512474", "4512507", "4516059", "4516068", "4522011",
                    "4520010", "4524151", "4525245", "4530711"
                });

                break;

            case "16299":

                Supersedence.AddRange(new string[] {
                    "4503284", "4503281", "4509477", "4507455", "4507465",
                    "4512494", "4512516", "4516066", "4516071", "4522012",
                    "4520004", "4524150", "4525241", "4530714"
                });

                break;

            case "17134":

                Supersedence.AddRange(new string[] {
                    "4503286", "4503288", "4509478", "4507435", "4507466",
                    "4512501", "4512509", "4516045", "4516058", "4522014",
                    "4520008", "4524149", "4525237", "4530717"
                });

                break;

            case "17763":

                Supersedence.AddRange(new string[] {
                    "4503327", "4501371", "4509479", "4505658", "4507469",
                    "4511553", "4512534", "4512578", "4516077", "4522015",
                    "4519338", "4524148", "4523205", "4530715"
                });

                break;

            case "18362":

                Supersedence.AddRange(new string[] {
                    "4503293", "4501375", "4505903", "4507453", "4512508",
                    "4512941", "4515384", "4517211", "4522016", "4517389",
                    "4524147", "4524570", "4530684"
                });

                break;

            default:
                return;
            }

            IEnumerable <string> x = Supersedence.Intersect(installedKBs);

            if (!x.Any())
            {
                vulnerabilities.SetAsVulnerable(name);
            }
        }
Esempio n. 4
0
        public static void FindVulns()
        {
            System.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
            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))
            {
                System.Console.WriteLine(String.Format("    {0}: {1}", "OS Build Number", buildNumber));
            }
            else
            {
                return;
            }

            if (!supportedVersions.Contains(buildNumber))
            {
                Beaprint.GoodPrint("   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);
            CVE_2019_1385.Check(vulnerabiltiies, buildNumber, installedKBs);
            CVE_2019_1388.Check(vulnerabiltiies, buildNumber, installedKBs);
            CVE_2019_1405.Check(vulnerabiltiies, buildNumber, installedKBs);

            // Print the results
            vulnerabiltiies.ShowResults();
        }
        public static void FindVulns()
        {
            if (Program.using_ansi)
            {
                System.Console.WriteLine(Beaprint.YELLOW + "  [?] " + Beaprint.LBLUE + "Windows vulns search powered by" + Beaprint.LRED + "Watson" + Beaprint.LBLUE + "(https://github.com/rasta-mouse/Watson)" + Beaprint.NOCOLOR);
            }
            else
            {
                string      iniPrint = "  {0} Windows vulns search powered by {1} (https://github.com/rasta-mouse/Watson)";
                Formatter[] colors   = new Formatter[]
                {
                    new Formatter("[?]", Color.Yellow),
                    new Formatter("Watson", Color.OrangeRed),
                };
                Colorful.Console.WriteLineFormatted(iniPrint, Color.MediumPurple, colors);
            }

            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))
            {
                string      iniPrint = "    {0}: {1}";
                Formatter[] colors   = new Formatter[]
                {
                    new Formatter("OS Build Number", Beaprint.color_key),
                    new Formatter(buildNumber, Beaprint.color_default),
                };
                Colorful.Console.WriteLineFormatted(iniPrint, Beaprint.color_key, colors);
            }
            else
            {
                return;
            }

            if (!supportedVersions.Contains(buildNumber))
            {
                Colorful.Console.WriteLine("   Windows version not supported\r\n", Beaprint.color_good);
                return;
            }

            // List of KBs installed
            List <string> installedKBs = Wmi.GetInstalledKBs();

            // 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();
        }
        public static void Check(VulnerabilityCollection vulnerabilities, string BuildNumber, List <string> installedKBs)
        {
            List <string> Supersedence = new List <string>();

            switch (BuildNumber)
            {
            case "10240":

                Supersedence.AddRange(new string[] {
                    "4520011"
                });

                break;

            case "10586":

                Supersedence.AddRange(new string[] {
                    //
                });

                break;

            case "14393":

                Supersedence.AddRange(new string[] {
                    "4519998"
                });

                break;

            case "15063":

                Supersedence.AddRange(new string[] {
                    "4520010"
                });

                break;

            case "16299":

                Supersedence.AddRange(new string[] {
                    "4520004"
                });

                break;

            case "17134":

                Supersedence.AddRange(new string[] {
                    "4520008"
                });

                break;

            case "17763":

                Supersedence.AddRange(new string[] {
                    "4519338"
                });

                break;

            case "18362":

                Supersedence.AddRange(new string[] {
                    "4517389"
                });

                break;

            default:
                return;
            }

            IEnumerable <string> x = Supersedence.Intersect(installedKBs);

            if (!x.Any())
            {
                vulnerabilities.SetAsVulnerable(name);
            }
        }
        public static void Check(VulnerabilityCollection vulnerabilities, string BuildNumber, List <string> installedKBs)
        {
            List <string> Supersedence = new List <string>();

            switch (BuildNumber)
            {
            case "10240":

                Supersedence.AddRange(new string[] {
                    //
                });

                break;

            case "10586":

                Supersedence.AddRange(new string[] {
                    //
                });

                break;

            case "14393":

                Supersedence.AddRange(new string[] {
                    //
                });

                break;

            case "15063":

                Supersedence.AddRange(new string[] {
                    "4493474", "4493436", "4499162", "4499181", "4502112",
                    "4505055", "4503279", "4503289", "4509476", "4507450",
                    "4507467", "4512474", "4512507", "4516059", "4516068",
                    "4522011", "4520010", "4524151"
                });

                break;

            case "16299":

                Supersedence.AddRange(new string[] {
                    "4493441", "4493440", "4499147", "4499179", "4505062",
                    "4503281", "4503284", "4509477", "4507455", "4507465",
                    "4512494", "4512516", "4516066", "4516071", "4522012",
                    "4520004", "4524150"
                });

                break;

            case "17134":

                Supersedence.AddRange(new string[] {
                    "4493464", "4493437", "4499167", "4499183", "4505064",
                    "4503286", "4503288", "4509478", "4507435", "4507466",
                    "4512501", "4512509", "4516045", "4516058", "4522014",
                    "4520008", "4524149"
                });

                break;

            case "17763":

                Supersedence.AddRange(new string[] {
                    "4493509", "4495667", "4494441", "4497934", "4501835",
                    "4505056", "4501371", "4503327", "4509479", "4505658",
                    "4507469", "4511553", "4512534", "4512578", "4516077",
                    "4522015", "4519338", "4524148"
                });

                break;

            default:
                return;
            }

            IEnumerable <string> x = Supersedence.Intersect(installedKBs);

            if (!x.Any())
            {
                vulnerabilities.SetAsVulnerable(name);
            }
        }