private void LogOut_Click(object sender, EventArgs e) { Desktop_BKEND.CloseOpenForms(); StartMenuPanel.Visible = false; Close(); Class_Progress.StepCompleted("Ransomware", 2); //step two completed }
//simulate opening a website in internet browser private void GoToWebsite(string website) { WebsitePanel.Visible = true; ErrorPanel.Visible = false; if (website == "firewall.com") { //Visit Firewall var formFirewall = new Form_Firewall(); formFirewall.TopLevel = false; WebsitePanel.Controls.Add(formFirewall); formFirewall.Dock = DockStyle.Fill; formFirewall.Show(); AddressBar.Text = "firewall.com"; Class_Progress.StepCompleted("Phishing Email", 3); //step three completed } else if (website == "virustotals.com") { //Visit virustotals.com var formVirusTotal = new Form_VirusTotal(); formVirusTotal.TopLevel = false; WebsitePanel.Controls.Add(formVirusTotal); formVirusTotal.Dock = DockStyle.Fill; AddressBar.Text = "virustotals.com"; formVirusTotal.Show(); } }
private void Antivirus_Click(object sender, EventArgs e) { var formAntivirus = new Form_Anitvirus(); formAntivirus.Show(); Class_Progress.StepCompleted("Ransomware", 4); //step four completed Process.newProcess("Best Antivirus", DateTime.Now); }
private void InternetIcon_Click(object sender, EventArgs e) { var formInternetBrowser = new Form_InternetBrowser(); formInternetBrowser.Show(); Class_Progress.StepCompleted("Phishing Email", 2); //step two completed Process.newProcess("Internet Browser", DateTime.Now); }
private void removeButton_Click(object sender, EventArgs e) { foreach (ListViewItem malware in Class_Antivirus.MalwareList) { if (malware.Text == "not ransomware") { Class_Progress.StepCompleted("Ransomware", 5); //step five completed -> Ransomware Event completed } } Class_Antivirus.RemoveAllThreats(); malwareListBox.Items.Clear(); //delete in UI }
private void NextBTN_Click(object sender, EventArgs e) { //Instruction Next Button //Start off with "Welcome Admin" //Move on to "Here is progress bar" if (Next == 0) { InstructionsTB.Text = "This is the progress bar. It shows how close you are toward recovering from the current attack."; Arrow1.Visible = true; Next += 1; } else if (Next == 1) { Arrow1.Visible = false; InstructionsTB.Text = "This is the current attack you need to recover from. You can double click on it to learn more about it."; Arrow2.Visible = true; Next += 1; } else if (Next == 2) { Arrow2.Visible = false; InstructionsTB.Text = "If you get stuck, you can ask for a hint."; Arrow3.Visible = true; Next += 1; } else if (Next == 3) { Arrow3.Visible = false; InstructionsTB.Text = "Here you can check your progress. When you complete a correct step towards recovery, it will show up here."; Arrow4.Visible = true; Next += 1; } else if (Next == 4) { Arrow4.Visible = false; InstructionsTB.Text = "You can see how many attacks you have succesfully recovered from here."; Arrow5.Visible = true; Next += 1; } else if (Next == 5) { Arrow5.Visible = false; ArrowPanel.Visible = false; InstructionsTB.Text = "Good luck Admin!"; Next += 1; } else if (Next == 6) { Class_Progress.Play(); //Begin attacks, starting with phish InstructionsPanel.Visible = false; //close instructions } }
private void domainTab_Click(object sender, EventArgs e) { // Open Domain Tab DomainPanel.BringToFront(); blockedDomainsTB.Clear(); //clear //show currently blocked domains foreach (string domain in Class_Firewall.blockedDomains) { blockedDomainsTB.Text += domain + Environment.NewLine; } Class_Progress.StepCompleted("Phishing Email", 4); //step four completed }
private void Link_Click(object sender, EventArgs e) { //Open link in internet browser var formInternet = new Form_InternetBrowser(); formInternet.AddressBar.Text = Link.Text; formInternet.Show(); formInternet.Search.PerformClick(); Class_Progress.StepCompleted("Phishing Email", 2); //step two completed, open internet if (Link.Text == "firewall.com") { Class_Progress.StepCompleted("Phishing Email", 3); //step three completed, visit firewall } }
private async void safeModeToolStripMenuItem_Click(object sender, EventArgs e) { // Handles simulation of a restart (Safe Mode) in the Desktop form by hiding the form for a few frames, updating, and then making it visible again BootOptions.enableSafeMode = true; BootOptions.enableNetworking = false; BootOptions.enableCommandPrompt = true; this.Opacity = 0; await Task.Delay(300); desktopBootOptions(); this.Opacity = 100; RestartBootOptions.Close(); BackgroundRefresh(); Class_Progress.StepCompleted("Ransomware", 3); //step three completed }
/**************************************** * START MENU STUFF * **************************************/ private void startButtonClick(object sender, EventArgs e) { //Display Start Menu if (StartMenuPanel.Visible == false) { StartMenuPanel.Visible = true; StartMenuPanel.BringToFront(); } else { StartMenuPanel.Visible = false; } Class_Progress.StepCompleted("Ransomware", 1); //step one completed }
/************* Block Buttons *************/ private void addDomainButton_Click(object sender, EventArgs e) { string domain = domainEntry.Text; if (domain != "") { if (domain.Contains("@")) { string[] breakUpEmail = domain.Split('@'); domain = breakUpEmail[1]; } Class_Firewall.blockedDomains.Add(domain); blockedDomainsTB.Text += domain + Environment.NewLine; } if (domain == "phi.sh") { Class_Progress.StepCompleted("Phishing Email", 5); //step five completed -> Phishing Event completed } }
private void LinkAppear() { if (email_sourceTXT.Text == "*****@*****.**") { Link.Text = "notphishing.com/ebneoKI23jdfn03"; Link.Visible = true; Link.Enabled = true; Class_Progress.StepCompleted("Phishing Email", 1); //step one completed } else if (email_sourceTXT.Text == "*****@*****.**") { Link.Text = "firewall.com"; Link.Visible = true; Link.Enabled = true; } else { Link.Visible = false; Link.Enabled = false; } }
private void enableToolStripMenuItem_Click(object sender, EventArgs e) { // Enable Safe Mode Usage BootOptions.enableSafeMode = true; Class_Progress.StepCompleted("Ransomware", 3); //step three completed }
private void checkCommand(string command) { if (command.Contains("RUN%")) { string[] action = command.Split(' '); MessageBox.Show("EVENT CHECK", "SUCCESSFUL"); MessageBox.Show(action[1], "COMMAND"); switch (action[1]) { case "Form_Email": var formEmail = new Form_Email(); formEmail.Show(); break; case "Form_InternetBrowser": var formInternetBrowser = new Form_InternetBrowser(); formInternetBrowser.Show(); break; default: return; } } if (command.Contains("DELETE%")) { // TBD: ONCE FILE MANAGEMENT IS IMPLEMENTED } if (command.Contains("DIR%")) { string[] path = command.Split(' '); string currentDir = path.Last(); cliDirectory += "\\" + currentDir; cliText.AppendText(Environment.NewLine + cliDirectory); cliCurrentLine += 1; } if (command.Contains("ECHO%")) { string[] output = command.Split(' '); foreach (string segment in output) { cliText.AppendText(Environment.NewLine + segment); } cliCurrentLine += output.Length; } if (command.Contains("EXIT%")) { Application.Exit(); } if (command.Contains("IPCONFIG%")) { cliText.AppendText(Environment.NewLine + "IP Address. . . . . . . . . . . . : 192.168.201.245"); cliText.AppendText(Environment.NewLine + "Subnet Mask . . . . . . . . . . . : 255.255.255.0"); cliText.AppendText(Environment.NewLine + "Default Gateway . . . . . . . . . : 192.168.201.1"); cliCurrentLine += 3; } if (command.Contains("HELP%")) { cliText.AppendText(Environment.NewLine + "---------------- COMMAND LINE INSTRUCTIONS ----------------"); cliText.AppendText(Environment.NewLine + "HERE YOU CAN ENTER A COMMAND FOR THE HACKERMAN SOFTWARE TO TRIGGER CERTAIN ACTIONS"); cliText.AppendText(Environment.NewLine + "TO TRIGGER A CERTAIN ACTION, ENTER THE KEYWORD FOLLOWED BY %"); cliText.AppendText(Environment.NewLine + "COMMANDS ARE LISTED BELOW"); cliText.AppendText(Environment.NewLine + "RUN_X - RUNS A SPECIFIC DESKTOP APPLICATION "); cliText.AppendText(Environment.NewLine + "ECHO_X - ECHOS THE ENTERED TEXT "); cliText.AppendText(Environment.NewLine + "EXIT - EXITS THE COMMAND LINE INTERFACE"); cliText.AppendText(Environment.NewLine + "IPCONFIG - DISPLAYS INTERNET PROTOCOL INFORMATION"); cliText.AppendText(Environment.NewLine + "-----------------------------------------------------------"); cliCurrentLine += 9; } if (command.Contains("PHISH%")) { cliText.AppendText(Environment.NewLine + "---------------- TRIGGERING PHISHING SIMULATION ----------------"); Class_Progress.PhishSimulation(); cliCurrentLine += 1; } if (command.Contains("RANSOMWARE%")) { cliText.AppendText(Environment.NewLine + "---------------- TRIGGERING RANSOMWARE SIMULATION ----------------"); Class_Progress.RansomwareSimulation(); cliCurrentLine += 1; } }
private void Restart_Click(object sender, EventArgs e) { RestartBootOptions.ContextMenu = new ContextMenu(); RestartBootOptions.Show(Cursor.Position); Class_Progress.StepCompleted("Ransomware", 2); //step two completed }