EAP-PAX

What is Expansion of EAP-PAX?

EAP-PAX stands for Extensible Authentication Protocol - Password-authenticated Exchange. It is a password-based authentication protocol designed to provide secure mutual authentication and key exchange between a client and a server.

What is EAP-PAX?

EAP-PAX is an authentication protocol within the EAP (Extensible Authentication Protocol) framework. It is designed to allow secure password-based authentication and secure key exchange for mutual authentication over potentially insecure networks.

Why is EAP-PAX useful?

  • Provides secure mutual authentication without relying on certificates.

  • Enables password-based authentication with protection against man-in-the-middle attacks.

  • Suitable for Wi-Fi networks and VPNs, especially when certificates are not available.

  • Establishes a shared secret key (PMK) for encrypting the session, improving security.

How it works?

  1. The client sends an authentication request to the server.

  2. The server generates a random challenge and sends it to the client.

  3. The client hashes its password with the challenge and returns the response.

  4. The server verifies the response by applying the same hash function.

  5. If the verification is successful, both client and server derive a shared secret key (PMK), which is used for securing further communication.

Where is EAP-PAX used?

  • Wi-Fi networks (e.g., WPA2 Enterprise) for secure wireless authentication.

  • VPNs for secure remote access.

  • Enterprise networks for password-based authentication without requiring certificates.

  • Environments where RADIUS servers are used for centralized authentication.

Which OSI layer does this protocol belong to?

EAP-PAX operates at the Application Layer (Layer 7) of the OSI model. It defines the authentication process and relies on lower OSI layers (such as TCP/UDP) for transport.

Is EAP-PAX Windows specific?

No, EAP-PAX is not Windows-specific. It is platform-independent and works across various operating systems, including Windows, Linux, and macOS.

Is EAP-PAX Linux Specific?

No, EAP-PAX is not Linux-specific. It is supported across multiple platforms, including Windows and macOS.

Which Transport Protocol is used by EAP-PAX?

EAP-PAX typically uses UDP as the transport protocol, especially when integrated with RADIUS servers for authentication.

Which Port is used by EAP-PAX?

When EAP-PAX is used with RADIUS, it generally operates over UDP port 1812 for authentication.

Is EAP-PAX using Client server model?

Yes, EAP-PAX uses the client-server model. The client sends an authentication request to the server, which challenges the client, verifies the response, and establishes a secure connection.

Whether EAP-PAX protocol uses certificates?

No, EAP-PAX does not require certificates. It uses password-based authentication, making it suitable for environments where certificates are not practical.

How many frame exchanges are seen during connection for EAP-PAX protocol?

EAP-PAX typically involves four frame exchanges: 1. Client sends the initial authentication request. 2. Server issues a challenge. 3. Client responds to the challenge. 4. Server verifies the response, and both parties derive a PMK for further encryption.

Does EAP-PAX Protocol use client certificates?

No, EAP-PAX does not use client certificates. It relies on password-based mutual authentication.

Does EAP-PAX Protocol use Server Certificates?

No, EAP-PAX does not use server certificates. Authentication is based on password hashing and mutual challenge-response.

Does EAP-PAX Protocol depend on TCP?

No, EAP-PAX does not rely on TCP. It typically uses UDP for transport, especially when integrated with RADIUS servers.

Does EAP-PAX Protocol depend on UDP?

Yes, EAP-PAX uses UDP for transport, particularly in environments with RADIUS servers, which is the most common setup.

What are the roles involved when testing EAP-PAX Protocol?

  • Client: Initiates the authentication process by sending a request and responding to challenges.

  • Server: Issues challenges, verifies client responses, and authenticates the client.

  • Administrator: Configures the RADIUS server, ensuring proper protocol support and security measures.

Does EAP-PAX Protocol work with FreeRADIUS server on Linux?

Yes, EAP-PAX is compatible with FreeRADIUS on Linux for password-based authentication.

Does EAP-PAX Protocol work with Internal RADIUS server of hostapd?

Yes, EAP-PAX works with the internal RADIUS server of hostapd, providing secure password-based authentication.

What is the RFC version used for EAP-PAX Protocol?

EAP-PAX is specified in RFC 5931 (Password Authenticated Exchange).

During Connection Procedure which EAP packets are encrypted?

In EAP-PAX, the challenge-response packets are encrypted using the PMK (Pairwise Master Key) derived during authentication.

Can you explain the different stages of Connection Procedure for EAP-PAX Protocol?

  1. Authentication Request: The client sends a request to the server.

  2. Challenge: The server generates a challenge and sends it to the client.

  3. Response: The client hashes the password with the challenge and sends it back.

  4. Verification: The server verifies the response and both parties derive a shared secret key (PMK) for secure communication.

What is the final output of Connection Procedure?

The final output is the successful derivation of the PMK (Pairwise Master Key), which is used to secure further communication between the client and server.

What is the format of the key generated after the connection procedure?

The key generated is a Pairwise Master Key (PMK), which is derived from the password and the server’s challenge. The format of the key is a binary string that can be used for encryption.

Where is the use of PMK generated by the Connection Procedure?

The PMK generated by the connection procedure is used for encrypting the data transmitted between the client and server, ensuring secure communication.

  • In this section, you are going to learn

  • Terminology

  • Version Info

  • rfc details

  • Run AP mode operation with hostapd

AP : Download hostapd

Note

  • Make sure internet is available in laptop to download hostapd package

test:~$ wget http://w1.fi/releases/hostapd-2.9.tar.gz

AP: Install required packages

test:~$ sudo apt install libnl-genl-3-dev libnl-3-dev libdbus-glib-1-dev

AP : Extract hostapd

test:~$ tar -xzvf hostapd-2.9.tar.gz

AP : Change directory to hostapd

test:~$ cd hostapd-2.9/hostapd/

AP : Check the current working directory using pwd command

Note

  • Make sure your current working directory is hostapd

test:~$ pwd
/home/test/hostapd-2.9/hostapd

AP : Copy the contents of defconfig file to .config file

Note

  • .config file is required for make to start compilation of hostapd

test:~$ sudo cp defconfig .config

AP : Complile hostapd

Note

  • Compile hostapd by running make command

test:~$ make

AP : Check for the binaries created

Note

  • Make sure hostapd and hostapd_cli are present

test:~$ ls
hostapd
hostapd_cli

AP : Create a hostapd.conf file in /etc/hostapd folder with below content

test:~$ sudo vim /etc/hostapd/hostapd.conf

ctrl_interface=/var/run/hostapd
interface=enp0s8
driver=wired
logger_stdout=1
logger_stdout_level=1
ieee8021x=1
eap_server=1
eap_user_file=/etc/hostapd/hostapd.eap_user
eap_reauth_period=3600
auth_algs=1
macaddr_acl=0

AP : Create a file eap_user in /etc/hostapd/ folder with below content

test:~$ sudo vim /etc/hostapd/hostapd.eap_user

AP : Run hostapd

test:~$ sudo ./hostapd /etc/hostapd/hostapd.conf
enp0s8: interface state UNINITIALIZED->ENABLED
enp0s8: AP-ENABLED

STA : Download wpa_supplicant

Note

  • Make sure internet is available in laptop to download supplicant package

test:~$ wget https://w1.fi/releases/wpa_supplicant-2.9.tar.gz

STA: Install required packages

test:~$ sudo apt install libnl-genl-3-dev libnl-3-dev libdbus-glib-1-dev

STA : Extract wpa_supplicant

test:~$ tar -xvf wpa_supplicant-2.9.tar.gz

STA : Change directory to wpa_supplicant

test:~$ cd wpa_supplicant-2.9/wpa_supplicant/

STA : Check the current working directory using pwd command

Note

  • Make sure your current working directory is wpa_supplicant

test:~$ pwd
/home/test/wpa_supplicant-2.9/wpa_supplicant

STA : Copy the contents of defconfig file to .config file

Note

  • .config file is required for make to start compilation of supplicant

test:~$ cp defconfig .config

STA : Compile wpa_supplicant

Note

  • Compile supplicant by running make command.

test:~$ make

STA: You might get errors while make regarding openssl headers in that case install the openssl headers and then do make clean and then do make again.

test:~$ sudo apt install libssl-dev
test:~$ make clean
test:~$ make

STA : Check for the binaries created

Note

  • Make sure wpa_supplicant and wpa_cli are present

test:~$ ls
wpa_supplicant
wpa_cli

STA: Copy required certificates from hostapd to wpa_supplicant

STA : Create wpa_supplicant.conf

test:~$ sudo vim wpa_supplicant.conf

ctrl_interface=/run/wpa_supplicant
update_config=1
network={
key_mgmt=WPA-EAP
eap=PAX
identity="user1"
password=e5d83872d145f206c46149f5c5ce2ae4
}

STA : Run wpa_supplicant

test:~$ sudo ./wpa_supplicant -D wired -i enp0s8 -c wpa_supplicant.conf
enp0s8: CTRL-EVENT-EAP-SUCCESS EAP authentication completed successfully

STA: Test

test:sudo ./wpa_cli -i enp0s8
> status
  • setup

  • setup

  • packet details

  • usecases

  • features

  • Reference links