Built a NAC authentication system using EAP-TTLS (802.1X), employing SSL/TLS, SHA-256 and digital certificates to establish a secure tunnel and eliminate the need for inner authentication methods like PAP/MSCHAPv2.
Scale: 5 members
Programming Language: C/C++
Tools and Platform: OpenSSL, Winsock2, Windows (optional cross-platform)
Optional 1: SET UP VIRTUAL MACHINE
Optional 2: SET UP MSYS2 MINGW64
- Verify GCC compiler:
gcc --version
- Verify Git:
git --version
- Verify OpenSSL:
openssl version
- Verify Make:
make --version
git clone https://github.com/zjqingzun/scypo-Bachelor.SE00SP-AE_CQ2022-22.git
make clean
make all
Important Note: The server must be started before running the supplicant. The supplicant will fail to connect if the server is not running.
Important Note: You should run server and supplicant in 2 different terminal
chmod +x ./scripts/grant.sh
./scripts/grant.sh
./scripts/setup.sh
./scripts/server.sh
./scripts/supplicant.sh
Default Credentials for Testing Supplicant
- Username: usertest
- Password: 123456
./scripts/cli.sh
The project includes several make commands for convenience:
# Build all components
make all
# Clean build files
make clean
# Run specific components
make run-cli
make run-server
make run-supplicant
-
Open two terminal windows
-
In the first terminal, run the Server:
./scripts/server.sh
Output:
[SERVER] Server is listening on port...
[SERVER] Client connected
...
[SERVER] Client authenticated successfully.
- In the second terminal, run the Supplicant:
./scripts/supplicant.sh
Output:
[SUPPLICANT] Enter username: usertest
[SUPPLICANT] Enter password: 123456
[SUPPLICANT] Connected to server
...
[SUPPLICANT] Authentication successful!
-
Open two terminal windows
-
In the first terminal, run the Server:
./scripts/server.sh
Output:
[SERVER] Server is listening on port...
[SERVER] Client connected
...
[SERVER] Starting EAP-TTLS authentication process ...
- In the second terminal, run the Supplicant:
./scripts/suppplicant.sh
Output:
[SUPPLICANT] Enter username: usertest
[SUPPLICANT] Enter password: 123456
[SUPPLICANT] Connected to server
- Server show username and IP address which can be used to modify /config/access-rules.json:
[SERVER] Received username: usertest
[SERVER] Client IP: 127.0.0.1
- Server then decide to authenticate or reject Client:
[SERVER] Waiting for challenge response...
[SERVER] Received challenge response, verifying...
[SERVER] Client authenticated successfully.
[SUPPLICANT] Waiting for authentication result...
[SUPPLICANT] Authentication successful!
Or
[SERVER] Client authenticated successfully.
[SERVER] Access denied by NAC policy
[SUPPLICANT] Waiting for authentication result...
[SUPPLICANT] Authentication failed: Access denied by policy
[SUPPLICANT] Authentication failed!
Makefile : Manage automatic full program compilation.
src : Contains the entire main source code for the server, supplicant, EAP protocol, and CLI interface.
include : Contains the header files (*.h) accompanying the C source code to separate the interface from the implementation.
config : Contains access rule files, for example, access-rules.json, which defines allowed or blocked MAC/IP addresses.
scripts : Bash scripts to quickly run the program, start the server, supplicant, or perform tests.
logs : Log files are recorded during execution.
docs : Architecture documents, authentication flow, etc., for presentation and reporting purposes.
See additional details in the CONTRIBUTING file for external contribution acknowledgments.
Purpose: Standards, principles, regulations, clauses.Ref: https://github.com/zjqingzun/scyl-SPv1.0
Purpose: Graphics, algorithms, structures, machine learning, search.
Ref: https://opensource.org/license/mit