Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1188483
  • 博文数量: 253
  • 博客积分: 5892
  • 博客等级: 大校
  • 技术积分: 1942
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-24 14:20
文章分类

全部博文(253)

文章存档

2012年(98)

2011年(155)

分类: 网络与安全

2011-11-28 22:58:43

Very basic understanding

EAP/MD5 and other types of EAP authentication are part of "Port based network access control", as defined in the IEEE 802.1X standard. All you have to know at this time are the three main actors:
  • authentication server (called AS or server in this document):
    AAA server (RADIUS) which will verify user credentials and give commands to accept or reject the user login request.
  • authenticator (called client or access point - ap - in this document):
    the network access device (NAS), which will take the EAP-frames out of the traffic on one side and translate them into RADIUS-attributes on the other and vice versa, thus acting as pass-through device.
  • supplicant (user):
    the one to be authenticated, i.e. your Windows/Linux whatever machine using the WLAN
Server configuration (FreeRADIUS)
   Assumptions:
  • You have a server that starts without any errors when doing:
  • ./radiusd –s –X
  • You have at least one properly configured client (i.e. access point, ap).
  • You have at least one configured user and your
  • radtest user password 10 secret works from a test host (e.g. localhost), i.e. you receive an Accept message from your server.
Please take a look at the provided configuration files in order to accomplish the setup so far. It’s really not difficult to have the system configured this way by just correcting the supplied configuration files. The files concerned here are in the etc directory of your FreeRADIUS server:
  • users
  • clients.conf
  • radiusd.conf
User configuration (users):

Alter the existent user or add another one which will be used for test purposes. The simplest possible configurations are given in the examples. More complicated configurations are out of the scope of this document.


  1. Examples:

  2. Auth-Type := System, User-Password = "Hello"

  3. or

  4. Auth-Type := Local, User-Password = "Hello"

  5. Please note the ":=" operator. "=" instead will not work.

Sections (radiusd.conf):

The interesting part here are authorize AND authenticate sections. (At the very bottom of the file.) Ignore all the following as those will deal with the accounting.


  1. authorize {

  2. preprocess

  3. files

  4. eap

  5. }

  6. authenticate {

  7. eap

  8. }
 Finally, the EAP module itself has to be configured at least this way:
  1. eap {

  2. md5 {

  3. }

  4. }

That’s it for FreeRADIUS

Client configuration

First of all: please read the documentation of your client. There are a plenty of different clients on the market, we can’t provide any help for them. Basically, you have to activate "Network port based 802.1X authentication", sometimes called similar. Please see the Technical Documentation of your AP. Then, of course, you have to find the "Authentication Server" configuration part and supply the data about the used RADIUS server, i.e. it’s IP-address, UDP-port and the pre-shared secret (the same one you configured for your access point – client – in the FreeRADIUS configuration files). Sometimes you can supply a bunch of those servers and sometimes you can use them for other purposes, too, like e.g. MAC-based access control. You only have to activate the EAP-Authentication.

Please note: you can perfectly use EAP-authentication without using WEP or providing whichever keys in the AP. Do it so for the test purposes. Once you’ve got it running, you can setup your WEP keys, whatever. That will allow you to analyze traffic if something goes wrong.

For Cisco AP340 it would look like following:

 

ap1   AP Radio Data Encryption

Cisco 350 Series AP 11.23T

    

    

Uptime: 7 days, 11:02:58

 
Use of Data Encryption by Stations is:  
 
 
Open Shared Network-EAP
Accept Authentication Type: 
Require EAP:  
 
 
 Transmit  
 With KeyEncryption KeyKey Size
 WEP Key 1:
 WEP Key 2:
 WEP Key 3:-
 WEP Key 4:-
 
Enter 40-bit WEP keys as 10 hexadecimal digits (0-9, a-f, or A-F).
Enter 128-bit WEP keys as 26 hexadecimal digits (0-9, a-f, or A-F).
This radio supports Encryption for all Data Rates.
 
    
[][][]
Cisco 350 Series AP 11.23T ® Copyright 2002

 

Deactivate older authentication types (Open, Shared, CHAP, PAP, whatever) to prevent misunderstanding during the test.

User configuration
Windows XP (before SP1)

Note: since WindowsXP SP1 you can't use EAP-MD5 for wireless devices!!! EAP-MD5 is only available for wired devices.

Go to the Network Connections window. Right-click the connection corresponding to the adapter which is going to use EAP authentication. Go to the "Authentication" tab. If it doesn’t appear (yes, it’s weird sometimes) try to unplug and plug your adapter till it does (if PCMCIA...) Otherwise, download the software for the adapter configuration like e.g. ACU for the Cisco adapters and try to de- and reactivate the card.

In the Authentication dialog, assure the box "Use IEEE802.1X network authentication" is checked. Set your EAP type there (EAP/MD5 Challenge).

That’s all. Now deactivate and reactivate your LAN-connection on this adapter and it should work.

Troubleshooting Problems:
  • Problem 1:
    Your AP keeps on saying "Unknown EAP authentication procedure request" or similiar all the time.

    Workaround:
    Try to assure that all the parameters described above (at client and user sides) have really been set. Then, try to check the following points:
    • The firmware of the network adapter and the access point are new enough to support the latest IEEE802.1X version (momentary Draft 10 or Draft 11 should work). Update your firmware with its radio part in the other case.
    • Use the adapter software to see which versions are active, verify the links, permutate all settings, do something! Try to use the adapter software to set the authentication type. In my case it was the first solution I had to set an ACU profile dictating the EAP authentication to the card instead of „Allow Windows to set these parameters“. This now works with Windows profiling, too, though.

  • Problem 2:
    You get an Access Reject even if the identification information is correct. In the server log you can see a weird Notification message.

    Workaround:
    In your user config (users file of the server configuration) remove the "Reply-Message" attribute for the concerned user. This is currently a bug. Some APs (e.g. Cisco) send out a Notification downstream to the user on receiving a "Reply-Message" attribute in the "Radius Response". The Windows XP supplicant answers with an "EAP Notification" type message instead of "EAP MD5 Challenge" message which should be issued. FreeRadius server currently rejects every incoming EAP notification.
Exchange and log examples Below some examples:

1. Successful login for user

The basic exchange would be like following:


  1. NAS Server

  2. Access Request (1)
  3. EAP Response (2)
  4. Identity (1)
  5. ---------------->


  6. Access Challenge (11)
  7. EAP Request (1)
  8. MD5-Challenge (4
  9. <----------------


  10. Access Request (1)
  11. EAP Response (2)
  12. MD-Challenge (4)
  13. ---------------->


  14. Access Accept (2)
  15. EAP Success (3)
  16. <----------------
And the corresponding radiusd output:
  1. rad_recv: Access-Request packet from host 10.10.10.1:1150, id=42, length=121
  2. User-Name = "artur"
  3. NAS-IP-Address = 10.10.10.1
  4. Called-Station-Id = "00409635bed6"
  5. Calling-Station-Id = "004096426f05"
  6. NAS-Identifier = "ap1"
  7. NAS-Port = 38
  8. Framed-MTU = 1400
  9. NAS-Port-Type = Wireless-802.11
  10. EAP-Message = "\002\000\000\n\001artur"
  11. Message-Authenticator = 0xe16c8f1a3d9326a9025fb043c7f2ecec
  12. rlm_eap: processing type md5
  13. rlm_eap_md5: Issuing Challenge
  14. Login OK: [artur/] (from client ap-1 port 38 cli 004096426f05)
  15. Sending Access-Challenge of id 42 to 10.10.10.1:1150
  16. EAP-Message = "\001*\000\026\004\020\277\301\034\265\377\002\353\210{pfV\216B\031J"
  17. Message-Authenticator = 0x00000000000000000000000000000000
  18. State = 0x0bb432f976422930f905808b087e88ba9610fe3ccb283c169291fb00b15a87fa66c5a418
  19. rad_recv: Access-Request packet from host 10.10.10.1:1151, id=43, length=176
  20. User-Name = "artur"
  21. NAS-IP-Address = 10.10.10.1
  22. Called-Station-Id = "00409635bed6"
  23. Calling-Station-Id = "004096426f05"
  24. NAS-Identifier = "ap1"
  25. NAS-Port = 38
  26. Framed-MTU = 1400
  27. State = 0x0bb432f976422930f905808b087e88ba9610fe3ccb283c169291fb00b15a87fa66c5a418
  28. NAS-Port-Type = Wireless-802.11
  29. EAP-Message = "\002*\000\033\004\020]\242\222\220kzZ\006\213\376!w\363M\255\311artur"
  30. Message-Authenticator = 0xa8d07be03fa8f7e6a15f593753094db4
  31. rlm_eap: Request found, released from the list
  32. rlm_eap: EAP_TYPE - md5
  33. rlm_eap: processing type md5
  34. Login OK: [artur/] (from client ap-1 port 38 cli 004096426f05)
  35. Sending Access-Accept of id 43 to 10.10.10.1:1151
  36. EAP-Message = "\003+\000\004"
  37. Message-Authenticator = 0x00000000000000000000000000000000

FreeRADIUS EAP¨/MD5: WindowsXP as supplicant
Last touched: 03.03.2003

--Artur Hecker

阅读(2428) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~