@import url("http://www.blogger.com/css/blog_controls.css"); @import url("http://www.blogger.com/dyn-css/authorization.css?blogID=8706105"); Hardik Shah - Trying to be with the Technology
Networks

Saturday, December 11, 2004

Securing Wireless Networks

Abhishek Kant, had recently visited Pune. We were discussin about WiFi Security. He said he was lookin forward to session on those.. So here is my blog dedicated to Abhishek

IEEE 802.11b, also known as the "Wi-Fi Standard," is an 11-megabit Ethernet-compatible, wireless network technology (http://standards.ieee.org/getieee802/). Early on, its developers acknowledged security issues with Wi-Fi and came up with Wired Equivalency Privacy (WEP) to make wireless LANs as secure as wired ones. WEP, however, is not without its problems. Through passive and active attacks, for instance, WEP can allow unauthorized use of wireless networks and real-time decryption of traffic on wireless networks. This presents a threat, especially in metropolitan areas with dense proliferation of wireless networks.

It comes as no surprise that there are a number of available techniques to exploit WEP's deficiencies. On the upside, however, these same techniques also let you test wireless networks. One such technique for securing wireless networks using a combination of hardware and the Free Secure Wide Area Network (FreeS/WAN), a freely available IPsec implementation for Linux that integrates with the IPsec functionality built into Windows
(http://www.freeswan.org/).

This technique lets you completely disable WEP (which you should for performance reasons anyway), so that all packets transmitted over the wireless network are encrypted using the secure IPsec protocol (http://www.ietf.org/rfc/rfc2401.txt). IPsec is a protocol for securing IP traffic at a low level—layer 3 of the OSI network model (http://www.netc.org/network_guide/c.html). IPsec is required in IPv6 (the new version of the TCP/IP Standard) and optional in IPv4 (the current Standard on which the Internet runs).

All this underscores an important point: The wireless access point is the wrong place to secure the wireless network. Not only do algorithmic flaws make WEP ineffective, but the concept itself is lacking. When you can have someone (potentially) miles away examining your network packets, there is no possibility of "wired equivalency." The solution to such problems is to assume that wireless traffic is inherently insecure, then use tried-and-true techniques for securing these insecure networks.


Because IPsec operates at a low level in the protocol stack, it can protect almost any type of traffic that has IP at its base—basically all the traffic on the Internet. Strong higher layer security protocols (such as SSH and SSL) require special configurations or applications that explicitly support them. The Opera browser, for instance, does not explicitly support IPsec. However, if an IPsec connection has been established, all traffic generated by the Opera browser traveling on that connection would automatically be encrypted.


The IPsec Standard has three protocols:

  1. Internet Key Exchange (IKE) negotiates connections and is responsible for exchanging keys.
  2. Authentication Header (AH) provides packet-level authentication once a secure connection has been established.
  3. Encapsulating Security Payload (ESP) is used for encryption/authentication.

FreeS/WAN implements IPsec through: KLIPS (kernel IPsec), which handles AH and ESP within the kernel; Pluto, which handles IKE; and various scripts to administer the system. FreeS/WAN extends the IPsec Standard to include an operational mode called "opportunistic encryption," in which all traffic between two gateways is automatically and seamlessly encrypted. One of the goals of the FreeS/WAN project is to have this extension integrated into the Standard. Opportunistic encryption uses public keys embedded in DNS records to automatically enable IPsec connections.


Technically speaking, two machines involved in an IPsec negotiation are both client and server at different stages of the connection. In terms of FreeS/WAN, a client is a machine that wants to establish a secure connection, while a security gateway is one to which the client connects. Both the client and the security gateway run the same software and have similar configurations.

Once you've installed FreeS/WAN (per the documentation), you need to configure it. Setting up an IPsec tunnel between two machines requires that they authenticate to each other. By default, FreeS/WAN uses public-key authentication with RSA. FreeS/WAN supports other authentication methods, including X.509 certificates with a patch.

Machines that want to establish IPsec connections must have each other's public keys. The client machine uses the security gateway's public key for authentication and the security gateway uses the client's public key for authentication. Ordinarily, key exchange is tricky when establishing secure communications between machines. In this case, it is more straightforward because everything is happening locally. If you're paranoid, put the public keys on floppy disks and walk them between the machines.

The client and security gateway machines need to have key pairs generated and exchange public keys. To generate a key pair from scratch, issue the command (on each machine): ipsec newhostkey --output /etc/ipsec.secrets. Be careful when using this command; if an ipsec.secrets file already exists, it appends another set of keys that causes confusion with other IPsec commands. (The documentation shows the command differently: ipsec newhostkey > /etc/ipsec.secrets. This is an older style of the command line and doesn't work with the recent versions.)

Next, extract and exchange the public key on each machine. When establishing an IPsec connection, FreeS/WAN needs to know which participant is left and which is right. The choice is arbitrary, but must be configured consistently. To extract the public key for the security gateway, execute ipsec showhostkey --right > SecGW.txt on the security gateway machine. To extract the public key for the client, execute ipsec showhostkey --left > Client.txt on the client machine

All traffic between individual nodes is encrypted using the IPsec protocol. Only authorized machines can establish IPsec connections because a client and security gateway need each other's public keys in their configuration files.

2 Comments:

Blogger abhishekkant said...

Thanks for dedicating the blog...

yes WEP solves the problem of unauthorised access to large degree.. but the problem remains that the password is static for encryption/decryption in WEP..

I am not sure though that IPSec is an answer... IPSec works at a very low level on the OSI Stack.. it will not prevent any unauthorised access to Wireless networks.. in fact there is no need to change anything on the wireless stack if you want to use the IPSec..

i have come across 2 ways of preventing the unauthorised access:
1. Lock the access to the wireless network based on the MAC address
2. Use the WPA protocol developed by MS that changes password randomly on the wire.

5:52 AM  
Blogger Ritesh said...

Although I dont know much about IPSec, but it seems like a solution to "all" security issues that happen in data transmission, be it wired or wireless, shared or unshared. Just like SSL.

But a MAC layer solution (like WEP or WPA) is a must for wireless networks as they serve another functionality of restricting network access to only valid parties (who have the WPA/WEP keys). If there is no wireless security, then anyone can join your network and consume precious bandwidth (by talking to non-IPSec hosts).

I dont think WEP is fundametally flawed. The flaw was in its implementation. WPA has emerged as a good option and should continue to be so for a long time.

Nice blog! Finally I found a blog with same "research interests" as mine!

2:44 PM  

Post a Comment

Links to this post:

Create a Link

<< Home

Google
 
Web hardiks.blogspot.com