#!/bin/bash #============================================= # ARRANQUE RAPIDO - KALI LIVE + ALPHA AWUS036ACH #============================================= # Ejecutar con: sudo bash arranque_rapido.sh # Guardar en el USB y ejecutar al arrancar Kali Live #============================================= set -e echo "" echo "============================================" echo " ARRANQUE RAPIDO - PENTESTING WiFi" echo " Alpha AWUS036ACH (RTL8812AU)" echo "============================================" echo "" # Colores ROJO='\033[0;31m' VERDE='\033[0;36m' AMARILLO='\033[1;33m' SIN_COLOR='\033[0m' # Paso 0: Verificar que somos root if [ "$EUID" -ne 0 ]; then echo -e "${ROJO}[ERROR] Ejecuta con sudo: sudo bash arranque_rapido.sh${SIN_COLOR}" exit 1 fi # Paso 1: Verificar conexion a internet echo -e "${AMARILLO}[1/6] Verificando internet...${SIN_COLOR}" if ping -c 1 google.com &> /dev/null; then echo -e "${VERDE} OK - Internet conectado${SIN_COLOR}" else echo -e "${ROJO} SIN INTERNET - conecta WiFi o cable antes de continuar${SIN_COLOR}" echo " Si no tienes internet, este script no puede instalar paquetes." echo " Pulsa Ctrl+C para salir o Enter para intentar sin internet..." read -s fi # Paso 2: Actualizar repositorios echo "" echo -e "${AMARILLO}[2/6] Actualizando repositorios (apt update)...${SIN_COLOR}" if ping -c 1 google.com &> /dev/null; then apt update -qq echo -e "${VERDE} OK - Repositorios actualizados${SIN_COLOR}" else echo -e "${ROJO} SALTADO - sin internet${SIN_COLOR}" fi # Paso 3: Instalar paquetes necesarios echo "" echo -e "${AMARILLO}[3/6] Instalando paquetes necesarios...${SIN_COLOR}" if ping -c 1 google.com &> /dev/null; then apt install -y -qq aircrack-ng realtek-rtl88xxau-dkms wireless-tools iw wpasupplicant 2>/dev/null echo -e "${VERDE} OK - Paquetes instalados${SIN_COLOR}" else echo -e "${ROJO} SALTADO - sin internet${SIN_COLOR}" fi # Paso 4: Verificar la antena echo "" echo -e "${AMARILLO}[4/6] Verificando antena Alpha...${SIN_COLOR}" if lsusb | grep -qi "realtek\|8812\|rtl88"; then echo -e "${VERDE} OK - Alpha AWUS036ACH detectada${SIN_COLOR}" else echo -e "${ROJO} NO DETECTADA - conecta la antena por USB${SIN_COLOR}" echo " Si ya esta conectada, prueba: sudo reboot" fi # Paso 5: Detectar interfaz WiFi echo "" echo -e "${AMARILLO}[5/6] Detectando interfaz WiFi...${SIN_COLOR}" WLAN="" for iface in wlan0 wlan1 wlan2; do if ip link show "$iface" &> /dev/null; then WLAN="$iface" break fi done if [ -n "$WLAN" ]; then echo -e "${VERDE} OK - Interfaz encontrada: $WLAN${SIN_COLOR}" else echo -e "${ROJO} NO SE ENCONTRO interfaz wlan${SIN_COLOR}" echo " Ejecuta manualmente: iwconfig" echo " Si no aparece nada, reinicia con la antena conectada" fi # Paso 6: Activar modo monitor echo "" echo -e "${AMARILLO}[6/6] Activando modo monitor...${SIN_COLOR}" if [ -n "$WLAN" ]; then # Matar procesos que interfieran airmon-ng check kill &> /dev/null # Activar modo monitor airmon-ng start "$WLAN" &> /dev/null # Verificar if iwconfig wlan0mon 2>/dev/null | grep -q "Monitor"; then echo -e "${VERDE} OK - Modo monitor activo en wlan0mon${SIN_COLOR}" MONIF="wlan0mon" elif iwconfig "${WLAN}" 2>/dev/null | grep -q "Monitor"; then echo -e "${VERDE} OK - Modo monitor activo en $WLAN${SIN_COLOR}" MONIF="$WLAN" else echo -e "${AMARILLO} No se pudo verificar. Comprueba manualmente con: iwconfig${SIN_COLOR}" MONIF="wlan0mon" fi else echo -e "${ROJO} SALTADO - sin interfaz WiFi${SIN_COLOR}" MONIF="" fi # Resumen echo "" echo "============================================" echo " RESUMEN" echo "============================================" if [ -n "$MONIF" ]; then echo -e " Modo monitor: ${VERDE}ACTIVO${SIN_COLOR} ($MONIF)" echo "" echo " SIGUIENTE PASO - Escanear redes:" echo " sudo airodump-ng $MONIF" echo "" echo " Cuando veas tu red objetivo, captura el handshake:" echo " sudo airodump-ng -c CANAL --bssid MAC -w captura $MONIF" echo "" echo " Para forzar handshake (deauth):" echo " sudo aireplay-ng --deauth 5 -a MAC_AP -c MAC_CLI $MONIF" echo "" echo " Para crackear:" echo " aircrack-ng -w /usr/share/wordlists/rockyou.txt captura-01.cap" else echo -e " Modo monitor: ${ROJO}NO ACTIVADO${SIN_COLOR}" echo "" echo " Ejecuta manualmente:" echo " sudo airmon-ng check kill" echo " sudo airmon-ng start wlan0" echo " iwconfig wlan0mon" fi echo "" echo " SALIR del modo monitor cuando termines:" echo " sudo airmon-ng stop wlan0mon" echo "============================================" echo ""