Vulnerabilities in Eduroam
Vulnerabilities in Eduroam
Vulnerabilities in Eduroam
in Eduroam
the authenticator first queries the identity with an EAP Re- Figure 3: Sample EAP-TTLS Authentication Pro-
quest: Identity and concludes with an EAP Success or EAP cess
Failure, depending on the authentication result [5].
EAP was designed to run within the point-to-point pro-
Access Point (AP) / Authentication
tocol (PPP). In order to operate in a LAN environment, Client (Authenticator) Server
like Ethernet or IEEE 802.11, EAP data is encapsulated Phase 1: Handshake Phase
1
between client and AP using EAP over LAN (EAPOL) as EAP Request: Identity
carrier protocol [17]. Prior to forwarding it to the AS, which
implements the authentication method, the AP decapsulates EAP Response: Identity
Carrier Protocol (CP): Identity
the EAP data and encapsulates it using RADIUS as carrier
protocol, which is the designated authentication protocol in CP: PEAP Start
EAP Request: PEAP Start
Eduroam [30]. The communication between components in
802.1X, as well as the protocol encapsulation, are depicted TLS-Handshake, including Server Certificate
in Figure 2.
Because the tunneled authentication methods used in Edu- Phase 2: Data Phase
2
roam rely on Transport Layer Security (TLS) as secure tun- Executing full inner EAP method:
nel, EAP packets also encapsulate the TLS records, which TLS tunnel
EAP Request / Response: Identity
hold the inner authentication data in form of an EAP method
or a different authentication method. In Eduroam basically EAP Request / Response
every EAP-compatible authentication method that fulfills EAP Request: Success / Failure indication
the Eduroam service definition can be used [30].
EAP Response: Success / Failure indication
(Success, Authenticator Response RA) 3 (a) The wireless network of the victims uses WPA(2)-Enter-
4 RA =
/ Failure f(CA,CP,User,Pwd,RP) prise for authentication and accepts the widely used
compute RAcheck methods EAP-TTLS/PAP, EAP-TTLS/ MS-CHAPv2,
RAcheck = RA ?
or PEAP/MS-CHAPv2 for authentication.
Figure 5: MSCHAPv2 Authentication Process (b) The client has saved the target network in its known
network list, e. g., due to prior connections, thus having
configured an authentication method accepted by the
MS-CHAPv2 network.
The Microsoft Challenge-Handshake Authentication Proto- (c) The client connects to the wireless network AP with the
col Version 2 (MS-CHAPv2) is a challenge-response authen- highest signal strength while roaming. It also recognizes
tication protocol. MS-CHAPv2 extends MS-CHAP [36] and already known enterprise networks solely by their broad-
was designed to provide mutual authentication of authenti- casted SSID and automatically connects when a known
cator and peer. The detailed authentication process is de- network is in range. Note that this is the common de-
picted in Figure 5 and described as follows [35]: fault behavior on many devices.
1. The authenticator chooses a random 16-octet long au-
thenticator challenge CA and sends it to the peer. (d) At least one of the following certificate prerequisites is
2. Upon reception, the peer chooses a CP analogous to fulfilled:
CA and computes the 24-octet long Response RP —
also called NT-Response—as 1. The client does not check the CN (common name)
string of the offered certificate, thus lacking a valida-
RP = ChallengeResponse(CHash, MD4(P W )), (1) tion of the server name. As shown in [3], client de-
vices with such a deficient certificate validation are
where Android, Mac OS and iOS devices, unless the Apple
• P W is the user’s password devices are configured by installing a configuration
• CHash = trunc[0..7](SHA1(CP ||CA ||U serN ame)) profile.
2. The client has an insufficient device configuration in
• trunc[0..7] truncates the SHA1 digest to the first
which the CA of the network is not setup. Thus the
8 octets
client does not validate the certificate chain during
• ChallengeResponse(·) provides DES encryption the handshake phase of the authentication process
and sends CP ||RP to the authenticator as Peer Re- and accepts an arbitrarily offered certificate. Our
sponse. practical study later in this paper (Sec. 5) demon-
3. The authenticator computes RP check and compares it strates on a large number of devices that this case is
to the received RP . If RP = RP check , the authentica- not uncommon.
tor answers with the Authenticator Response
3.2 Attacker Model
RA = SHA1(D||CHash||M 2), (2) Our assumptions about the capabilities of the attacker
are:
where
• D = SHA1(MD4(MD4(P assword))||RP ||M 1) • The attacker is able to communicate with the victim
and the target network over the wireless channel. Also
• M 1 and M 2 are ”magic constants” specifically de- she is able to capture and modify forwarded network
fined for response generation traffic using appropriate software, e. g., sslstrip [23].
4. The peer verifies the Authenticator Response and ter-
minates the connection if RAcheck 6= RA , otherwise it • The attacker is able set up an own network AP with a
continues. signal strength higher than the signal strength of the
The security of MS-CHAPv2 was thoroughly analysed in the target network.
past [25], pointing out its design flaws. In 2012 the complex- • The attacker is able to forward network traffic to a
ity of the protocol was greatly reduced, making brute-force valid network AP and set up an own DHCP-server.
attacks feasible [22]. Nevertheless, MS-CHAPv2 is still used
as inner authentication method in tunneled authentication • The attacker is able to gain a valid signed certificate
protocols such as EAP-TTLS or PEAPv0, which are being with an arbitrary CN string by one of the CAs which
used in Eduroam and enterprise networks. has the same top-level authority as the Eduroam RA-
DIUS server certificate.
3. SYSTEM AND ATTACKER MODEL Note that in the case of Eduroam, usually one top-level
In this section, we present our assumptions about the net- CA is used for the whole infrastructure of a country. This
work, the victim and his client device, as well as the capa- means when an attacker is able to get a certificate signed
bilities of an attacker. by this top-level CA, she is able to attack every client that
uses the Eduroam infrastructure of that country. For ex- 4.2 Malicious AP Setup
ample, some universities offer free signed server certificates For the attack a modified version of the open source soft-
within their domain namespace (which uses the Eduroam ware AP hostapd [20] is used. The hostapd version is ex-
top-level CA) with the only restriction that an ID card has ecuted on a Linux machine with a Xubuntu 13.10 AMD64
to be shown. This service creates a large set of certificates an operating system equipped with two wireless NICs: One
attacker may possibly leverage (with or without social engi- used by hostapd1 , and one for connecting with the target
neering techniques). Also signed but revoked certificates can network. The wireless NIC used by hostapd is a TP-Link
be used by an attacker because the clients are not designed TL-WN7722N. Additionally an own DHCP server is set up
to check a certificate revocation list. to route victims into the target network.
As part of the attack, the following modifications are made
4. ATTACK DESCRIPTION to hostapd:
Our attack uses a modified version of the software AP
hostapd [20] to capture user login data and successfully au- 1. Modify user database access to accept every identity
thenticate users without possessing the users’ authentication in order to capture login data.
data.
2. Disable verification of authentication data in the in-
In the following, we describe the general approach of the
voked EAP methods of hostapd to authenticate the
attack, the setup and necessary modifications to hostapd,
user on the malicious AP.
and the technical characteristics of the used exploit.
4.1 Goals and Approach Additionally, hostapd is extended by a custom logger, which
logs MAC-addresses and user credentials for cracking them
The attack pursuits two main goals, which are to be ac- later (a number of credential crackers exist, e. g., Cloud-
complished subsequently: Cracker [22] or Asleap [31]).
1. Capture login data in order to gain network access and Modifying database access. Database access modifica-
access to other services. tions are required to capture user authentication data while
using inner MS-CHAPv2, since the MS-CHAPv2 implemen-
2. Authenticate the user on the malicious AP in order
tation in EAP-TTLS does not process challenge values when
to perform a MITM-attack and gain control over his
no match is found for the victim in the user database and
network traffic.
aborts in PEAP after the identity request. Therefore it is
Capture Login Data. In order to achieve the first goal, necessary that hostapd accepts arbitrary user identities in
the attacker configures a malicious AP to mimic a valid the data phase.
Eduroam access point by setting up the same SSID, cre- During runtime, user database entries are stored in host-
ating a server certificate with an arbitrary CN string, and apd as elements inside a linked list. To accept arbitrary
getting it signed by one of the valid CAs which have the same identities, a dummy user entry is introduced, serving as a
top-level authority as the RADIUS server certificate. The placeholder for an arbitrary data phase identity. The func-
last one turns out to generally not cause problems because tion returning user entries from the list is modified by insert-
a common used certificate infrastructure for the Eduroam ing a conditional break statement, so that it always returns
network is to have a large CA as a top level authority (for the dummy user entry when a data phase user is queried.
Germany the Deutsche Telekom Root CA 2 ). The top level Disabling verification. Disabling authentication data
authority commonly signs multiple intermediate CAs which verification inside the EAP methods serves the purpose of
often offer certificate signing services for server certificates. successfully finishing user authentication in EAP-TTLS by
Client devices fulfilling the prerequisites from Section 3.1, making hostapd accept every submitted user password value
especially prerequisite d), will connect to the attacker’s AP in EAP-TTLS/PAP and EAP-TTLS/MS-CHAPv2.
and successfully finish the handshake phase because each In PAP, verification of authentication data is a simple
communicating party in TLS is responsible for validating comparison of submitted username and password to the val-
certificates [13]. ues stored in database. Disabling the comparison to always
The attacker thus exploits insufficient information check- return true enables the attacker to authenticate users in
ing, stemming from erroneous or misconfigured user clients. EAP-TTLS/PAP.
This enables the attacker to capture username and pass- In MS-CHAPv2, hostapd has to accept the received NT-
word for the inner PAP authentication or for user identity, Response as valid by disabling the comparison with RP check
authenticator challenge, and peer response when using inner in order to successfully authenticate unknown users (see Fig-
MS-CHAPv2 authentication (see Section 2.2). ure 5). Additionally the subsequent state of the inner au-
Authenticate Users. The second goal aims at devices thentication is changed to success to omit computation of
that use wpa supplicant [21] as supplicant software and have the authenticator response, submit a success message, and
configured EAP-TTLS as authentication method (prerequi- thus exploit the eap_workaround setting. In the following
site a). section, we describe the technical characteristics and the im-
The attacker exploits the eap_workaround compatibility pact of the exploit.
setting of wpa supplicant to successfully authenticate the
victim at his malicious AP. The attacker can now act as a 4.3 Exploit Characteristics
MITM, providing network access by routing the victim over Handling of EAP is implemented as state machine (SM)
the malicious AP into the target network. For this purpose, similarly to [29] on hostapd and wpa supplicant, with inner
the attacker can use either own authentication data if he authentication running as a SM on top of each EAP SM.
has access to the target network or some other users’ data
1
captured in step 1 (capture login data). The wireless NIC must support AP-mode.
EAP: PROPOSE_METHOD START
Previous
SUCCESS EAP state
EAP: METHOD_REQUEST
PHASE1
- establishes TLS tunnel
SEND_RESPONSE
IDLE
- waits for requests - passes data to lower
EAP: METHOD_RESPONSE layer for sending
Exploit State
PHASE2_START when PAP:
Transition
- validates user data
SUCCESS
when MSCHAPv2: Exploit: skip state Regular flow in
- builds Authenticator Response RECEIVED MS-CHAPv2:
METHOD
EAP: METHOD_REQUEST - parses received request
- checks EAP method state - processes EAP method data
PHASE2_MSCHAPV2_RESP - saves EAP method state
- decides if:
continue, success - builds responses
EAP: METHOD_RESPONSE - checks, if peer accepted
Authenticator Response or failure
Figure 6: State flow for inner TTLS authentication Figure 7: State flow for inner TTLS authentication
on the server side. The dashed arrow indicates state with exploit on the client side. The dashed arrow in-
skip in EAP-TTLS/MS-CHAPv2 used for the ex- dicates state transition triggered by a received EAP
ploit. success after omitting the Authenticator Response
in EAP-TTLS/MS-CHAPv2.
5. PRACTICAL STUDY
To find out how many devices in the field would be af- The logged data consists of timestamp, user identity, and
fected by insufficient device configurations, a practical study MAC address, enabling clear identification of participants.
on an educational event in cooperation with the IT-Centre In order to distinguish correctly and wrongly configured
of the Ruhr-University Bochum was carried out. At this clients, client classification based on stages reached in the
event, client device configurations were scanned remotely authentication process was achieved by tracking the EAP
while providing information about a proper device configu- SM state flow in hostapd (see Section 4.3). A device is
ration to members of the university and giving the chance to vulnerable and considered wrongly configured once the TLS
improve it. This section describes the setup of the practical connection is established and the phase 2 identity is success-
study and its results. ful queried. When the anonymous identity was successfully
queried and the peer rejected the presented server certificate,
5.1 Setup then the device is considered as configured correctly.
For the practical study, a modified version of hostapd was If the anonymous identity indicates an user from a foreign
used to remotely validate client device configuration, tar- institution, then it is considered invalid and the correspond-
geting members of the university. It was set up to mimic ing client will be ignored and rejected before starting the
a valid Eduroam access point in a room that was largely TLS handshake.
isolated from other wireless networks to avoid interference To prevent multiple user entries due to connection reat-
with the Eduroam network and users not informed about tempts after rejection, a check was introduced if an entry
the event. The group of participants consisted of volunteers already existed in the SQLite database. If so, merely the
who were invited to check their device configuration follow- timestamps were updated. The logged data was evaluated
ing a university-wide announcement. The entire event was in anonymised form.
conducted by the members of the university’s IT-Centre.
Affected users were displayed in anonymised form on a large 5.2 Results
screen and direct configuration help was offered at the event. The results of the practical study are presented in Table 2.
In technical terms, the used hostapd version was modified They are based on data collected during the one-time edu-
as follows: cational event in a time period of approximately 3.5 hours,
mid-day, during the semester. There was no selection of user
• It filters the domain suffix for @realm.tld (domain of
devices, every provided device was accepted.
the university) or missing domain suffix and hence ad-
The event took place roughly five months after the in-
dresses only members of the university.
structions for the correct configuration of devices for using
• It rejects every connection attempt and does not log Eduroam were updated on the website of the IT-center and
key material and passwords. leaflets on this topic had been distributed to students and
staff (regarding the use of MS-CHAPv2 instead of PAP and
• It detects usage of PAP as inner authentication method. the correct installation of the root of trust for the certificate
chain).
• It logs data in an SQLite database and distinguishes
Since Apple devices turned out to be also affected in case
between correctly and wrongly configured devices.
EAP-TTLS/MS-CHAPv2 is used, their share on the total
4
Filed as issue 74244 in the Android bugtracker. numbers is additionally listed in Table 2. They could be
identified based on the vendor part of the HW-address since
Apple is one of few hardware manufacturers that uses an Table 3: Effectiveness of Countermeasure Combina-
registered MAC address space for their devices. tions. Effectiveness is divided into: ”4”: Prevents
The total amount of devices was determined by the total attack entirely; ””: Only increases difficulty; ”5”:
count of different MAC addresses. From a total of 507 de- Does not prevent attack.
vices, 52 % devices were vulnerable. A total 20 % of the vul- C1 C2 C3 I1 I2
nerable devices used PAP as inner authentication method
and thus were leaking authentication data in unencrypted C1 5 4 4
form. C2 4 5 5
C3 5 5
6. DISCUSSION & COUNTERMEASURES
Our study showed that the majority of the users of the I1 4 5 5 5
Eduroam network are vulnerable to our attack. I2
In the following, we discuss the results of our study and
propose countermeasures to prevent the presented attack.