Exemplo n.º 1
0
        private static void PrintCurrentIETabs()
        {
            try
            {
                Beaprint.MainPrint("Current IE tabs");
                Beaprint.LinkPrint("https://book.hacktricks.xyz/windows-hardening/windows-local-privilege-escalation#browsers-history");
                List <string> urls = InternetExplorer.GetCurrentIETabs();

                Dictionary <string, string> colorsB = new Dictionary <string, string>()
                {
                    { Globals.PrintCredStrings, Beaprint.ansi_color_bad },
                };

                Beaprint.ListPrint(urls, colorsB);
            }
            catch (Exception ex)
            {
                Beaprint.PrintException(ex.Message);
            }
        }
Exemplo n.º 2
0
        private static void PrintHistFavIE()
        {
            try
            {
                Beaprint.MainPrint("Looking for GET credentials in IE history");
                Beaprint.LinkPrint("https://book.hacktricks.xyz/windows-hardening/windows-local-privilege-escalation#browsers-history");
                Dictionary <string, List <string> > chromeHistBook = InternetExplorer.GetIEHistFav();
                List <string> history   = chromeHistBook["history"];
                List <string> favorites = chromeHistBook["favorites"];

                if (history.Count > 0)
                {
                    Dictionary <string, string> colorsB = new Dictionary <string, string>()
                    {
                        { Globals.PrintCredStrings, Beaprint.ansi_color_bad },
                    };

                    foreach (string url in history)
                    {
                        if (MyUtils.ContainsAnyRegex(url.ToUpper(), Browser.CredStringsRegex))
                        {
                            Beaprint.AnsiPrint("    " + url, colorsB);
                        }
                    }

                    Console.WriteLine();
                }

                Beaprint.MainPrint("IE favorites");
                Beaprint.ListPrint(favorites);
            }
            catch (Exception ex)
            {
                Beaprint.PrintException(ex.Message);
            }
        }