private static void PrintHistFirefox() { try { Beaprint.MainPrint("Looking for GET credentials in Firefox history"); Beaprint.LinkPrint("https://book.hacktricks.xyz/windows-hardening/windows-local-privilege-escalation#browsers-history"); List <string> firefoxHist = Firefox.GetFirefoxHistory(); if (firefoxHist.Count > 0) { Dictionary <string, string> colorsB = new Dictionary <string, string>() { { Globals.PrintCredStrings, Beaprint.ansi_color_bad }, }; foreach (string url in firefoxHist) { if (MyUtils.ContainsAnyRegex(url.ToUpper(), Browser.CredStringsRegex)) { Beaprint.AnsiPrint(" " + url, colorsB); } } } else { Beaprint.NotFoundPrint(); } } catch (Exception ex) { Beaprint.PrintException(ex.Message); } }
private static void PrintHistBookChrome() { try { Beaprint.MainPrint("Looking for GET credentials in Chrome history"); Beaprint.LinkPrint("https://book.hacktricks.xyz/windows-hardening/windows-local-privilege-escalation#browsers-history"); Dictionary <string, List <string> > chromeHistBook = Chrome.GetChromeHistBook(); List <string> history = chromeHistBook["history"]; List <string> bookmarks = chromeHistBook["bookmarks"]; 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(); } else { Beaprint.NotFoundPrint(); } Beaprint.MainPrint("Chrome bookmarks"); Beaprint.ListPrint(bookmarks); } catch (Exception ex) { Beaprint.PrintException(ex.Message); } }
private static void PrintHistFavIE() { try { Beaprint.MainPrint("Looking for GET credentials in IE history"); Beaprint.LinkPrint("https://book.hacktricks.xyz/windows/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); } }