Académique Documents
Professionnel Documents
Culture Documents
SEGURIDAD
DE
LA
INFORMACION
SEGURIDAD
DE
LA
INFORMACION
Campo Frame Control* Duration/ID* Address{1*,2,3,4} Sequence Control QoS Control Frame Body FCS*
Uso Contiene indicadores de control Specifica la duracin (tiempo de uso del medio) / Identificador Direccin MAC Nmero de sequencia y de fragmento (de estar fragmentado) Identifica la categora del trfico y contiene informacin de QoS de la trama Datos de la trama Checksum de Integridad de la trama MAC
Slo se pueden fragmentar tramas Unicast. El tamao de los fragmentos debe ser igual y mltiplos pares de octetos, a excepcin del ltimo que puede ser ms pequeo. La encapsulacin WEP se aplica individualmente a cada fragmento. La defragmentacin ocurre en cada salto.
SEGURIDAD DE LA INFORMACION 4
802.11 Header
Sequence number = X More Fragments = 1 Fragment number = 1
Data1
802.11 Header
Sequence number = X More Fragments = 1 Fragment number = 2
Data2
802.11 Header
Sequence number = X More Fragments = 0 Fragment number = 3 5
Data3
SEGURIDAD
DE
LA
INFORMACION
SEGURIDAD
DE
LA
INFORMACION
SEGURIDAD
DE
LA
INFORMACION
Integridad en WEP:
Basada en ICV (Integrity Check Value)
Implementado como un CRC-32
SEGURIDAD
DE
LA
INFORMACION
1. Generacin de la semilla: Se concatena la clave con el vector de inicializacin (IV) (i.e. IV || Clave) 2. Calcula el ICV: CRC-32 del texto plano (payload) 3. Computa el Key stream: Key stream = RC4(seed) 4. Cifrado: Cipher text = Key stream XOR (Plaintext || ICV) 5. Mensaje = IV || Cipher text
SEGURIDAD DE LA INFORMACION 9
IV:
24 bits El estndar no especifica un algoritmo para elegir el IV. El estndar no requiere que se modifique el IV entre tramas. Comnmente el IV se inicializa en cero y aumenta linealmente (en modo big-endian o little-endian dependiendo de la arquitectura del procesador la placa de red).
SEGURIDAD
DE
LA
INFORMACION
10
SEGURIDAD
DE
LA
INFORMACION
11
Ataques de diccionario:
Intentar descifrar una trama WEP utilizando palabras de un diccionario. Dado que WEP no posee un mecanismo de distribucin de claves, se suelen utilizar claves simple y fciles de recordar.
SEGURIDAD DE LA INFORMACION 12
SEGURIDAD
DE
LA
INFORMACION
13
WEP
Riesgos de la reutilizacin de Key Stream: los secretos de XOR
Propiedades de XOR: Conmutativo: A XOR B = B XOR A Asociativo: (A XOR B) XOR C = A XOR (B XOR C) (A XOR B) XOR A = B A XOR 0 = A Por lo tanto, (Plaintext XOR WEP(IV||Key) ) XOR (Plaintext XOR WEP(IV||Key) ) ------------------------------------------------Plaintext XOR Plaintext
Si se conoce uno de los plaintext (al menos parcialmente), entonces se puede deducir el otro (al menos parcialmente). Esta el la razn para que exista un IV. De no existir, un plaintext conocido permitira determinar cualquier otro texto cifrado (en lugar de reutilizacin del IV se reutilizara toda la clave).
SEGURIDAD DE LA INFORMACION 14
SEGURIDAD
DE
LA
INFORMACION
15
Challenge XOR Response = RAND XOR WEP(RAND, IV||WEPKey) = RAND XOR ( RAND XOR KeyStream(IV||WEPKey) ) = KeyStream(IV||WEPKey)
El atacante puede autenticarse utilizando el key stream que obtuvo para responder al challenge del AP.
SEGURIDAD DE LA INFORMACION 16
The IEEE 802.11 standards committee specifically recommends against running an IEEE 802.11LAN with privacy but without authentication. While this combination is possible, it leaves the system open to significant security threats. -- IEEE 802.11 Standard, 1999 Edition
SEGURIDAD DE LA INFORMACION 17
Sea C = [M XOR WEP(iv,key), CRC-32(M) XOR WEP(iv,key)] entonces es posible para un atacante obtener C / C = [M XOR WEP(iv,key), CRC-32(M) XOR WEP(iv,key)] dnde M = M XOR (slo conociendo C y ):
C = [M XOR WEP(iv,key) XOR , CRC-32(M) XOR CRC-32() XOR CRC-32(Zero) XOR WEP(iv,key)] Demostracin:
C = [M XOR WEP(iv,key), CRC-32(M) XOR WEP(iv,key)] = [M XOR XOR WEP(iv,key), CRC-32(M XOR ) XOR WEP(iv,key)] = [M XOR XOR WEP(iv,key), CRC-32(M XOR XOR Zero) XOR WEP(iv,key)] = [M XOR WEP(iv,key) XOR , CRC-32(M) XOR CRC-32() XOR CRC-32(Zero) XOR WEP(iv,key)]
SEGURIDAD DE LA INFORMACION 18
WEP
Modificacin de Mensajes: No me crean, cranle a python
from binascii import crc32 M = '\x01\x02\x03' D = '\x10\x11\x12' def XOR(a,b): xor = '' for i in range(len(a)): xor = xor + chr(ord(M[i]) ^ ord(D[i])) return xor M1 = XOR(M,D) crc_M = crc32(M) crc_D = crc32(D) crc_blank = crc32('\x00\x00\x00') crc_M1 = crc32(M1) crc_M ^ crc_D ^ crc_blank == crc_M1 19
SEGURIDAD
DE
LA
INFORMACION
LLC HEADER
DSAP SNAP: 0xAA SNAP: 0xAA Unnumbered frame: 0x03 IP: 0x0800 Encapsulated Ethernet: 0x000000 ARP: 0x0806 SSAP CTRL ORG CODE ETHER TYPE
SEGURIDAD
DE
LA
INFORMACION
20
802.11 Header
IV
Encrypted Data
ICV
SIZE = 28 BYTES
PROTOCOL SIZE
SEGURIDAD DE LA INFORMACION
WEP Chop-Chop
Un poco de teora:
Sea C = [M XOR WEP(iv,key), CRC-32(M) XOR WEP(iv,key)] Sea CM = M XOR WEP(iv,key) Sea CM-1 = M-1 XOR WEP(iv,key), dnde M-1 es M con el ltimo byte truncado. CRC-32(M-1) se puede computar a partir de:
CRC-32(M) El valor de M[-1] (i.e. el byte truncado)
Reiniciar el ataque con CM-1 como la trama WEP. Luego de M iteraciones, se obtienen todos los valores del plaintext, y a partir del plaintext se puede obtener el key stream.
DE LA INFORMACION 22
SEGURIDAD
802.11 Header
IV
c=1 0
Enviar trama
SEGURIDAD
DE
LA
INFORMACION
23
802.11 Header
Sequence number = X More Fragments = 1 Fragment number = 1 IV = cualquier valor
IV
Data1 IV
802.11 Header
Sequence number = X More Fragments = 1 Fragment number = 2 IV = cualquier valor
802.11 Header
SEGURIDAD
DE
LA
INFORMACION
24
SEGURIDAD
DE
LA
INFORMACION
25
WEP IV
Protocol Size
LLC Header
Opcode
ARP Header
Sender MAC Sender IP
WEP ICV
Target MAC Target IP
AA BB CC DD EE FF
A9 FE 00
01
A9 FE 00
01
+
00 00 00 00 00 FF 00 00
+
00 FF 00 00
+
00 00
AA BB CC DD EE 00
Nueva MAC
SEGURIDAD DE LA
A9 FE 00
FE
A9 FE 00
01
27
Un mecanismo de distribucin de claves: 4-way handshake Dos protocolos que proveen confidencialidad e integridad de datos: TKIP (Temporal Key Integrity Protocol): Opcional
CCMP (CTR with CBC-MAC Protocol): Obligatorio
La Wi-Fi alliance (una asociacin sin fines de lucro que intenta garantizar la intercompatibilidad de productos) tiene las siguientes certificaciones:
WPA (Wi-Fi Protected Access): certifica TKIP WPA2: certifica compatibilidad con 802.11i (AES-CCMP)
SEGURIDAD
DE
LA
INFORMACION
28
SEGURIDAD
DE
LA
INFORMACION
29
SEGURIDAD
DE
LA
INFORMACION
30
SEGURIDAD
DE
LA
INFORMACION
31
SEGURIDAD
DE
LA
INFORMACION
32
SEGURIDAD
DE
LA
INFORMACION
33
SEGURIDAD
DE
LA
INFORMACION
34
SEGURIDAD
DE
LA
INFORMACION
35
SEGURIDAD
DE
LA
INFORMACION
36
SEGURIDAD
DE
LA
INFORMACION
37
SEGURIDAD
DE
LA
INFORMACION
38
SEGURIDAD
DE
LA
INFORMACION
39
SEGURIDAD
DE
LA
INFORMACION
41
Dnde:
TA: Direccin de la estacin realizando el cifrado TK: Temporary encryption key TSC: Contador de replay DA: Direccin destino SA: Direccin origen
DE LA INFORMACION 42
SEGURIDAD
CCMP:
Basado en AES (Advanced Encryption Standard) operando en CCM. Clave de 128 bit. Requiere hardware nuevo. Utiliza un counter para prevenir ataques de replay.
SEGURIDAD
DE
LA
INFORMACION
43
Como la PSK es de 256 bits, la opcin de fuerza bruta no es viable, pero si lo es un ataque de diccionario.
Para reducir el tiempo de computo podemos tener pre-computadas las KCK. Sin embargo, el problema con este enfoque es que la PMK (y por ende la KCK) depende del SSID en uso. Por lo tanto las tablas pre-computadas estn atadas a un SSID. (Ver CoWPAtty: http://www.willhackforsushi.com/Cowpatty.html)
DE LA INFORMACION 45
SEGURIDAD
Le permite a un atacante:
Descifrar tramas enviadas a una estacin QoS (o broadcast) de a un byte por minuto. Recuperar un keystream generado con la clave AP estacin (de la estacin siendo atacada) o un keystream generado con la clave broadcast. Recuperar la clave MIC de AP estacin (de la estacin siendo atacada) o la clave MIC de broadcast. Transmitir hasta 7 tramas arbitrarias a la estacin siendo atacada o a todas las estaciones (en el caso que hayamos descifrado una trama broadcast), limitada por la longitud del keystream obtenido.
SEGURIDAD
DE
LA
INFORMACION
47
SEGURIDAD
DE
LA
INFORMACION
49