Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Building And Integrating Virtual Private Networks With Openswan (2006).pdf
Скачиваний:
73
Добавлен:
17.08.2013
Размер:
4.74 Mб
Скачать

Chapter 10

Another problem with the OE solution is that some servers depend on other servers in the LAN. We have discussed the dependency on the name server and DHCP server in Chapter 5, but an additional problem could occur if the /usr partition is mounted from a Network File System (NFS) server. If Openswan is installed in the default /usr or /usr/local partition, you face a Catch 22 problem.

LAN machines also tend to use DHCP, so a mechanism for updating the IPsec DNS records needs to be in place. This issue has been resolved with the WaveSEC solution that we explain in this chapter, using DNS Dynamic Updates in combination with DHCP.

Non-OE-Capable Machines

Windows machines do not yet support OE, and X.509 connections would be needed instead. This leads to the question of how to distribute the certificates. This issue has been resolved with the WaveSEC for Windows solution that is also discussed in this chapter, by using an SSL web server to generate the X.509 Certificates. The drawback is that all traffic is sent through the gateway machine.

Designing a Solution for Encrypting the LAN

In most situations, especially in a well designed network, there is no need to encrypt traffic between machines in the same LAN. Even if using wireless, which is usually designed as a separate subnet with its own restrictions, the wireless clients will want to talk to either another subnet (for example the DMZ or server network), or they will want to talk to something else out there on the Internet. These clients mostly need to encrypt the wireless traffic to the first gateway; after that, the gateway's upstream is usually a trusted wired uplink. For situations where traffic destined for a second remote office network must be encrypted, you would configure a separate VPN tunnel.

Thus, the real issue is to ensure that anyone in a wireless network encrypts the first hop to the wireless AP, and trust the network beyond that. This is the security that WaveSEC and WaveSEC for Windows offer.

Design Goals

All modern WiFi cards support various methods for securing the wireless. There is WEP, WPA, WPA2, EAP, LEAP, PEAP, Dynamic WEP, and 802.1x. The fact that all these 'secure protocols' exist really only indicates that vendors of WiFi products have completely failed to devise a truly secure solution.

Most of these protocols have either been broken, or are so overly complex that they are bound to be broken. And that is if they are even implemented correctly to begin with. Since most of these protocols are implemented on the WiFi card or chip itself, these implementations have not received the scrutiny of many cryptanalysts.

Goldberg and Borisov, two Berkeley researchers, first broke WEP when they realized that most implementations were fairly weak. WPA was designated as WEP's successor but it was soon discovered that if WPA passphrases of less than twenty characters were used, the cryptographic strength of WPA was less than that of WEP. Next, Extended Authentication Protocol (EAP) saw the light.

237

Encrypting the Local Network

EAP is very extendable, and therefore inherently complex. Cisco's LEAP got cracked to pieces, and it took Cisco nine months to develop PEAP, its successor, before it even admitted that LEAP was fundamentally broken. A whole nine months in which anyone could break into any LEAPprotected WiFi network.

Black-box (proprietary) encryption and the lack of structured protocol design such as through the IETF, coupled with the lack of source code review, reduces any WiFi chip encryption protocol to untrustworthy in our view.

A truly secure WiFi solution should be based on public standards and (open source) auditable code.

Separation of WiFi and Crypto

Another problem is the WiFi chip itself. The processing strength of most WiFi chips is not sufficient to encrypt the maximum possible throughput that such a device could support. With the need for faster WiFi access, the WiFi protocol itself also keeps on changing rapidly, causing many interoperability problems. For every new WiFi protocol, the encryption layer must be adapted.

Ideally, the encryption and WiFi operations should be separate.

Link Layer Protection

Some WiFi protection mechanisms are meant to keep unauthorized people out of the network. This requires some arrangement beforehand, such as handing over a WEP key or WPA authorization. EAP is based on other credentials, such as the SIM card, or a RADIUS back end. All these methods are meant to protect the link layer. But the link layer here is just a bunch of frequencies anyone can get on to—if there are no cryptographically signed beacons in the WiFi protocols, such protection is a farce, since we have no way of distinguishing between an official and a rogue Access Point. A rogue AP can, for instance, attack the wireless network by continuously sending 'disassociate' commands on the network, so all clients will leave this wireless segment in search of another one. Those clients then find the, usually weaker, WiFi network that is under the control of the attacker. In that network the attacker plays a man-in-the- middle attack on all IP addresses the clients are trying to communicate with, in an attempt to obtain their credentials.

On top of that, neither the DHCP nor the ARP protocol offers any cryptographic security, so a client cannot detect the difference between an official and a rogue DHCP server, or the difference between a real or forged ARP reply. The ARP case is further complicated by proxy-ARP scenarios, which are quite common and involve a gateway machine sending out ARP replies on behalf of another (usually dial-up or VPN) machine.

238

Chapter 10

Do not attempt to protect the link layer at this point in time, but instead implement authentication and encryption in the TCP/IP layer. Once the link layer protocols are protected by cryptography, such protection can and should be used to protect the link layer as well.

Furthermore, we are not only interested in protecting machines within our wireless segment, we are also interested in protecting the privacy of roaming users. That is, users we have had no previous contact or arrangement with. One can think here of WiFi hotspots. The customer associates with the network, passes some credentials or monetary verification, and is then allowed to use the network for a certain amount of time. It is important to offer encryption and privacy to clients we have no pre-existing agreement with.

The Logical Choice: IPsec

So far, we have concluded that we need a security protocol on the TCP/IP layer. This means we can look at solutions from before the time that there was even such a thing as wireless networking. One popular solution is VPNs based on SSL, but the problem with SSL of course is that it uses a TCP connection. An attacker can send a single spoofed TCP-RST packet to kill an SSL-based VPN tunnel. Another popular solution is OpenVPN, which provides a relatively easy to set up and use UDP-based VPN. However, OpenVPN clients are only available for a limited number of operating systems. It also needs pre-arrangement; you need to know each others' SSL credentials. OpenVPN has also been exposed to much less scrutiny from the crypto research community. Other alternatives used are stunnel (SSL wrapping) or CIPE. The CIPE protocol has turned out to be fundamentally flawed, and should not be used at all. Stunnel solutions suffer from the TCPRST flag issue already mentioned.

The problem of all of these solutions is that they are created by individuals to solve a problem. But the problem has already been solved, and by a much larger group of very knowledgeable people needing military-grade encryption. The solution is called IPsec. IPsec uses well known, much researched algorithms and protocols, and open-source implementations have successfully been through software audits by universities or other specialists. IPsec is also not vulnerable to forged TCP-RST packets, since it does not use TCP at all.

Furthermore, IPsec has been deployed for years and is supported by many vendors, including all end-user operating systems. It is also not encumbered by any software patents or licensing issues.

Hotspot

We want to support a hotspot-style network where anyone on the wireless network is protected, after presenting some form of valid credentials (credit card, scratch card, or username and password). The first thing we need to do is to open the link layer, and allow clients to associate and get an IP address and DNS server through DHCP.

Note that we cannot protect the user from associating with a forged AP pretending to be our hotspot AP. AP beacons need to be cryptographically signed. Some OpenBSD people are working on an AP driver that supports this.

239