• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2387
  • Last Modified:

EAPOL-Start packet composition

I'm trying to establish a WPA-PSK TKIP connection to an AP and have seen the following bit of advice:

"To start the authentication process, your wireless card (called the SUPPLICANT in the specs) sends an EAPOL-Start (EAPOL - Extensible Authentication Protocol Over LAN) packet to the AP.  You do this by forming the packet itself using the MAC address of the AP and your WiFi card (you may have to scan the APs to get the MAC) and sending it through NDISUIO using the WriteFile() WIN32 API."

I have a valid handle to a NDISUIO wifi card, have scanned for APs, and have the MAC I wish to connect to.  I even have the DDK example, UIOTEST.C, and its DoWriteProc function as a guide.

But I don't know how to "form a packet" correctly for this (early) step.  DoWriteProc has me filling a structure with the Dst and Src MAC address and setting an EthType.  So far, I'm using EthType = 0x0800 for this, and getting an error 87 (invalid parameter) from GetLastError().

What data goes an EAPOL-Start packet after the Dst and Scr MAC addresses?

If you can help me, please find me at:

Thanks so much,

George S. Lockwood
Client Developer
San Francisco, CA  94111
LockwoodGE@peoplePCHQ.com
voice:      415.901.6744

0
DevPPC
Asked:
DevPPC
1 Solution
 
jhanceCommented:
I don't think anyone at EE knows anything about EAPOL but me... (but you knew that, didn't you...)

Here are two structs to contain the EAPOL Start packet:

typedef struct _ETH_HEADER
{
      UCHAR      DstAddr[MAC_ADDR_LEN];
      UCHAR      SrcAddr[MAC_ADDR_LEN];
      USHORT      EthType;      // 0x888E
} ETH_HEADER, *PETH_HEADER;


typedef struct _EAPOL_START_PKT
{
      ETH_HEADER mHeader;
      UCHAR      ucVer;            // 0x01
      UCHAR      ucType;            // 0x01 - EAPOL-START
      USHORT      Length;
      UCHAR      Data[1];
} EAPOL_START_PKT, *PEAPOL_START_PKT;
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now