802.11X User Authentication

Static WEP attempts to simultaneously solve two problems 802.11 wireless network security. That is it intended to provide authentication to define specific keys can only have network access, but also want to provide confidentiality to the data to be encrypted through a wireless link. However, its performance in these two areas are not particularly good.

802.1X is a frame, which is an IETF IEEE Extensible Authentication Protocol ( E Xtensible A uthentication P rotocol, referred to as the EAP ) developed from, 802.1X link layer provides a mechanism for authentication . Static WEP encryption keys have just the machine for authentication, and 802.1X gateway allows personnel to authenticate the user and not a machine, while ensuring that users can connect to a legitimate, authorized and not counterfeit network to steal personal data.

1. Extensible Authentication Protocol (EAP)

EAP is a simple package, run on any link layer, EAP basic structure shown below, is designed to be able to run on any of a variety of link-layer authentication method to use.


Figure 1 EAP architecture

1.1 EAP packet format

The EAP packet format is shown below, EAP does not have to run on top of PPP, the packet may FIG carried by any of a frame.


2 EAP packet format of FIG.

  • Code

    Code (Type Code) a length of 1 byte type represents EAP packet, the Data packets (data) fields must parse this field to

  • Identifier

    Identifier (identifier) ​​used to match request and response, will use the same identifier number retransmission, new retransmission using new identifer number

  • Length

    Length field describes the total number of bytes of the entire packet including the Code, Identifier, Length and Data field four

  • Data

    Variable length Data field, may not account for any byte, the Data field depends entirely on how to resolve the value of the Code field

1.2 EAP request and response of

EAP consists of the exchange request and response, as shown in FIG. Code represents the value of the request field, represents a response, Data field may carry one data type identifier code may be broken down and associated data.


FIG request and response packet formats of 3 EAP

  • Type

    Type (Type) field represents a type of request or response. Only one type of each packet, when you can not accept a request, the other party may send a NAK to the proposed use of different types. Value greater than or equal Type field representing authentication mode 4

  • Type-Data

    Type-Data (Type - Data) field of variable length, and must be construed in accordance with the rules for each type of

Message type code field corresponds to the following table:

Type Message meaning
1 Identity Certification will usually type of identity as the initial request, abbreviated as Request / Identity, representing an authentication attempts to establish some sort of user name for authentication, EAP client responds with a Response / Identity packet, the packet of Type-Data field It contains the user name
2 Notification Causes for the authentication may use the Notification message types to be transmitted to the user, the user's system may then Request / Notification messages shown to the user, such as a password is about to expire or the account is locked. EAP client responds with a simple acknowledgment
3 NAK null acknowledgment is mainly used to recommend the use of new authentication. The authenticator specifies the type of code used to authenticate the sending challenge (Challenge) message, the type of authentication codes is 4 and the figures given above, if the user's system does not support the type of authentication challenge is used, can be recovered NAK the authentication type used, NAK type-Data field contains the recommendation is

Values ​​defined in Table 1 EAP request with the response data field of the Type

1.3 EAP authentication methods

EAP会把证明用户身份的操作授权给一个称为EAP method(一组验证用户身份的规则)的附属协议,下表列出了一些EAP method以及它们的类型代码。

类型代码 身份验证协议 说明
4 MD5 Challenge EAP中类似CHAP的认证方式
6 GTC 原本打算与RSA SecurID之类的令牌卡(token card)一起使用
13 EAP-TLS 以数字证书(digital certificate)相互认证
21 TTLS 隧道式TLS,以TLS加密保护较弱的身份验证方式
25 PEAP 防护型EAP,以TLS加密保护较弱的EAP方式
18 EAP-SIM 以移动电话的用户识别模块(Subscriber Identity Module,简称SIM)卡进行身份验证
29 MS-CHAP-V2 Microsoft的经加密的密码身份验证,见冗余Windows域

表2 802.1X身份验证常用的EAP认证方式(EAP method)

在EAP交换结束之后,用户不是认证成功,就是认证失败。一旦认证者判断出整个交换过程已经完成,就会发出一个EAP-Success或EAP-Failure帧,以结束整个EAP交换过程,如下图所示。


图4 EAP认证成功与失败的帧

1.4 EAP交换范例

EAP交换范例如下图所示,这并不是无线网络中“实际”可见的交换过程,因为其中用到了一些未曾广泛部署的协议。举这个例子只是为了让读者对EAP协议的运作方式有基本的概念。EAP交换过程是一系列的步骤,从认证请求开始,以成功或失败信息结束。


图5 简单的EAP交换过程

可扩展性既是EAP最大的优点也是最大的缺点。可扩展性让协议能够在有新的需求福显示开发新的功能。正因为可扩展性,EAP已经从保留PPP协议编号的方式转变为无线局域网安全防护的基础。不过要正确部署EAP可能不容易,因为要选择正确的协议选项之前必须先理清一大堆问题。EAP之所以具有灵活性,关键在于它本身只是一个框架,当新的需求浮现时就可以设计出新的认证方式,就算是用于无线局域网也不成问题。

2. 802.1X:网络连接端口的认证

在链路层采用认证机制并不是什么新鲜事,网络连接端口的认证在拨号访问服务器上已经使用了多年,IEEE采用了PPP认证协议并开发了基于局域网络的版本,最后出炉的标准称为802.1X,“基于端口的网络访问控制”(Port-Based Network Access Control)。

2.1 802.1X的架构及相关术语

  • 申请者(supplicant)

    寻求访问网络资源的用户机器

  • 认证者(authenticator)

    网络访问由认证者(authenticator)控制,它扮演着传统拨号网络中访问服务器的角色,申请者与认证者在规范说明书中称为端口认证实体(Port Authentication Entity,简称PAE)。

  • 认证服务器

    认证者只负责链路层的认证交换过程,并不维护任何用户信息。任何认证请求均会被转送至认证服务器进行实际的处理

申请者与认证者之间使用802.1X所定义的EAPover LAN(简称EAPOL)协议,在后端则是通过RADIUS封包来传递EAP,如下图所示。


图6 802.1X的架构

2.2 EAPOL的封装格式

EAPOL的基本帧格式如下图所示。


图7 EAPOL的帧格式

EAPOL帧的组成字段如下:

  • MAC标头

    根据链路层协议使用相应的标头。

  • Ethernet type

    Ethernet type(以太网类型)字段包含了长度为2个字节的type code(类型代码),EAPOL的类型代码为88-8e。

  • Version

    第一版标准化于2001年版的802.1X,第2版规范与802.1X-2004。

  • Pocket Type

    为了让EAP能够适用于基于连接端口的LAN环境,EAPOL加入了一些消息类型,下表列出了所有的封包类型及其说明。

    封包类型 名称 说明
    0000 0000 EAP-Packet 包含了一个经过封装的EAP帧,大部分的帧均属于EAP-Packet帧
    0000 0001 EAPOL-Start 申请者可以主动送出EAPOL-Start帧,不必等候来自认证者的质询
    信息。认证者会送出一个EAP-Request/Identity帧作为响应
    0000 0010 EAPOL-Logoff 当某个系统不再需要使用网络时,便可发出一个EAPOL-Logoff帧,
    让连接端口重新回到未授权状态
    0000 0011 EAPOL-Key EAPOL可用来交换加密密钥信息
    0000 0100 EAPOL-Encap-
    sulated-ASF-Alert
    警告标准讨论(Alerting Standards Forum,简称ASF)
    定义了一种方式,可让警告信息通过此类型的帧传送给
    未经授权的连接端口
  • Packet Body Length

    该字段用来计算Pocket Body字段的长度。

  • Packet Body

    除EAPOL-Start与EAPOL-Logoff消息外,此字段会出现于所有的EAPOL帧中。EAP-Packet帧所封装的是一个EAP封包,EAPOL-Key帧所封装的是一个密钥,而EAPOL-Encapsulated-ASF-Alert帧所封装的则是一段警告信息。

3. 802.1X与无线局域网

802.1X为任何局域网,包括无线局域网,提供了一个用户认证的框架。802.11网络中的802.1X交换范例如下图所示。


图8 802.11网络上典型的802.1X交换

上图802.11网络上的802.1X交换步骤如下:

  1. 申请者通过Association Request/Association Response关联至802.11网络;
  2. 申请者发出一个EAPOL-Start消息,开始进行802.1X交换过程。这个步骤并非必要;
  3. “正常的”EAP交换过程开始。认证者发出一个EAP-Request/Identity帧,申请者以EAP-Response/Identity帧进行回复,此帧随后被转换为Radius-Access-Request封包送给RADIUS服务器;
  4. RADIUS服务器判断需要使用哪个类型的认证,并在送出的EAP-Request信息中指定认证方式的类型。EAP-Request被封装于Radius-Access-Challenge封包中送给接入点。接入点收到封包后即将EAP-Request传递给申请者。EAP-Request信息通常会被表示成EAP-Request/Method,其中Method代表所使用的EAP认证方式;
  5. 申请者从用户方面取得响应,然后返回EAP-Response。认证者会将此响应转换为送给RADIUS的Radius-Access-Request封包,针对质询信息所做的响应则存放于数据字段中;
  6. 既然RADIUS服务器送出一个Radius-Access-Accept封包允许对方访问网络,因此认证者会发出一个EAP-Success帧并且授权申请者使用连接端口;
  7. 收到EAP-Success封包的确认(ACK)后,接入点会立即使用EAPOL-Key消息将密钥分配给申请者;
  8. 一旦申请者安装好密钥,就可以开始传送数据帧来访问网络;
  9. 当申请者不再需要访问网络,就会送出一个EAPOL-Logoff消息,使连接端口恢复成未授权状态。

EAPOL-Key帧让接入点能够传送密钥给客户端,密钥交互帧只有在认证成功之后才会传送,这样可以避免密钥信息外泄。EAPOL-Key帧也可以用来定期动态更新密钥。

Guess you like

Origin www.cnblogs.com/hustluotao/p/12373339.html