FreeRADIUS Pentest Course
# FreeRADIUS Pentest Course – Section 5: Advanced FreeRADIUS Pentesting Techniques
## Introduction
In this final section of our FreeRADIUS pentesting course, we will dive into advanced techniques involving installation, configuration, and practical applications of FreeRADIUS. This comprehensive guide will prepare you not just for typical usage but also for real-world scenarios, where you may need to investigate vulnerabilities, implement necessary security controls, and bolster network defenses.
## Installation and Configuration on Kali Linux
### Prerequisites
Before we begin, ensure you have a basic understanding of Linux command-line usage and have Kali Linux installed on your machine. Ensure your system is up-to-date:
sudo apt update && sudo apt upgrade -y
### Step 1: Install FreeRADIUS
To install FreeRADIUS on Kali Linux, you can leverage the package manager. Open your terminal and run:
sudo apt install freeradius freeradius-utils -y
### Step 2: Basic Configuration
Once FreeRADIUS is installed, the configuration files are located in `/etc/freeradius/3.0/`. First, navigate to this directory:
#### Modifying the Client Configuration
Edit the `clients.conf` file to define the clients that can communicate with your FreeRADIUS server:
Add the following configuration for a client:
[/dm_code_snippet]plaintext
client my_client {
ipaddr = 192.168.1.100
secret = testing123
shortname = my_client
}
[/dm_code_snippet]
#### Setting Up Users
To add users for authentication, edit the `users` file:
Add a sample user:
[/dm_code_snippet]plaintext
bob Cleartext-Password := "hello"
[/dm_code_snippet]
### Step 3: Starting FreeRADIUS
Start the FreeRADIUS server with debugging enabled to observe real-time logs:
This command runs the server in debug mode, allowing you to see detailed logs as authentication requests are processed.
## Step-by-Step Usage and Real-World Use Cases
### Usage Scenarios
1. **WPA/WPA2 Enterprise Authentication:**
FreeRADIUS is widely used in enterprise environments to authenticate users connecting to wireless networks.
2. **VPN Authentication:**
It can be integrated with VPN solutions (like OpenVPN) to manage user authentication securely.
3. **ISP Billing Systems:**
Many ISPs utilize FreeRADIUS for customer authentication and accounting.
### Conducting a Basic Authentication Test
Once the FreeRADIUS server is running, let’s perform a basic authentication test using the `radtest` utility.
radtest bob hello 127.0.0.1 0 testing123
#### Explanation of Parameters:
– `bob`: Username
– `hello`: The password we set
– `127.0.0.1`: The IP address of the RADIUS server
– `0`: NAS port number, typically set to 0 for testing
– `testing123`: The shared secret defined in `clients.conf`.
### Example Case: Testing Wireless Security with WPA2-Enterprise
In a real-world scenario, you might want to test the security of a WPA2-Enterprise setup that uses FreeRADIUS.
1. **Set Up Your Access Point:**
Configure your wireless access point (AP) to use FreeRADIUS for authentication. The AP should be configured with the same shared secret as in your `clients.conf`.
2. **Connect a Client Device:**
Attempt to connect a client device to the wireless network using the credentials (`bob` and `hello`).
3. **Monitor FreeRADIUS Logs:**
As the client attempts to authenticate, monitor the logs in the terminal running FreeRADIUS to see the authentication request and response.
### Handling Common Issues
While performing security assessments, you may encounter issues. Here’s how to handle common ones:
– **Authentication Fails on the Client Side:**
– Check if the username and password are correct.
– Look at the FreeRADIUS logs for any errors related to authentication.
– **Client Not Found:**
– Ensure the client is defined correctly in `clients.conf` and the shared secret matches.
### Advanced Configuration Options
#### Enabling EAP for Wireless Networks
Extensible Authentication Protocol (EAP) is crucial for providing robust authentication mechanisms. To enable EAP, modify the `eap.conf` and `sites-enabled/default` files.
1. Edit `eap.conf`:
Enable EAP-TTLS or PEAP as per your requirements by adjusting the settings.
2. Modify `default`:
Make sure the EAP module is included in the `authorize` and `authenticate` sections of the `sites-enabled/default` file.
#### Code Examples in Markdown
To illustrate FreeRADIUS configurations, here are some code snippets you might find useful:
# Start FreeRADIUS in debug mode
sudo freeradius -X
[/dm_code_snippet]plaintext
# Sample client configuration in clients.conf
client my_client {
ipaddr = 192.168.1.100
secret = testing123
shortname = my_client
}
[/dm_code_snippet]
[/dm_code_snippet]plaintext
# Sample user configuration in users file
bob Cleartext-Password := "hello"
[/dm_code_snippet]
### External References for Further Learning
– [FreeRADIUS Official Documentation](https://freeradius.org/documentation/)
– [Kali Linux Official Tools Page](https://www.kali.org/tools/freeradius)
– [EAP Authentication Protocols Overview](https://en.wikipedia.org/wiki/Extensible_Authentication_Protocol)
## Conclusion
In this section, we've covered advanced topics surrounding the installation and configuration of FreeRADIUS, practical usage scenarios, and real-world applications. Mastery of FreeRADIUS adds an essential tool to your pentesting arsenal, allowing you to better secure network environments.
With this knowledge, you should be capable of setting up and testing FreeRADIUS effectively while identifying potential vulnerabilities in various authentication schemes.
Explore, test, and continue to expand your skills in network security and pentesting!
—
Made by pablo rotem / פבלו רותם