-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathmystikal.py
237 lines (206 loc) · 7.37 KB
/
mystikal.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
#!/usr/bin/python3
import sys
from pathlib import Path
from Modules.Installer_Package import *
from Modules.Installer_Package_Python import *
from Modules.Installer_Package_with_LD import *
from Modules.Installer_Plugins import *
from Modules.Installer_JS import *
from Modules.Installer_JS_Script import *
from Modules.Mobile import *
from Modules.Webloc import *
from Modules.Macro_Word import *
from Modules.Macro_Excel import *
from Modules.Macro_PowerPoint import *
from Modules.Macro_SYLK_Excel import *
from Modules.DMG import *
from Modules.PDF import *
from Modules.Python_PIP_Package import pip_package
from Modules.Python_PIP_Package_Dylib import pip_package_dylib
from Modules.Ruby_Gem import ruby_gem
from Modules.Ruby_Gem_Dylib import ruby_gem_dylib
from Modules.NodeJS_NPM_Package import npm_package
from Modules.Tcl import tcl_package
from Modules.Tcl_Hosted import tcl_package_hosted
print("""\
_______ __ __ __ __
| | |.--.--.-----.| |_|__| |--.---.-.| |
| || | |__ --|| _| | <| _ || |
|__|_|__||___ |_____||____|__|__|__|___._||__|
|_____|
""")
def main():
print("Mystikal: macOS Initial Access Payload Generator")
Path("./Payloads/").mkdir(parents=True, exist_ok=True)
choice = '0'
while choice == '0':
print("Main Choice: Choose 1 of 12 choices")
print("Choose 1 for Installer Packages")
print("Choose 2 for Mobile Configuration: Chrome Extension")
print("Choose 3 for Mobile Configuration: Webloc File")
print("Choose 4 for Office Macros: VBA")
print("Choose 5 for Office Macros: XLM Macros in SYLK Files")
print("Choose 6 for Disk Images")
print("Choose 7 for Armed PDFs")
print("Choose 8 for Armed Python PIP Packages")
print("Choose 9 for Armed Ruby Gems")
print("Choose 10 for Armed NodeJS NPM Packages")
print("Choose 11 for Tclsh")
print("Choose 12 to exit")
choice = input("Please make a choice: ")
if choice == "12":
print("Exiting")
sys.exit(1)
elif choice == "11":
print("Selected Tclsh")
tcl_menu()
elif choice == "10":
print("Selected Armed NodeJS NPM Package")
npm_package()
elif choice == "9":
print("Selected Armed Ruby Gem")
ruby_menu()
elif choice == "8":
print("Selected Armed Python PIP Package")
pip_menu()
elif choice == "7":
print("Selected Armed PDF")
pdf()
elif choice == "6":
print("Selected Disk Images")
dmg()
elif choice == "5":
print("Selected Office Macros: XLM Macros in SYLK Files")
sylk_macros_excel()
elif choice == "4":
print("Selected Office Macros: VBA")
office_macros_menu()
elif choice == "3":
print("Selected Mobile Configuration: Webloc File")
mobile_webloc()
elif choice == "2":
print("Selected Mobile Configuration: Chrome Extension")
mobile_ext()
elif choice == "1":
print("Selected Installer Packages")
install_pkg_menu()
else:
print("*******Pick an option 1-8*******")
main()
def install_pkg_menu():
choice = '0'
while choice == '0':
print("SubMenu Choice: Choose 1 of 5 choices")
print("Choose 1 for Installer Package w/ only preinstall script")
print("Choose 2 for Installer Package w/ Launch Daemon for Persistence")
print("Choose 3 for Installer Package w/ Installer Plugin")
print("Choose 4 for Installer Package w/ JavaScript Functionality")
print("Choose 5 for Installer Package w/ Dylib")
print("Choose 6 to exit")
choice = input("Please make a choice: ")
if choice == "6":
sys.exit(1)
elif choice == "5":
print("Selected Installer Package w/ Dylib")
install_pkg_py()
elif choice == "4":
print("Selected Installer Package w/ JavaScript Functionality")
pkg_js_menu()
elif choice == "3":
install_plug()
elif choice == "2":
install_pkg_with_LD()
elif choice == "1":
install_pkg()
else:
print("*******Pick an option 1-4*******")
install_pkg_menu()
def tcl_menu():
choice = '0'
while choice == '0':
print("SubMenu Choice: Choose 1 of 3 choices")
print("Choose 1 for Tclsh w/ local files")
print("Choose 2 for Tclsh w/ hosted dylibs")
print("Choose 3 to exit")
choice = input("Please make a choice: ")
if choice == "3":
sys.exit(1)
elif choice == "2":
tcl_package_hosted()
elif choice == "1":
tcl_package()
else:
print("*******Pick an option 1-3*******")
pip_menu()
def pip_menu():
choice = '0'
while choice == '0':
print("SubMenu Choice: Choose 1 of 3 choices")
print("Choose 1 for Armed Python PIP Packages w/ osascript execution")
print("Choose 2 for Armed Python PIP Packages w/ dylib load")
print("Choose 3 to exit")
choice = input("Please make a choice: ")
if choice == "3":
sys.exit(1)
elif choice == "2":
pip_package_dylib()
elif choice == "1":
pip_package()
else:
print("*******Pick an option 1-3*******")
pip_menu()
def ruby_menu():
choice = '0'
while choice == '0':
print("SubMenu Choice: Choose 1 of 3 choices")
print("Choose 1 for Armed Ruby Gem w/ osascript execution")
print("Choose 2 for Armed Ruby Gem w/ dylib load")
print("Choose 3 to exit")
choice = input("Please make a choice: ")
if choice == "3":
sys.exit(1)
elif choice == "2":
ruby_gem_dylib()
elif choice == "1":
ruby_gem()
else:
print("*******Pick an option 1-3*******")
ruby_menu()
def office_macros_menu():
choice = '0'
while choice == '0':
print("SubMenu Choice: Choose 1 of 4 choices")
print("Choose 1 for VBA Macros for Word")
print("Choose 2 for VBA Macros for Excel")
print("Choose 3 for VBA Macros for PowerPoint")
print("Choose 4 to exit")
choice = input("Please make a choice: ")
if choice == "4":
sys.exit(1)
elif choice == "3":
macro_powerpoint()
elif choice == "2":
macro_excel()
elif choice == "1":
macro_word()
else:
print("*******Pick an option 1-4*******")
office_macros_menu()
def pkg_js_menu():
choice = '0'
while choice == '0':
print("SubMenu Choice: Choose 1 of 3 choices")
print("Choose 1 for Installer Package w/ JavaScript Functionality embedded")
print("Choose 2 for Installer Package w/ JavaScript Functionality in Script")
print("Choose 3 to exit")
choice = input("Please make a choice: ")
if choice == "3":
sys.exit(1)
elif choice == "2":
install_js_script()
elif choice == "1":
install_js()
else:
print("*******Pick an option 1-3*******")
pkg_js_menu()
main()