Virginia Tech Wifi: Difference between revisions

Waldrep (talk | contribs)
Change root CA from GlobalSign to USERTrust
Waldrep (talk | contribs)
m Undo revision 7818 by Waldrep (talk)
Tag: Undo
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
On campus, there are 2 wireless networks. '''eduroam''' is the preferred method, which uses PEAP-MSCHAPv2 to authenticate to the RADIUS server, while the second SSID, '''VirginiaTech''', provides a captive-portal and allows for guest account creation.
On campus, there are 2 wireless networks:
* '''eduroam''': uses federated credentials and is the preferred method.
* '''VirginiaTech''': for guests and devices that cannot use the authentication method of '''eduroam'''.
Any remotely modern/complete Linux or Unix system will be able to connect to eduroam without any issues.


As of January 2015 the [https://www.computing.vt.edu/content/eduroam preferred method] of wireless access at Virginia Tech is through the [https://eduroam.org/ eduroam] network. eduroam is a secure wireless access service that was developed for the use of research and educational institutions. One of the advantages of the eduroam network is that you will be able to connect to the Internet at any participating institution using your Virginia Tech credentials. The eduroam-US site provides a [https://www.eduroam.us/technical_overview technical overview] of how the network authenticates you to the Virginia Tech RADIUS servers.
Because '''eduroam''''s credentials are federated, it means that a VT user is able to automatically connect to the Internet at participating institutions. The eduroam-US site provides a [https://www.eduroam.us/technical_overview technical overview] of the authentication system.


==General Connection Information==
==General Connection Information==
Line 34: Line 37:
''Subject:'' C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
''Subject:'' C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority


This is a common root CA and should have shipped with your OS. It is likely located in <code>/etc/ssl/certs/USERTrust_RSA_Certification_Authority.pem</code>. Note that if you follow the Authority Information Access of the intermediate certificate, it may direct you to a URL which points to a different version of this certficate, which is cross signed by AddTrust and expires in May 2020. The one in your cert store is self-signed and expires in 2038. You want the one from your cert store.
This is a common root CA and should have shipped with your OS. It is likely located in <code>/etc/ssl/certs/USERTrust_RSA_Certification_Authority.pem</code>. Note that if you follow the Authority Information Access of the intermediate certificate, it may direct you to a URL which points to a different version of this certficate, which is cross signed by AddTrust and expired in May 2020. The one in your cert store is self-signed and expires in 2038. You want the one from your cert store.


====USERTrust RSA Certification Authority====
====InCommon RSA Server CA====


''Filename:'' InCommonRSAServerCA_2.pem
''Filename:'' InCommonRSAServerCA_2.pem
Line 42: Line 45:
''Subject:'' C = US, ST = MI, L = Ann Arbor, O = Internet2, OU = InCommon, CN = InCommon RSA Server CA
''Subject:'' C = US, ST = MI, L = Ann Arbor, O = Internet2, OU = InCommon, CN = InCommon RSA Server CA


This is an intermediate certificate issued by InCommon. You can get it directly from InCommon [http://crt.usertrust.com/InCommonRSAServerCA_2.crt here].
This is an intermediate certificate issued to InCommon. You can get it directly from InCommon [http://crt.usertrust.com/InCommonRSAServerCA_2.crt here].


====eduroam.nis.vt.edu====
====eduroam.nis.vt.edu====
Line 76: Line 79:
It is recommended that you perform these steps yourself rather than trusting the certificate hash presented in the configurations below.
It is recommended that you perform these steps yourself rather than trusting the certificate hash presented in the configurations below.


'''Note:''' As we are pinning the certificate instead of relying on a PKI, when NI&S rotates the certificates being used (at least every 2 years), the configuration will need to be updated to match the new certificate.
'''Note:''' As we are pinning the certificate instead of relying on a PKI, when NI&S rotates the certificates being used (at least every year), the configuration will need to be updated to match the new certificate.
 
===Getting your network password hash===
MSCHAPv2 verifies the NT4 hash of your password, not the password itself. This means knowing the hash of the password is sufficient to connect to authenticate. Depending on the client, you may be able to store the hash in your config instead of the password. To reiterate, '''this hash is just as sensitive as your password'''. The hash is less human memorable, though, and does act as a deterrent to shoulder-surfing.
 
To derive the password hash, you can:
<pre>
printf 'YOUR-NETW-ORKP-SSWD' \
  | iconv -f ASCII -t UTF-16LE \
  | openssl dgst -md4 \
  | cut -d ' ' -f 2
</pre>
 
If you are using OpenSSL 3, you will need to specify the legacy provider:
<pre>
  | openssl dgst -md4 -provider legacy \
</pre>


===A Word of Caution===
===A Word of Caution===
Line 119: Line 138:
     phase2="auth=MSCHAPV2"
     phase2="auth=MSCHAPV2"
     anonymous_identity="anonymous@vt.edu"
     anonymous_identity="anonymous@vt.edu"
    #THIS HASH IS OUT OF DATE, PLEASE FOLLOW INSTRUCTIONS ABOVE
     # if you prefer to pin the certificate, follow the instructions above to generate a hash
     # if you prefer to pin the certificate
     ca_cert="hash://server/sha256/0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff"
     ca_cert="hash://server/sha256/216c5f2568c6e84860b12535efe93500623ccee999306b84260f951bcbd57b1a"
     # if you prefer to dynamically validate the certificate by its cryptographic attributes
     # if you prefer to dynamically validate the certificate by its cryptographic attributes
     ca_cert="/path/to/USERTrust_RSA_Certification_Authority.pem"
     ca_cert="/path/to/USERTrust_RSA_Certification_Authority.pem"
     domain_match="eduroam.nis.vt.edu"
     domain_match="eduroam.nis.vt.edu"
     identity="YourPidHere@vt.edu"
     identity="PID@vt.edu"
     password="YourNetworkPasswordHere"
     password="YOUR_NETWORK_PASSWORD"
  }
  }


Line 133: Line 151:
  $ sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/eduroam.conf
  $ sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/eduroam.conf
  $ sudo dhcpcd wlan0
  $ sudo dhcpcd wlan0
On [[OpenBSD]], the process is a little more complicated:
# ifconfig wlan0 nwid edoroam wpa wpaakms 802.1x up
# /usr/local/sbin/wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
# dhclient wlan0
# ifconfig iwm0 inet6 autoconf


Alternate config options, besides domain_match are as follows (obviously not correct):
Alternate config options, besides domain_match are as follows (obviously not correct):
Line 147: Line 158:


More thorough documentation is available at [https://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf]
More thorough documentation is available at [https://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf]
===OpenBSD Instructions===
Since the [[OpenBSD]] network stack doesn't support 802.1x authentication, wpa_supplicant is needed to connect. wpa_supplicant on OpenBSD is different from its Linux counterpart in that it is only capable of 802.1x authentication and nothing more. First, install wpa_supplicant from ports if it is not already installed. After that, add just the <code>network={ .. }</code> portion of the above configuration to <code>/etc/wpa_supplicant.conf</code>. The wpa_supplicant service can be enabled with (where iwm0 is your wireless interface):
$ rcctl enable wpa_supplicant
$ rcctl set wpa_supplicant flags -c /etc/wpa_supplicant.conf -s -D openbsd -i iwm0
$ rcctl start wpa_supplicant
Finally, connect to the network with (again, replacing iwm0 with your wireless interface):
$ ifconfig iwm0 join eduroam wpa wpaakms 802.1x up
$ dhclient iwm0
$ ifconfig iwm0 inet6 autoconf


==netctl Instructions==
==netctl Instructions==
Line 203: Line 227:
Identity = PID@vt.edu
Identity = PID@vt.edu
Passphrase = NETWORKPASSWORD
Passphrase = NETWORKPASSWORD
</pre>
==iwd Instructions==
This is a sample configuration, usually located at something like <code>/var/lib/iwd/eduroam.8021x</code>. For details, read <code>iwd.network(5)</code>.
<pre>
[Security]
EAP-Method = PEAP
EAP-Identity = anonymous@vt.edu
EAP-PEAP-CACert = embed:USERTrust_RSA_Certification_Authority
EAP-PEAP-ServerDomainMask = eduroam.nis.vt.edu
EAP-PEAP-Phase2-Method = MSCHAPV2
EAP-PEAP-Phase2-Identity = PID@vt.edu
EAP-PEAP-Phase2-Password-Hash = 8846f7eaee8fb117ad06bdd830b7586c
[@pem@USERTrust_RSA_Certification_Authority]
-----BEGIN CERTIFICATE-----
MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCB
iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl
cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV
BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAw
MjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMCVVMxEzARBgNV
BAgTCk5ldyBKZXJzZX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2/FNQwISbxmtOuowhT6KO
VWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ7l8wXEskEVX/JJpuXior7gtNn3/3
ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQEg9zKC7F4iRO/Fjs
8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM8WcR
iQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYze
Sf7dNXGiFSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZ
XHlKYC6SQK5MNyosycdiyA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/
qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9cJ2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRB
VXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGwsAvgnEzDHNb842m1R0aB
L6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gxQ+6IHdfG
jjxDah2nGN59PRbxYvnKkKj9
-----END CERTIFICATE-----
</pre>
</pre>


Line 214: Line 288:


Steps:
Steps:
* From the home screen, press the menu button and choose "Settings"→"Wireless & networks"→"Wi-Fi settings".
* Navigate to the list of Wi-Fi networks.
* Remove any existing entries for eduroam.
* "Forget" any existing entries for eduroam.
* From the "WiFi networks" listing, click on eduroam.
* From the "WiFi networks" listing, click on eduroam.
* Choose PEAP as the EAP method and MSCHAPv2 as the phase two authentication mechanism.
* Choose PEAP as the EAP method and MSCHAPv2 as the phase two authentication mechanism.
* For the CA certificate, select "Use system certificates". Optionally, import the root CA from above, and select that instead for better security.
* For the domain, enter ```eduroam.nis.vt.edu```
* Enter your pid@vt.edu for the identity
* Enter your pid@vt.edu for the identity
* Enter "anonymous@vt.edu" for the anonymous identity
* Enter "anonymous@vt.edu" for the anonymous identity
Line 223: Line 299:
* Press "Connect".
* Press "Connect".


'''TODO:''' Android certificate validation
NOTE: Older versions of Android do not allow not verifying the server certificate. Setting both the root CA and the domain are essential for protecting your credentials. Although older versions will get you connected, use at your own risk.
 
Quick and dirty options for validating the eduroam certificate, in order from least secure to most secure:
 
# Do not validate: you will get online, but consider your connection to be as secure as a public hotspot
# (Android 7.1+ only) Use system certificates: This will check to make sure the certificate chains back to some CA in the system cert store. This is significantly better than no validation, but still not very good. You may also need to specify a domain. If so, use "vt.edu"
# Download and import the USERTrust Root CA: detailed instructions to come. Since you are still not checking the CN, it is only marginally better than using system certificates.
# Use the [https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat eduroam CAT] tool: this will setup the whole wireless profile and use the correct CA and verify the CN. As such, it is the preferred method. Warning, it is ugly. If you have an existing "eduroam" profile, you will need to remove it. When it prompts for the username and password, use <YOUR-PID>@vt.edu and your network password. It relies on geolocation to prompt for the profile for the right school. You may need to go outside to get a good GPS signal. If it is able to do geo-ip (e.g., you are connected to the "VirginiaTech" SSID), it gets you close enough.


==Frequently Asked Questions==
==Frequently Asked Questions==