EAP-GTC

What is Expansion of EAP-GTC?

EAP-GTC stands for Extensible Authentication Protocol - Generic Token Card.

What is EAP-GTC?

EAP-GTC is a type of EAP (Extensible Authentication Protocol) used for token-based authentication, typically involving one-time password (OTP) systems. The protocol allows a user to authenticate using a smart card or token device that generates a unique code for each login attempt.

Why is EAP-GTC useful?

  • Strong Authentication: EAP-GTC supports two-factor authentication using a combination of something the user knows (PIN) and something they have (token).

  • Token-Based Security: It provides security through time-based tokens that change with each authentication request.

  • Flexible: It can work with various token-based systems, including smart cards and hardware tokens.

How it works?

  • Client-side: The client enters a PIN or password and uses a token device to generate a time-sensitive one-time password (OTP).

  • Server-side: The server verifies the OTP and grants access if the credentials match the expected token and PIN.

  • Authentication: The protocol uses the OTP and PIN as a form of authentication, transmitting the credentials securely to the authentication server.

Where is EAP-GTC used?

  • Enterprise Networks: EAP-GTC is used in environments requiring high security, especially where token-based authentication is needed.

  • VPNs: It can be used for VPN authentication, where two-factor authentication is required to access secure networks.

  • Wireless Networks: It is used for secure wireless access in organizations that employ strong user authentication.

Which OSI layer does this protocol belong to?

  • EAP-GTC operates at the Application Layer (Layer 7) of the OSI model, using lower layers for transport through protocols such as RADIUS.

IS EAP-GTC Windows specific?

  • No, EAP-GTC is not Windows-specific.

  • It is a cross-platform authentication method supported on various operating systems, including Windows, Linux, and macOS.

IS EAP-GTC Linux Specific?

  • No, EAP-GTC is not Linux-specific.

  • It can be implemented on Linux, Windows, and other platforms with the necessary token-based authentication setup.

Which Transport Protocol is used by EAP-GTC?

  • EAP-GTC uses RADIUS as the transport protocol, which generally operates over UDP.

Which Port is used by EAP-GTC?

  • EAP-GTC typically uses UDP port 1812 for authentication and UDP port 1813 for accounting in conjunction with RADIUS.

Is EAP-GTC using Client server model?

  • Yes, EAP-GTC follows a client-server model.

  • The client initiates the authentication request, while the server (RADIUS server) verifies the credentials and grants access.

Whether EAP-GTC protocol uses certificates?

  • No, EAP-GTC does not use certificates for authentication.

  • It relies on token-based authentication methods, such as PINs and one-time passwords.

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

  • EAP-GTC typically requires two or three frame exchanges:
    • One for sending the authentication request.

    • Another for sending the OTP and PIN.

    • Optionally, another to confirm the authentication result.

Whether EAP-GTC Protocol uses client certificates?

  • No, EAP-GTC does not use client certificates.

  • It relies on tokens and PINs for authentication instead.

Whether EAP-GTC Protocol uses Server Certificates?

  • No, EAP-GTC does not use server certificates.

  • Authentication relies on token-based mechanisms.

IS EAP-GTC Protocol depends on TCP?

  • No, EAP-GTC does not depend on TCP.

  • It relies on UDP, typically used in RADIUS for transport.

IS EAP-GTC Protocol depends on UDP?

  • Yes, EAP-GTC depends on UDP for transport, specifically using the RADIUS protocol.

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

  • Client: Sends the authentication request along with the PIN and OTP.

  • RADIUS Server: Verifies the credentials and either grants or denies access based on the response.

  • Administrator: Configures and manages the token-based system, sets up the RADIUS server, and tests the authentication process.

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

  • Yes, EAP-GTC works with FreeRADIUS on Linux.

  • It can be configured to support token-based authentication, such as one-time passwords.

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

  • Yes, EAP-GTC can be used with the internal RADIUS server of hostapd for authentication purposes.

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

  • The RFC for EAP-GTC is RFC 2284.

During Connection Procedure which EPoL Packets are encrypted?

  • During the connection procedure, EAP-GTC packets that contain sensitive information (e.g., PIN, OTP) are encrypted to ensure confidentiality.

Can you Explain different stages of Connection Procedure for EAP-GTC Protocol?

  • Stage 1: The client sends the authentication request with the token and PIN.

  • Stage 2: The server checks the OTP provided by the client, validates it against the stored token.

  • Stage 3: If the validation is successful, the server grants access to the client.

  • Stage 4: If the validation fails, access is denied.

What is the final output of Connection Procedure?

  • The final output is a successful authentication or failure, depending on the accuracy of the token and PIN provided by the client.

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

  • The connection generates a Pairwise Master Key (PMK), which is used to secure the communication between the client and the server.

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

  • The PMK is used to derive encryption keys for securing the communication between the client and the server during the session.

  • In this section, you are going to learn

  • Terminology

  • Version Info

  • rfc details

  • Run Free RADIUS

FreeRADIUS: Download latest freeradius source code

Note

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

test:~$ wget https://github.com/FreeRADIUS/freeradius-server/archive/v3.0.x.tar.gz

FreeRADIUS: Extract freeradius

test:~$ tar -zvf v3.0.x.tar.gz

FreeRADIUS: Change directory to Radius server

test:~$ cd freeradius-server-3.0/

FreeRADIUS: Check the current working directory using pwd command

Note

  • Make sure your current working directory is freeradius-server-3.0

test:~$ pwd
/home/test/freeradius-server-3.0

FreeRADIUS: Open debian/rules and add this line –without-rml_sql_iodbc above –without-rlm_eap_ikev2

test:~$ vim debian/rules
--without-rml_sql_iodbc \
--without-rlm_eap_ikev2 \

FreeRADIUS: Configure for Compilation

test:~$ ./configure

FreeRADIUS: Build the Radius server

test:~$ make

FreeRADIUS: Go to raddb folder (all radius server/client files and certificates and keys will be generated here)

test:~$ cd /usr/local/etc/raddb

FreeRADIUS: Open clients.conf file and verify localhost client is present else add your own client like below

test:~$ sudo vi clients.conf

client 192.168.56.10{
ipaddr = 192.168.56.10
secret = testing123
}  

FreeRADIUS: Open users file and uncomment below two lines or add

test:~$ sudo vi users

bob 	Cleartext-Password := "testing123"
 	Reply-Message := "Hello, %{User-Name}"

FreeRADIUS: Set default_eap_type=tls in eap file located in /usr/local/etc/raddb/mods-enabled

test:~$ sudo vi /usr/local/etc/raddb/mods-enabled/eap

default_eap_type=gtc

FreeRADIUS: Start radius server

test:~$ sudo radiusd -X
  • 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
debug=2
ieee8021x=1
eap_server=0
eap_user_file=/etc/hostapd/eap_user
eap_reauth_period=3600
use_pae_group_addr=1
auth_algs=1
auth_server_addr=127.0.0.1
auth_server_port=1812
auth_server_shared_secret=testing123
acct_server_addr=127.0.0.1
acct_server_port=1812
acct_server_shared_secret=testing123
macaddr_acl=0
ca_cert=/usr/local/etc/raddb/certs/ca.pem
server_cert=/usr/local/etc/raddb/certs/server.crt
private_key=/usr/local/etc/raddb/certs/server.p12
private_key_passwd=whatever 

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

test:~$ sudo vim /etc/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=GTC
identity="bob"
password="testing123"
}

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