Reference models - Wireless local area networks

Advantages and drawbacks of the usage of WLAN

Main reason of the prevalence of wireless networks is, that they have more advantageous characteristics that make WLAN networks more usable compared to wired networks. The most important advantageous aspects:

Wireless networks cannot be used in many cases because of features of technology. The most important drawbacks are the following:

Explanation of frequently used concepts

SS - Service Set - set of devices, which connected to a given specific wireless local area network.

SSID - Service Set Identifier - a name identifying the wireless network. If we do not a forbid it, then the AP will announce the SSID in broadcast messages. According to it a station can access to the network automatically (after a preliminary configuration), or manually. SSID is a 32-octet long bit series. Vendors usually sell WLAN routers with an SSID referring to the vendor, but of course, users can change them.

BSS - Basic Service Set - set of stations, which are able to communicate with each other. In the Infrastructure mode it is a set of the AP and stations (STAs) served by it (do not confuse it with the field covered by the AP.) In fact, it is the basic building element of WLAN networks. There are two types of the BSS: Independent BSS (IBSS) and Infrastructure BSS.

BSSID - Basic service Set Identifier - BSS is identified with BSSID, which is the MAC address of the access point in case of all Infrastucture BSSs. In case of IBSS there is no AP, the station initiating IBSS gives a random MAC address, which is used after that, as a BSSID.

ESS - Extended Service Set - set of connected BSSs and integrated LANs, that seems to be one BSS for the LLC layers of a station belonging to any BSSs.

Network architectures

Basic building elements of wireless networks are the wireless stations and the access points. According to their usage method (or their existence) the most prevalent operation mode of wireless networks (we can call it network architecture) are the ad-hoc mode and the infrastructural mode. In the previous one the wireless nodes communicate with each other directly, while in the latter case all communications go through the access point (or base station), and the base station accesses to the wired Internet network. If the access point did not have any Internet connections, then the name of the operation mode is base station. If in the case of ad-hoc mode the stations are not fixed, then we call them mobile ad-hoc networks (MANET - Mobile Ad Hoc Network).

The "monitor mode" is a special case of the communication. In this case station passively intercepts all communications of a given channel. This mode is perfect for the analysis of the network traffic and observation. This type of traffic analysis allows the deciphering of an incidentally encrypted communication. We must know, that WLAN interface of devices at our homes does not operate this way, basically forwards only messages addressed to him to the upper layers, but the applications, which can bypass it, are accessible for all the informatic platforms. (Like the wired network cards, and, for example, the Wireshark program.)

Architectural problems

These problems are in connection with the access to a public medium. The question is, how we can solve, that the radio signals of the stations will not cause any interferences, because addressees do not understand the transmission. We should take into consideration that stations have a radio range, and not all the stations fall into the range of all the other stations. The following figure helps the understanding of problems.

There are two kinds of solutions for access of the common radio medium: a centred and a distributied one, which may sometimes operate at the same time:

  1. Primary access method is the DCF (Distributed Coordination Function), which is the member of the CSMA/CA protocol family (Carrier Sense Multiple Access with Collision Avoidance - One of the CSMA typed processes. It is used in cases, when the CSMA/CD cannot be used, for example, in case of wireless networks.). CSMA/CA protocol uses the random backoff method in order to reduce the possibility of collisions. In case of DFC the random backoff time is uniformly distributed over discrete time intervalls, where the maximum extension of uniform domain is called Contention Window (CW). Lack of acknowledgement frame means unsuccessful frame sending, and in this case value of CW duplicates. With growing of number of competitive stations the exponential backoff mechanism reduces the number of collisions. DFC protocol uses two control frames, the RTS (Request To Send) frame, with the help of that it asks for a potential sending permission from the receiver, and the CTS (Clear To Send) frame, with that the receiver answers for the ask of the sender RTS. At the same time the RTS frame indicates for the other senders, that they should not initiate any sendings for the time of NAV (Net Allocation Vector) (IEEE 802.11 RTS/CTS exchange). This RTS/CTS signal system results an overhead, and the MAC protocol does not use it in case of transmission of small frames, because probability of collision is small in case of small frames.
  2. AP may have a PCF (Point Coordination Function), which helps to control the priority of the access to the medium, and may provide time-sensitive services this way. In the PCF PIFS (PCF Inter-Frame Spacing) time interval it sends a beacon frame, with that all the stations are informed in the cell, that they should not initiate any sendigns till CFP (Contention-Free Period) time. After that it can provide an access without any competitions with the AP polling method for the given stations. According to the load of the system, size of the CFP interval may change within each CFP repeated interval. PCF stations in cells besides each other have to use different channels, otherwise there can collisions be occurred

Security of WLAN networks

It is important to know, that without protection anybody can hear the radio transmissions, who has a wireless receiver within the transmission range of the aerial. We can rank the security possibilities from the weakest to the strongest:

Wired Equivalent Privacy

WEP (Wired Equivalent Privacy) was developed to provide a wired equivalent safety in case of wireless networks, too. Since LANs are not saved with any encryptions in basic case, thus it was simple to provide such a safety. With the help of WEP data can be encrypted, that in case of interception nobody could gain any information from the data. Besides, user is authenticated before connecting to the network, and only then can he/she decrypt the encrypted data. WEP protocol is built on the RC4 encryption algorithm, which uses a key of 40 or 104 bits, combined with a 24-bit initializing vector (IV). RC4 is a frequently used method for encryption, which operates like this: there is a random series of bytes generated from an encrypted key and a random number, that XOR-es with the bytes of the message. Thus an M message and the control sum (ICV - Integrity check value) are encrypted on the following way:

C = [ M || ICV(M) ] XOR [ RC4(K || IV) ]

There are 40-bit key according to the standard, but the today's hardwares practically all support the 104-bit version. It is easy to understand from this, that the IV is a very important part of the encryption. We can achieve with the help of this, that the RC4 algorihtm could use different encryption keys in each and every occasion.

The RC4 algorithm

RC4 algorithm was developed in 1987 by Ronald Lorin Rivest. During the RC4 coding parties agree in a common secret key. Data encapsulated in the 802.11 frame is coded With the help of this key, and the initializing vector (IV) generated from it according to the figure shown below:

It would be too dangerous, if the algorithm used only the previously determined common key during the encryption, thus we change it with attaching a random value. This random value is calculated from the IV and the WEP key for the determination of the random key flow. Dependently from the implementation of RC4, the size of IV may have different, and in case of WEP it has a 24-bit size. Method of changing of IV is not determined by a standard, it starts from 0 usually in every implementation, and it grows one by one. There are also implementations, which do not change it, degrading the power of RC4 algorithm with it. That is why there is no need for the randomness of IV, because the WEP key, the IV and the key flow generator can ensure together, that different keys could be generated to each and every message. Value of IV changes continuously, but the receiving partner needs the value of IV for decoding the message, thus we attach the IV to the encrypted message without any encryptions. During this process IV is prepared to every frame with the help of the secret key known by partners, on the basis of an initial status block. Partner receiving the coded frame also knows the initial block, so he can decode data from it and using the attached IV. Receiving partner can examine the integrity of the transmitted frame with a control sum prepared with a CRC32 process, which was transmitted with an encryption, too. If the user's own calculated sum does not the same, as the received one, then he/she throws the bundle of data away, and indicates, that the packet got perhaps injured en route.

WEP packet

WEP packet consists of transformation of data of the network layer for the data connection layer, which comprises the encryption, the control of integrity, the incidental fragmentation, and attachment of a header. General model of a WEP packet is shown on the following figure.

Explanation of fields:

PAD - it has a 6-bit size, and its value depends on the Key ID

Key ID - it has a 2-bit size, and it gives the succession of WEP key, if there are more WEP keys used for encryption during the communication

Data és ICV - these are the only encrypted data in the packet

WEP authentication and ciphering

WEP has to find solutions for 2 security problems. One of them is the authentication, and the other one is ciphering. Authentication is made by a challenge-answer based protocol, which consists of 4 messages:

  1. Client indicates an authenticate request.
  2. AP generates a random number, and sends it as a challenge to the client (authenticate challenge) .
  3. Client encrypts the challenge (random number) with a key, which is known by both of them, and sends the result back to the AP.
  4. If AP decoded the message successfully, it means, that client really knows the appropriate key, and it sends an authenticate success (or a "failure" in case of an error) message to the client

When the authentication was made, AP and the client communicate with each other with encoded (encrypted) messages. They use the same key for encoding the messages, as for the authentication, and the algorithm is the RC4 key flow encoder. Client can be in 3 different states before the connection, and in the connection. Individual states, and state diagram of the transitions are demonstrated on the following figure:

Client can communicate in the given network, if it accomplished successfully both the authentication and the association.

Lacks of WEP

Examining the WEP process there could be mentioned the following incompletenesses:

Attacks against WEP

RC4 has several weak points, which are easy to attack. In case of one of the attacking methods attackers apply a simple process with numeric characters. IV has only 24 bits, thus there are permutations with fixed numbers can be used by RC4 to the IV. There are 16 777 216 mathematically existing possible IV-combinations. In this case some minutes, or some hours need for breaking the code, depending on the activity of the client. Number of the possible IVs is finite, which means, that RC4 is forced to apply the same characters for a given IV. So the attacker may recognizer the repeated IVs after a time. In case of enough data he/she can determine the applied WEP-key, but he/she must record not only 224 packets, but the multiplication of it.

Another attacking method is on the basis of that there are known weak IVs. It derives from the nature of RC4. RC4 algorithm operates with some of the characters simply better, than with other characters. Weak 24-bit characters derive from this, but in spite of this they are used, too. If they use these weak characters, then the attacker can filter the intercepted data through some algorithms, and thus he/she is able to determine the part of the WEP-key. One of the known implementations of this process requires 10-15 million packets for the decoding of the WEP- key.

David Wagner, professor of the University of Berkeley has already learnt in 1995 the statistical weaknesses of the RC4 encryption algorithm, but his publication wasn not get a properly great attention. It is one of the reasons, that the IEEE used the RC4 algorithm for the encryption of the 802.11 standard in 1995. The very first publication, which concretely pointed on the unproper implementation of the RC4 algorithm, was a mutual work of Fluhrer, Mantin and Shamir, which became famous under the name of FMS statistical method (the abbreviation is from the first letters of the names of the authors). After a few months of the appearance of FMS the first practical implementations were ready for decoding of the WEP-keys. Their essence, that the original data content of the encrypted message is known, because IP and ARP-based communications realize most of the general network traffics, which start uniquely with the RFC1042 SNAP header, and the first byte of it has a mandatory "0xAA" value.

One of the improved solutions of FMS is the KOREK method that has got its name from its developer, but also known under the name of "chopper". It has improved the efficiency of the method with 60-70 %, and reduced the number of the necessary IVs.

There are another 2 methods for decoding the WEP key, but neither of them is really efficient and realiable. One of them is the Brute force attack, which tries to use all existing keys one after the other. It can be calculates easily, that at a 64-bit coding the size of the key is 40 bits, so there is 240 possible key altogether. If we see 100 000 key by seconds, then we would need 127 days to find the proper key. In case of a 104-bit key this value would be 6520836420927105974 years.

Another one is the dictionary-based attack, which exploits, that users usually use simple words, or their combinations, as a key word. If we have a good dictionary with the proper amounts of the possible words, and user uses a key containing meaningful words, then we will presumably find it. The problem is, that we cannot be sure, that the method will find the key, because most of the users are fully aware of weakness of the simple key words.

Wi-Fi Protected Access

Lacks of WEP derived from the implementation of RC4 WiFi Alliance tried to eliminate with the issue of WPA recommendation. Thus it made the authentication of the user mandatory, made efforts on behalf of the stronger encryption, of the realization of key management, and of protection against replay. WPA generated by the Wi-fi Alliance allowed the start of development of secure wireless network devices, until the IEEE 802.11 group finished the preparation of the standard. Until this (2004) the Wi-fi Alliance has already prepared also the WPA2 standard, which was built onto the final draft of IEEE 802.11 standard. In 2006 WPA2 became a mandatory recommendation and the WiFi Certified logo only beared by such a product, which supported the WPA2.

Mandatory authentication is an important element of both WPA and WPA2. WPA2 is worth speaking about in details, because its usage is generally prevalent. WPA2 has two different methods of usage: the so called Personal or Enterprise methods. Previous one can be made proper for the already mentioned SOHO environment, and another one is, of course, for the enterprise environment. In Personal mode, with PSK (Pre-shared Key), an in Enterprise mode with authentication and access control solutions described in IEEE 802.1X, and with EAP (Extensible Authentication Protocol). Several methods of EAP are supported by WiFi Alliance, e.g. authentication based on SIM cards of GSM-telephones, or usage of TLS protocol.

In the field of encryption in WPA the TKIP (Temporal Key Integrity Protocol) was used, which was based on RC4. However, it has weaknesses - that was mentioned concerning WEP - which enhances the chance for breakage in case of packages with short, partially known contents. That is why a stronger encryption was used in WPA2, the CCMP (Counter Mode with Cipher Block Chaining Message Authentication Code Protocol) with a 128-bit of AES block cipher.

RADIUS

RADIUS (Remote Authentication Dial In User Service) is a network porotcol, which provides a centralized AAA (Authentication, Authorization, and Accounting) management service to the computers connecting to the network, and to computers using it. RADIUS was developed by the Livingston Enterprises, Inc., in 1991, later it became an IETF-standard. RFC 2865 describes, how to make authentication and permission in the RADIUS, while RFC 2866 describes the accounting.

According to its efficient support and prevalence, RADIUS is frequently used by ISPs and enterprises to manage the access to wireless networks, integrated e-mail system, etc. There can be modems, DSL-devices, access point, VPNs, network port (e.g. printer), web servers etc. in the network.

RADIUS is an application layer protocol over the UDP client/server. Remote Access Server, Virtual Private Network server, network switch with a port-based authentication, and Network Access Server are the gateways controlling the network access, and all of them have a RADIUS client part, which is connected to the RADIUS server. RADIUS server itself is mostly a process running on a Unix or Windows server.

RADIUS realizes three functions:

  1. Authenticates the user or the device, before permitting the access to the network
  2. Permits this users or devices to use certain network services.
  3. Makes accounting in connection with services.

Development of WLAN networks in SOHO-environment

SOHO is an abbreviation for "Small Office Home Office" expression. In this type of environment there are mostly different claims appear because of the size, and for the solution we use different technologies and devices, as in the enterprise, or governmental, or military environment.

Practical development of wireless local networks is quite simple with the today's devices, using the basic sets of wireless router, and accessing to a network with proper SSID on the stations the network is ready for operation, namely the WLAN router operating as a DHCP server gives IP addresses to the stations. Usage of DHCP server is reasonable, because we could just make difficult the configuration of network with a fixed IP address division. On the other hand, taking into consideration the growing number of WLAN networks, we may ask, that from what domain can a DHCP server divide address for us. Logical answer could be, that we choose an address domain, which is not public, namely valid only at the given subnetwork, and the router selectors will not forward these packets. These kinds of address domains are the following (RFC 1918):

Since these addresses are valid only between the router and the user, they are not available from the outside. Between the Internet and WLAN router there is a cable modem, or ADSL-modem in home networks, which has a public IP-address. Translation between the two address domains is made by the NAPT (Network Address Port Translation - RFC 3022) protocol. We are in the simplest situation, if we can realize the WLAN router in the modem, too. Then also the NAT is in a router-modem. If there are two different devices, then the modem mostly operates, as a bridge, namely the rouer gets its IP-number from the DSL network. We have to realize the NAT function in the router then.