|
10 | 10 | # [A Remote Access Kit for Windows]
|
11 | 11 | # Author: SlizBinksman
|
12 | 12 | # Github: https://github.com/slizbinksman
|
13 |
| -# Build: 1.0.2 |
| 13 | +# Build: 1.0.21 |
14 | 14 | # -------------------------------------------------------------
|
15 |
| -from ..logging.logging import DNSconfigs,NetworkingConfigs |
16 |
| -from ..builder.agent_builder import Builder |
17 |
| -from ..utils.utils import ErrorHandling |
18 |
| -from ..networking.IP_Handler import NicHandler |
19 |
| -from ..Qt5.icons import IconObj |
| 15 | +from core.logging.logging import DNSconfigs,NetworkingConfigs |
| 16 | +from core.builder.windows10.agent_builder import Builder |
| 17 | +from core.utils.utils import ErrorHandling |
| 18 | +from core.networking.utils.IP_Handler import NicHandler |
| 19 | +from core.Qt5.icons import IconObj |
20 | 20 |
|
21 | 21 | from PyQt5 import QtCore, QtGui, QtWidgets
|
22 | 22 |
|
@@ -58,126 +58,137 @@ def check_builder_options(self):
|
58 | 58 | host, self.file_name_input.text(),reg_key,perst_option,encryption_option) #
|
59 | 59 |
|
60 | 60 | def setupUi(self, builder_dialog):
|
| 61 | + """ |
| 62 | + Initialize UI parameters |
| 63 | + """ |
61 | 64 | builder_dialog.setObjectName("builder_dialog")
|
62 | 65 | builder_dialog.resize(460, 479)
|
63 | 66 | builder_dialog.setStyleSheet("background-color: rgb(0, 0, 0);")
|
64 | 67 | builder_dialog.setWindowIcon(IconObj().builder_icon)
|
| 68 | + """ |
| 69 | + Create widget objects |
| 70 | + """ |
65 | 71 | self.networking_group_box = QtWidgets.QGroupBox(builder_dialog)
|
66 |
| - self.networking_group_box.setGeometry(QtCore.QRect(10, 10, 441, 101)) |
67 |
| - font = QtGui.QFont() |
68 |
| - font.setFamily("Courier 10 Pitch") |
69 |
| - font.setPointSize(14) |
70 |
| - self.networking_group_box.setFont(font) |
71 |
| - self.networking_group_box.setStyleSheet("background-color: rgb(51, 51, 51);") |
72 |
| - self.networking_group_box.setAlignment(QtCore.Qt.AlignCenter) |
73 |
| - self.networking_group_box.setObjectName("networking_group_box") |
74 | 72 | self.host_combobox = QtWidgets.QComboBox(self.networking_group_box)
|
75 |
| - self.host_combobox.setGeometry(QtCore.QRect(80, 30, 351, 27)) |
76 |
| - self.host_combobox.setObjectName("host_combobox") |
77 |
| - for domain in DNSconfigs().retrieve_dns_domains(): #for domains in the domains text file |
78 |
| - self.host_combobox.addItem(domain) #add domain to dropdown menu |
79 |
| - self.host_combobox.addItem('Local IP') |
80 |
| - self.host_combobox.addItem('Public IP') |
81 | 73 | self.host_label = QtWidgets.QLabel(self.networking_group_box)
|
82 |
| - self.host_label.setGeometry(QtCore.QRect(10, 30, 61, 21)) |
83 |
| - font = QtGui.QFont() |
84 |
| - font.setPointSize(13) |
85 |
| - self.host_label.setFont(font) |
86 |
| - self.host_label.setObjectName("host_label") |
87 | 74 | self.port_label = QtWidgets.QLabel(self.networking_group_box)
|
88 |
| - self.port_label.setGeometry(QtCore.QRect(40, 60, 41, 19)) |
89 |
| - font = QtGui.QFont() |
90 |
| - font.setPointSize(13) |
91 |
| - self.port_label.setFont(font) |
92 |
| - self.port_label.setObjectName("port_label") |
93 | 75 | self.port_input = QtWidgets.QLineEdit(self.networking_group_box)
|
94 |
| - self.port_input.setGeometry(QtCore.QRect(80, 60, 113, 31)) |
95 |
| - self.port_input.setObjectName("port_input") |
96 | 76 | self.obfuscation_groupbox = QtWidgets.QGroupBox(builder_dialog)
|
| 77 | + self.encryption_radio = QtWidgets.QRadioButton(self.obfuscation_groupbox) |
| 78 | + self.persistance_groupbox = QtWidgets.QGroupBox(builder_dialog) |
| 79 | + self.hkcu_radio = QtWidgets.QRadioButton(self.persistance_groupbox) |
| 80 | + self.hklm_radio = QtWidgets.QRadioButton(self.persistance_groupbox) |
| 81 | + self.none_radio = QtWidgets.QRadioButton(self.persistance_groupbox) |
| 82 | + self.socket_groupbox = QtWidgets.QGroupBox(builder_dialog) |
| 83 | + self.exfil_port_input = QtWidgets.QLineEdit(self.socket_groupbox) |
| 84 | + self.stream_port_input = QtWidgets.QLineEdit(self.socket_groupbox) |
| 85 | + self.label = QtWidgets.QLabel(self.socket_groupbox) |
| 86 | + self.label_2 = QtWidgets.QLabel(self.socket_groupbox) |
| 87 | + self.file_settings_groupbox = QtWidgets.QGroupBox(builder_dialog) |
| 88 | + self.file_name_input = QtWidgets.QLineEdit(self.file_settings_groupbox) |
| 89 | + self.file_name_label = QtWidgets.QLabel(self.file_settings_groupbox) |
| 90 | + self.build_stub_button = QtWidgets.QPushButton(builder_dialog, clicked=lambda: self.check_builder_options()) |
| 91 | + """ |
| 92 | + Set widget geometry |
| 93 | + """ |
| 94 | + self.networking_group_box.setGeometry(QtCore.QRect(10, 10, 441, 101)) |
| 95 | + self.host_combobox.setGeometry(QtCore.QRect(80, 30, 351, 27)) |
| 96 | + self.host_label.setGeometry(QtCore.QRect(10, 30, 61, 21)) |
| 97 | + self.port_label.setGeometry(QtCore.QRect(40, 60, 41, 19)) |
| 98 | + self.port_input.setGeometry(QtCore.QRect(80, 60, 113, 31)) |
97 | 99 | self.obfuscation_groupbox.setGeometry(QtCore.QRect(10, 120, 441, 101))
|
| 100 | + self.encryption_radio.setGeometry(QtCore.QRect(10, 30, 141, 24)) |
| 101 | + self.persistance_groupbox.setGeometry(QtCore.QRect(10, 230, 211, 111)) |
| 102 | + self.hkcu_radio.setGeometry(QtCore.QRect(10, 30, 114, 24)) |
| 103 | + self.hklm_radio.setGeometry(QtCore.QRect(10, 50, 114, 24)) |
| 104 | + self.none_radio.setGeometry(QtCore.QRect(10, 70, 114, 24)) |
| 105 | + self.socket_groupbox.setGeometry(QtCore.QRect(230, 230, 221, 111)) |
| 106 | + self.exfil_port_input.setGeometry(QtCore.QRect(100, 30, 113, 33)) |
| 107 | + self.stream_port_input.setGeometry(QtCore.QRect(100, 70, 113, 33)) |
| 108 | + self.label.setGeometry(QtCore.QRect(20, 40, 67, 19)) |
| 109 | + self.label_2.setGeometry(QtCore.QRect(10, 70, 81, 20)) |
| 110 | + self.file_settings_groupbox.setGeometry(QtCore.QRect(10, 350, 441, 71)) |
| 111 | + self.file_name_input.setGeometry(QtCore.QRect(110, 30, 321, 33)) |
| 112 | + self.file_name_label.setGeometry(QtCore.QRect(10, 40, 81, 21)) |
| 113 | + self.build_stub_button.setGeometry(QtCore.QRect(10, 430, 441, 41)) |
| 114 | + """ |
| 115 | + Set widget object name |
| 116 | + """ |
| 117 | + self.networking_group_box.setObjectName("networking_group_box") |
| 118 | + self.host_combobox.setObjectName("host_combobox") |
| 119 | + self.host_label.setObjectName("host_label") |
| 120 | + self.port_label.setObjectName("port_label") |
| 121 | + self.port_input.setObjectName("port_input") |
| 122 | + self.obfuscation_groupbox.setObjectName("obfuscation_groupbox") |
| 123 | + self.encryption_radio.setObjectName("encryption_radio") |
| 124 | + self.persistance_groupbox.setObjectName("compilation_groupbox") |
| 125 | + self.hkcu_radio.setObjectName("raw_script_radio") |
| 126 | + self.hklm_radio.setObjectName("pyinstaller_radio") |
| 127 | + self.none_radio.setObjectName('none_radio') |
| 128 | + self.socket_groupbox.setObjectName("socket_groupbox") |
| 129 | + self.exfil_port_input.setObjectName("exfil_port_input") |
| 130 | + self.stream_port_input.setObjectName("stream_port_input") |
| 131 | + self.label.setObjectName("label") |
| 132 | + self.label_2.setObjectName("label_2") |
| 133 | + self.file_settings_groupbox.setObjectName("file_settings_groupbox") |
| 134 | + self.file_name_input.setObjectName("file_name_input") |
| 135 | + self.file_name_label.setObjectName("file_name_label") |
| 136 | + self.build_stub_button.setObjectName("build_stub_button") |
| 137 | + """ |
| 138 | + Set font sizes and aligntments for widgets |
| 139 | + """ |
98 | 140 | font = QtGui.QFont()
|
99 | 141 | font.setFamily("Courier 10 Pitch")
|
100 | 142 | font.setPointSize(14)
|
101 | 143 | self.obfuscation_groupbox.setFont(font)
|
102 | 144 | self.obfuscation_groupbox.setStyleSheet("background-color: rgb(51, 51, 51);")
|
103 | 145 | self.obfuscation_groupbox.setAlignment(QtCore.Qt.AlignCenter)
|
104 |
| - self.obfuscation_groupbox.setObjectName("obfuscation_groupbox") |
105 |
| - self.encryption_radio = QtWidgets.QRadioButton(self.obfuscation_groupbox) |
106 |
| - self.encryption_radio.setGeometry(QtCore.QRect(10, 30, 141, 24)) |
107 |
| - self.encryption_radio.setObjectName("encryption_radio") |
108 |
| - self.persistance_groupbox = QtWidgets.QGroupBox(builder_dialog) |
109 |
| - self.persistance_groupbox.setGeometry(QtCore.QRect(10, 230, 211, 111)) |
110 | 146 | font = QtGui.QFont()
|
111 | 147 | font.setFamily("Courier 10 Pitch")
|
112 | 148 | font.setPointSize(14)
|
113 | 149 | self.persistance_groupbox.setFont(font)
|
114 | 150 | self.persistance_groupbox.setStyleSheet("background-color: rgb(51, 51, 51);")
|
115 | 151 | self.persistance_groupbox.setAlignment(QtCore.Qt.AlignCenter)
|
116 |
| - self.persistance_groupbox.setObjectName("compilation_groupbox") |
117 |
| - self.hkcu_radio = QtWidgets.QRadioButton(self.persistance_groupbox) |
118 |
| - self.hkcu_radio.setGeometry(QtCore.QRect(10, 30, 114, 24)) |
119 |
| - self.hkcu_radio.setObjectName("raw_script_radio") |
120 |
| - self.hklm_radio = QtWidgets.QRadioButton(self.persistance_groupbox) |
121 |
| - self.hklm_radio.setGeometry(QtCore.QRect(10, 50, 114, 24)) |
122 |
| - self.hklm_radio.setObjectName("pyinstaller_radio") |
123 |
| - self.none_radio = QtWidgets.QRadioButton(self.persistance_groupbox) |
124 |
| - self.none_radio.setGeometry(QtCore.QRect(10, 70, 114, 24)) |
125 |
| - self.none_radio.setObjectName('none_radio') |
126 |
| - self.socket_groupbox = QtWidgets.QGroupBox(builder_dialog) |
127 |
| - self.socket_groupbox.setGeometry(QtCore.QRect(230, 230, 221, 111)) |
128 | 152 | font = QtGui.QFont()
|
129 | 153 | font.setFamily("Courier 10 Pitch")
|
130 | 154 | font.setPointSize(14)
|
131 | 155 | self.socket_groupbox.setFont(font)
|
132 | 156 | self.socket_groupbox.setStyleSheet("background-color: rgb(51, 51, 51);")
|
133 | 157 | self.socket_groupbox.setAlignment(QtCore.Qt.AlignCenter)
|
134 |
| - self.socket_groupbox.setObjectName("socket_groupbox") |
135 |
| - self.exfil_port_input = QtWidgets.QLineEdit(self.socket_groupbox) |
136 |
| - self.exfil_port_input.setGeometry(QtCore.QRect(100, 30, 113, 33)) |
137 |
| - self.exfil_port_input.setObjectName("exfil_port_input") |
138 |
| - self.exfil_port_input.setText(NetworkingConfigs().retrieve_exfil_port()) |
139 |
| - self.stream_port_input = QtWidgets.QLineEdit(self.socket_groupbox) |
140 |
| - self.stream_port_input.setGeometry(QtCore.QRect(100, 70, 113, 33)) |
141 |
| - self.stream_port_input.setObjectName("stream_port_input") |
142 |
| - self.stream_port_input.setText(NetworkingConfigs().retrieve_stream_port()) |
143 |
| - self.label = QtWidgets.QLabel(self.socket_groupbox) |
144 |
| - self.label.setGeometry(QtCore.QRect(20, 40, 67, 19)) |
145 |
| - self.label.setObjectName("label") |
146 |
| - self.label_2 = QtWidgets.QLabel(self.socket_groupbox) |
147 |
| - self.label_2.setGeometry(QtCore.QRect(10, 70, 81, 20)) |
148 |
| - self.label_2.setObjectName("label_2") |
149 |
| - self.file_settings_groupbox = QtWidgets.QGroupBox(builder_dialog) |
150 |
| - self.file_settings_groupbox.setGeometry(QtCore.QRect(10, 350, 441, 71)) |
151 | 158 | font = QtGui.QFont()
|
152 | 159 | font.setFamily("Courier 10 Pitch")
|
153 | 160 | font.setPointSize(14)
|
154 | 161 | self.file_settings_groupbox.setFont(font)
|
155 | 162 | self.file_settings_groupbox.setStyleSheet("background-color: rgb(51, 51, 51);")
|
156 | 163 | self.file_settings_groupbox.setAlignment(QtCore.Qt.AlignCenter)
|
157 |
| - self.file_settings_groupbox.setObjectName("file_settings_groupbox") |
158 |
| - self.file_name_input = QtWidgets.QLineEdit(self.file_settings_groupbox) |
159 |
| - self.file_name_input.setGeometry(QtCore.QRect(110, 30, 321, 33)) |
160 |
| - self.file_name_input.setObjectName("file_name_input") |
161 |
| - self.file_name_label = QtWidgets.QLabel(self.file_settings_groupbox) |
162 |
| - self.file_name_label.setGeometry(QtCore.QRect(10, 40, 81, 21)) |
163 | 164 | font = QtGui.QFont()
|
164 | 165 | font.setPointSize(12)
|
165 | 166 | self.file_name_label.setFont(font)
|
166 |
| - self.file_name_label.setObjectName("file_name_label") |
167 |
| - self.build_stub_button = QtWidgets.QPushButton(builder_dialog,clicked=lambda: self.check_builder_options()) |
168 |
| - self.build_stub_button.setGeometry(QtCore.QRect(10, 430, 441, 41)) |
169 | 167 | font = QtGui.QFont()
|
170 | 168 | font.setFamily("Courier 10 Pitch")
|
171 | 169 | font.setPointSize(15)
|
172 | 170 | self.build_stub_button.setFont(font)
|
173 |
| - self.build_stub_button.setObjectName("build_stub_button") |
174 |
| - |
| 171 | + self.networking_group_box.setStyleSheet("background-color: rgb(51, 51, 51);") |
| 172 | + self.networking_group_box.setAlignment(QtCore.Qt.AlignCenter) |
| 173 | + """ |
| 174 | + Add items to widgets |
| 175 | + """ |
| 176 | + for domain in DNSconfigs().retrieve_dns_domains(): #for domains in the domains text file |
| 177 | + self.host_combobox.addItem(domain) #add domain to dropdown menu |
| 178 | + self.host_combobox.addItem('Local IP') |
| 179 | + self.host_combobox.addItem('Public IP') |
| 180 | + """ |
| 181 | + Set widget text and finish setting up UI |
| 182 | + """ |
| 183 | + self.exfil_port_input.setText(NetworkingConfigs().retrieve_exfil_port()) |
| 184 | + self.stream_port_input.setText(NetworkingConfigs().retrieve_stream_port()) |
175 | 185 | self.retranslateUi(builder_dialog)
|
176 | 186 | QtCore.QMetaObject.connectSlotsByName(builder_dialog)
|
177 | 187 |
|
| 188 | + |
178 | 189 | def retranslateUi(self, builder_dialog):
|
179 | 190 | _translate = QtCore.QCoreApplication.translate
|
180 |
| - builder_dialog.setWindowTitle(_translate("builder_dialog", "Agent Builder")) |
| 191 | + builder_dialog.setWindowTitle(_translate("builder_dialog", "Windows 10 Agent Builder")) |
181 | 192 | self.networking_group_box.setTitle(_translate("builder_dialog", "Networking Settings"))
|
182 | 193 | self.host_label.setText(_translate("builder_dialog", " Host"))
|
183 | 194 | self.port_label.setText(_translate("builder_dialog", "Port"))
|
|
0 commit comments