Mobile Network Security
Refik MOLVA Institut Eurécom B.P. 193 06904 Sophia Antipolis Cedex - France Refik.Molva@eurecom.fr
Institut Eurecom 2005
Mobile Network Security Refik MOLVA Institut Eurcom B.P. 193 - - PowerPoint PPT Presentation
Mobile Network Security Refik MOLVA Institut Eurcom B.P. 193 06904 Sophia Antipolis Cedex - France Refik.Molva@eurecom.fr Institut Eurecom 2005 Outline Wireless LAN 802.11 (WiFi) Mobile Telecommunications Security
Institut Eurecom 2005
Mobile Network Security - R. Molva 1
Mobile Network Security - R. Molva 2
Ad Hoc Mode Infrastructure Mode
Mobile Network Security - R. Molva 3
Client Access Point Probe Request (SSID) Beacon(SSID) OR Authentication Association Response Association Request Deassociate OR Deauthenticate Various Alternatives Data Client is associated Client is not associated
Mobile Network Security - R. Molva 4
Mobile Network Security - R. Molva 5
Mobile Network Security - R. Molva 6
Victim Access Point Deassociate(Victim’s MAC@) Victim is not associated Attacker Beacon as Access Point
Association Req. (Victim’s MAC@) Victim’s data traffic Association Resp. Association Req. (Victim’s MAC@) Association Resp. Victim’s data traffic Main reason why this attack works: Management frames (associate, deassociate) are not authenticated except in 802.11i. AP Victim Man in the Middle acts as
Mobile Network Security - R. Molva 7
Mobile Network Security - R. Molva 8
→ Peer Entity Authentication → Data Origin Authentication
→ Data Confidentiality and Integrity → Privacy (Anonymity)
→ Access Control (data link layer) → DoS prevention (?)
Mobile Network Security - R. Molva 9
– “secret” SSID shared by too many – Exchanged in cleartext – Ease of replay
– MAC-addresses are not authenticated – MAC-addresses are easy to set on most cards
– Clients authenticated and screened by Radius Server – AP serves as proxy – Extensible Authentication Protocol (EAP)
Mobile Network Security - R. Molva 10
Mobile Network Security - R. Molva 11
TLS.
Mobile Network Security - R. Molva 12
Client RADIUS Access Point Association Req. Association Resp. Authentication Success Authentication using EAP Authentication using EAP Authentication Success Data Access Authorized Access Denied
Mobile Network Security - R. Molva 13
Mobile Network Security - R. Molva 14
Mobile Network Security - R. Molva 15
Mobile Network Security - R. Molva 16
header IV ciphertext data IC k 802.11 packet header
Mobile Network Security - R. Molva 17
based on (cleartext) IV used as index to an array of known keystreams if keystreams are reused.
– standards recommend, but do not require, a per-stream IV to combat this – Some PCMCIA cards reset IV to 0 each time they’re re-initialized and increment by 1, so expect reuse of low-value IVs – WEP only uses 24-bit IVs “birthday paradox”
Mobile Network Security - R. Molva 18
message: h(X) ⊕ h(Y) = h(X ⊕ Y) Modification attack: New (valid) ciphertext can be computed from existing ciphertext without the knowledge of the keystream:
C’= C ⊕ (D | h(D)) = RC4(k,v) ⊕ (M | h(M)) ⊕ (D | h(D)) = RC4(k,v) ⊕ (M ⊕ D | h(M) ⊕ h(D)) = RC4(k,v) ⊕ (M ⊕ D | h(M ⊕ D))
Mobile Network Security - R. Molva 19
attacks such as spoofing, dictionary attacks, traffic injection, route subversion can be mounted. Tools are available.
authenticated: DoS and MITM attacks still work.
Retrieve WEP keys using the attack described in "Weaknesses in the Key Scheduling Algorithm of RC4“ by Fluhrer, Mantin, and Shamir
– Airsnort http://airsnort.shmoo.com – WEPCrack http://wepcrack.sourceforge.net/
Mobile Network Security - R. Molva 20
known as WPA2)
upgrades
(TKIP)
– RC4, dynamic session keys – 48 bit IV
Authentication Protocol (EAP) types available
Mobile Network Security - R. Molva 21
Mobile Network Security - R. Molva 22
Mobile Network Security - R. Molva 23
Mobile Switching Center (MSC) Base Station (BS) Mobile Subscriber (MS) = Mobile Equipment (ME) + Subscriber Identity Module (SIM) Home Location Registry (HLR) Authentication Center (AuC) Visiting Location Registry (VLR) Wired Network HLR VLR MSC BTS BTS BTS BTS BTS BTS MSC VLR roaming Radio link MS AuC MS
Mobile Network Security - R. Molva 24
Mobile Network Security - R. Molva 25
Mobile Network Security - R. Molva 26
without communicating with the remote HLR.
MS Id (IMSI or TMSI) MS Id, VLR RAND SRES repeated with a different (RAND, SRES) for each authentication attempt
MSC/VLR HLR/AuC
Ki
wired network (trusted) radio link (vulnerable)
MS
Ki
Ki
A3
SIM Ki
A3
{(RAND, SRES, Kc)}
A8
RAND SRES Kc RAND Generation of triplets {(SRES, RAND, Kc)}
Mobile Network Security - R. Molva 27
Kc Plaintext Ciphertext Frame Number 22
114
+2
64 114
A5
128
A8
Ki 128 RAND
SIM
MSC/VLR
radio link
MS
Kc Plaintext Frame Number +2
A5
Triplets from HLR {(RAND, SRES, Kc)}
RAND
Mobile Network Security - R. Molva 28
Mobile Network Security - R. Molva 29
Mobile Network Security - R. Molva 30
22 21 18
Mobile Network Security - R. Molva 31
Mobile Network Security - R. Molva 32
Mobile Network Security - R. Molva 33
– Risk of bogus base stations
Mobile Network Security - R. Molva 34
Mobile Network Security - R. Molva 35
Mobile Network Security - R. Molva 36
Mobile Network Security - R. Molva 37
Mobile Network Security - R. Molva 38
Mobile Network Security - R. Molva 39
Authentication data request RAND, AUTN RES Mutual authentication And key agreement
VLR/SGSN HLR/AuC
K
USIM
K
{(RAND, XRES, CK, IK, AUTN)} Verify MAC, SQN Derive CK, IK, RES Verify: RES=XRES ? Start using CK, IK Start using CK, IK MS Id (IMSI or TMSI) Protected Data
Mobile Network Security - R. Molva 40
Mobile Network Security - R. Molva 41
Mobile Network Security - R. Molva 42
Mobile Network Security - R. Molva 43
NEI : mobile unit id ARN : nonce ASN : sequence number
Key exchange using Diffie-Hellman MD-IS key exchange M-ES key exchange M-ES hello Redirection request NEI, ARN, ASN Redirection confirm ARN’, ASN + 1 Verification MD-IS confirm RC4 (Ks, NEI, ARN’, ASN+1) RC4 (Ks, NEI, ARN, ASN) Ks = gyx Ks = gxy MD-IS “home” MD-IS “remote” Wired network (trusted) M-ES Radio link (vulnerable)
Mobile Network Security - R. Molva 44
Threats:
Security mechanisms like authentication and confidentiality prevent access fraud but they cannot help with subscription fraud. Solution: real-time fraud detection Principle:
Mobile Network Security - R. Molva 45
Mobile Network Security - R. Molva 46
Mobile Node (MN) - Correspondent Node (CN) Home Agent (HA) - Foreign Agent (FA) CN → MN : IP within IP tunneling between HA and FA:
MN → CN : regular IP HA FA MN CN Internet home network registration data flow
Mobile Network Security - R. Molva 47
MN registration
Solution: authentication of MN by HA
Mobile Network Security - R. Molva 48
CN → HA → MN
Difference / wired networks: MN possibly located in an untrusted remote network Solution: IPsec
Mandatory requirement: Security Association between HA and MN. End-to-end security: SA between CN and MN
MN → CN
Exposure is similar Solution: IPsec with an SA between MN and CN
Mobile Network Security - R. Molva 49
Firewall policy (usually) does not allow inbound connections from external networks. How can a remote MN connect to the home network under such policy.
Even if there is no firewall, simple packet filtering exists in most networks. Mobile IP traffic can be blocked by such filtering.
MN → CN packets may simply not get routed in Internet. Solution for all: IPsec tunneling through the firewall
Mobile Network Security - R. Molva 50
MN@ does not belong to remote network. If packet filtering is implemented problems may arise:
an illegal source address (outbound packet with an external source address).
because they have an illegal source address (inbound packet with an internal source address). Such packet filtering is due to countermeasures called anti-spoofing.
Mobile Network Security - R. Molva 51
IP Spoofing Attacks based on IP packets with bogus source address:
address in the same network as the destination; the host at the source address gets flooded by the replies to the broadcast.
use bogus source address belonging to the destination network. Anti-spoofing measures Drop packets with obvious inconsistency:
Cisco IOS anti-spoofing rules for network 192.65.32.0/24
access-list 101 deny ip 192.65.32.0 0.0.0.255 any
access-list 101 permit ip 192.65.32.0 0.0.0.255 any access-list 101 deny ip any any log
Mobile Network Security - R. Molva 52
Why MIP packets get blocked by anti-spoofing ? MN → CN1 packets blocked by the ingress anti-spoofing in router R1: access-list 101 permit ip 192.35.73.0 0.0.0.255 any access-list 101 deny ip any any log MN → CN2 packets blocked by egress anti-spoofing in router R2: access-list 101 deny ip 172.45.0.0 0.0.255.255 any MN R1 Ingress filtering Egress filtering CN1 CN2 R2 Internet 172.45.3.2 remote network 192.35.73.x 203.74.21.5 172.45.3.1 home network 172.45.x.x
Mobile Network Security - R. Molva 53
Reverse tunneling to by-pass anti-spoofing Packets originated at MN
No illegal addresses any more. Packet filtering FA MN CN1 CN2 HA Internet R1 R2 HA@ FA@ MN@ CN2@ inner IP header
Mobile Network Security - R. Molva 54
Intruders can perpetrate spoofing attacks by sending encapsulated (IPIP) packets with bogus addresses in the inner header. ⇒ No spoofing defense any more
Mobile Network Security - R. Molva 55
Direct tunnelling of data traffic by MN: IPwithinIP encapsulation between MN and CN: COA: Care of address Problem: CN must be able do de-encapsulate IPIP packets. Internet CN MN R1 CN@ COA MN@ CN@ inner IP header
Mobile Network Security - R. Molva 56
Idea:MN should enjoy the same level of connectivity and security as if it were in the secure home network. Principle: all traffic between MN and home network goes through a firewall. Problems due to filtering and addressing discrepancies are also solved. Possible approaches:
Mobile Network Security - R. Molva 57
Registration request SA Internet FW HA MN Router
remote network home network
IP Datagram between MN and FW Tunnel Mode SA IP Datagram between FW and HA IP2 ESP IP1 IP2 AH IP1 registration request registration request IP1 : src@=COA; dst@=HA@ IP2 : src@=COA; dst@=FW@ registration request IP1 COA : care of address obtained from DHCP COA ∈ remote network
Mobile Network Security - R. Molva 58
Data flow
SA Internet FW CN MN Router
remote network home network
IP Datagram between MN and FW Tunnel Mode SA IP2 ESP IP1 IP2 AH IP1 data data IP Datagram between FW and CN data IP1 IP1 : src@=MN@; dst@=CN@ IP2 : src@=COA; dst@=FW@ COA ∈ remote network MN @ ∈ home network
Mobile Network Security - R. Molva 59
security controls apply in this case.
IPsec tunnels.