Skip to content

FreeRADIUS

Overview

FreeRADIUS is an implementation of RADIUS, a protocol for remote user Authentication, Authorization, and Accounting.

In this documentation, you will learn how to collect and send FreeRADIUS logs to Sekoia.io.

  • Vendor: FreeRADIUS
  • Supported environment: On Premise
  • Version compatibility, if applicable:
  • Detection based on: Network Telemetry
  • Supported application or feature: Authentication, Authorization, and Accounting

High-Level Architecture Diagram

  • Type of integration: Outbound (PUSH to Sekoia.io)
  • Schema

freeradius_architecture

Specification

Prerequisites

  • Resource:
    • Self-managed syslog forwarder
  • Network:
    • Outbound traffic allowed
  • Permissions:
    • Administrator rights on the FreeRADIUS host
    • Root access to the Linux server with the syslog forwarder

Transport Protocol/Method

  • Indirect Syslog

Logs details

  • Supported functionalities: See section Overview
  • Supported type(s) of structure: Plain Text
  • Supported verbosity level: Informational

Note

Log levels are based on the taxonomy of RFC5424. Adapt according to the terminology used by the editor.

Step-by-Step Configuration Procedure

Instructions on the 3rd Party Solution

Forward FreeRADIUS Logs to Sekoia.io

This setup guide will lead you into forwarding FreeRADIUS's logs to Sekoia.io by means of a syslog transport channel.

Detailed Procedure:

  1. Prerequisites:
  2. An internal syslog concentrator is required to collect and forward events to Sekoia.io.

  3. Create the Intake in Sekoia.io:

  4. Go to the intake page and create a new intake from the format FreeRADIUS. Copy the intake key.

  5. Enable Syslog Forwarding for FreeRADIUS:

On the system hosting FreeRADIUS:

  1. Edit the file /etc/freeradius/radiusd.conf and update the log section:

    $ vi /etc/freeradius/radiusd.conf
    log {
      destination = syslog
      syslog_facility = local1
      stripped_names = no
      auth = yes
    
      # don't log passwords
      auth_badpass = no
      auth_goodpass = no
    }
    
  2. Forward logs to the concentrator:

    • For Debian-based and RedHat-based Linux distributions, edit the file /etc/rsyslog.conf and forward facility local1's logs to the log concentrator:

      $ vi /etc/rsyslog.conf
      # ensure the module imuxsock is not commented, to provide support for local system logging
      module(load="imuxsock")
      
      local1.* @<ip to the concentrator>
      

      Restart the rsyslog service:

      $ systemctl restart rsyslog
      
    • For other Linux distributions and BSD systems, edit the file /etc/syslog.conf and forward facility local1's logs to the concentrator:

      $ vi /etc/syslog.conf
      local1.* @<ip to the concentrator>
      

      Restart the syslog service.

Instruction on Sekoia

Configure Your Intake

This section will guide you through creating the intake object in Sekoia, which provides a unique identifier called the "Intake key." The Intake key is essential for later configuration, as it references the Community, Entity, and Parser (Intake Format) used when receiving raw events on Sekoia.

  1. Go to the Sekoia Intake page.
  2. Click on the + New Intake button at the top right of the page.
  3. Search for your Intake by the product name in the search bar.
  4. Give it a Name and associate it with an Entity (and a Community if using multi-tenant mode).
  5. Click on Create.
  6. You will be redirected to the Intake listing page, where you will find a new line with the name you gave to the Intake.

Note

For more details on how to use the Intake page and to find the Intake key you just created, refer to this documentation.

Configure a forwarder

To forward events using syslog to Sekoia.io, you need to update the syslog header with the intake key you previously created. Here is an example of your message before the forwarder

<%pri%>1 %timestamp:::date-rfc3339% %hostname% %app-name% %procid% LOG RAW_MESSAGE
and after
<%pri%>1 %timestamp:::date-rfc3339% %hostname% %app-name% %procid% LOG [SEKOIA@53288 intake_key=\"YOUR_INTAKE_KEY\"] RAW_MESSAGE

To achieve this you can:

  • Use the Sekoia.io forwarder which is the official supported way to collect data using the syslog protocol in Sekoia.io. In charge of centralizing data coming from many equipments/sources and forwarding them to Sekoia.io with the apporpriated format, it is a prepackaged option. You only have to provide your intake key as parameter.
  • Use your own Syslog service instance. Maybe you already have an intance of one of these components on your side and want to reuse it in order to centralize data before forwarding them to Sekoia.io. When using this mode, you have to configure and maintain your component in order to respect the expected Sekoia.io format.

Warning

Only the Sekoia.io forwarder is officially supported. Other options are documented for reference purposes but do not have official support.

Raw Events Samples

In this section, you will find examples of raw logs as generated natively by the source. These examples are provided to help integrators understand the data format before ingestion into Sekoia.io. It is crucial for setting up the correct parsing stages and ensuring that all relevant information is captured.

 Ignoring request to auth address * port 1812 bound to server default from unknown client 1.2.3.4 port 9459 proto udp
Ignoring request to auth address * port 1823 bound to server Wifi-LDAP from unknown client 1.2.2.3 port 1645 proto udp
(548804) Invalid user (Rejected: User-Name contains whitespace): [john.doe@example.org ] (from client WLAN port 9815 cli 00-11-22-33-44-55)
(29512) Login incorrect (No Auth-Type found: rejecting the user via Post-Auth-Type = Reject): [test] (from client LAN port 0)
(15350502) Login incorrect (eap_peap: The users session was previously rejected: returning reject (again.)): [domain\username] (from client RX-WIFI-CISCO-5520-491 port 0 cli 0a3253427066)
(549077) Login OK: [host/hostname.example.org] (from client WLAN port 9815 cli 00-11-22-33-44-55)
(549117) Login OK: [john.doe@example.org] (from client abcdef port 2010 cli 1.2.3.4 via TLS tunnel)
(29559) Login OK: [nagios_check] (from client abcdef port 0)
(19962164) Login OK: [MYDOM\UR12345678] (from client test port 8 cli 00-11-22-33-44-55)
(16634082) Login OK: [host/hostname.test.example.org] (from client test port 8 cli 00-11-22-33-44-55 via TLS tunnel)
(737467) Login OK: [username] (from client ccsma port 0)
(12403060) Login OK: [domain\username] (from client RX-WIFI-CISCO-5520 port 8 cli 0a-84-92-6c-48-1e)
(16634082) Login OK: [host/username.example.org] (from client RX-WIFI-CISCO-5520 port 8 cli 0a-44-5b-4f-04-cf via TLS tunnel)

Detection section

The following section provides information for those who wish to learn more about the detection capabilities enabled by collecting this intake. It includes details about the built-in rule catalog, event categories, and ECS fields extracted from raw events. This is essential for users aiming to create custom detection rules, perform hunting activities, or pivot in the events page.

The following Sekoia.io built-in rules match the intake FreeRADIUS. This documentation is updated automatically and is based solely on the fields used by the intake which are checked against our rules. This means that some rules will be listed but might not be relevant with the intake.

SEKOIA.IO x FreeRADIUS on ATT&CK Navigator

Cryptomining

Detection of domain names potentially related to cryptomining activities.

  • Effort: master
Dynamic DNS Contacted

Detect communication with dynamic dns domain. This kind of domain is often used by attackers. This rule can trigger false positive in non-controlled environment because dynamic dns is not always malicious.

  • Effort: master
Exfiltration Domain

Detects traffic toward a domain flagged as a possible exfiltration vector.

  • Effort: master
FreeRADIUS Failed Authentication

A failed authentication was logged by FreeRADIUS

  • Effort: advanced
Login Brute-Force On FreeRadius

A user has attempted to login several times (brute-force) with error then one success.

  • Effort: intermediate
RSA SecurID Failed Authentification

Detects many failed attempts to authenticate followed by a successfull login for a super admin account.

  • Effort: advanced
Remote Access Tool Domain

Detects traffic toward a domain flagged as a Remote Administration Tool (RAT).

  • Effort: master
Remote Monitoring and Management Software - AnyDesk

Detect artifacts related to the installation or execution of the Remote Monitoring and Management tool AnyDesk.

  • Effort: master
SEKOIA.IO Intelligence Feed

Detect threats based on indicators of compromise (IOCs) collected by SEKOIA's Threat and Detection Research team.

  • Effort: elementary
Sekoia.io EICAR Detection

Detects observables in Sekoia.io CTI tagged as EICAR, which are fake samples meant to test detection.

  • Effort: master
TOR Usage

Detects TOR usage, based on the IP address and the destination port (filtered on NTP). TOR is short for The Onion Router, and it gets its name from how it works. TOR intercepts the network traffic from one or more apps on user’s computer, usually the user web browser, and shuffles it through a number of randomly-chosen computers before passing it on to its destination. This disguises user location, and makes it harder for servers to pick him/her out on repeat visits, or to tie together separate visits to different sites, this making tracking and surveillance more difficult. Before a network packet starts its journey, user’s computer chooses a random list of relays and repeatedly encrypts the data in multiple layers, like an onion. Each relay knows only enough to strip off the outermost layer of encryption, before passing what’s left on to the next relay in the list.

  • Effort: master
TOR Usage Generic Rule

Detects TOR usage globally, whether the IP is a destination or source. TOR is short for The Onion Router, and it gets its name from how it works. TOR intercepts the network traffic from one or more apps on user’s computer, usually the user web browser, and shuffles it through a number of randomly-chosen computers before passing it on to its destination. This disguises user location, and makes it harder for servers to pick him/her out on repeat visits, or to tie together separate visits to different sites, this making tracking and surveillance more difficult. Before a network packet starts its journey, user’s computer chooses a random list of relays and repeatedly encrypts the data in multiple layers, like an onion. Each relay knows only enough to strip off the outermost layer of encryption, before passing what’s left on to the next relay in the list.

  • Effort: master

Event Categories

The following table lists the data source offered by this integration.

Data Source Description
Authentication logs FreeRADIUS provides authentication and access logs

In details, the following table denotes the type of events produced by this integration.

Name Values
Kind ``
Category authentication
Type info

Transformed Events Samples after Ingestion

This section demonstrates how the raw logs will be transformed by our parsers. It shows the extracted fields that will be available for use in the built-in detection rules and hunting activities in the events page. Understanding these transformations is essential for analysts to create effective detection mechanisms with custom detection rules and to leverage the full potential of the collected data.

{
    "message": " Ignoring request to auth address * port 1812 bound to server default from unknown client 1.2.3.4 port 9459 proto udp",
    "event": {
        "category": [
            "authentication"
        ],
        "dataset": "freeradius.authentication",
        "type": [
            "info"
        ]
    },
    "destination": {
        "port": 1812
    },
    "freeradius": {
        "outcome": "Ignoring request to auth address"
    },
    "host": {
        "name": "default"
    },
    "network": {
        "transport": "udp"
    },
    "related": {
        "ip": [
            "1.2.3.4"
        ]
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4",
        "port": 9459
    }
}
{
    "message": "Ignoring request to auth address * port 1823 bound to server Wifi-LDAP from unknown client 1.2.2.3 port 1645 proto udp",
    "event": {
        "category": [
            "authentication"
        ],
        "dataset": "freeradius.authentication",
        "type": [
            "info"
        ]
    },
    "destination": {
        "port": 1823
    },
    "freeradius": {
        "outcome": "Ignoring request to auth address"
    },
    "host": {
        "name": "Wifi-LDAP"
    },
    "network": {
        "transport": "udp"
    },
    "related": {
        "ip": [
            "1.2.2.3"
        ]
    },
    "source": {
        "address": "1.2.2.3",
        "ip": "1.2.2.3",
        "port": 1645
    }
}
{
    "message": "(548804) Invalid user (Rejected: User-Name contains whitespace): [john.doe@example.org ] (from client WLAN port 9815 cli 00-11-22-33-44-55)",
    "event": {
        "category": [
            "authentication"
        ],
        "dataset": "freeradius.authentication",
        "reason": "Rejected: User-Name contains whitespace",
        "type": [
            "info"
        ]
    },
    "freeradius": {
        "outcome": "Invalid user"
    },
    "network": {
        "name": "WLAN"
    },
    "related": {
        "user": [
            "john.doe"
        ]
    },
    "source": {
        "mac": "00-11-22-33-44-55",
        "port": 9815
    },
    "user": {
        "domain": "example.org ",
        "email": "john.doe@example.org ",
        "name": "john.doe"
    }
}
{
    "message": "(29512) Login incorrect (No Auth-Type found: rejecting the user via Post-Auth-Type = Reject): [test] (from client LAN port 0)",
    "event": {
        "category": [
            "authentication"
        ],
        "dataset": "freeradius.authentication",
        "reason": "No Auth-Type found: rejecting the user via Post-Auth-Type = Reject",
        "type": [
            "info"
        ]
    },
    "freeradius": {
        "outcome": "Login incorrect"
    },
    "network": {
        "name": "LAN"
    },
    "related": {
        "user": [
            "test"
        ]
    },
    "source": {
        "port": 0
    },
    "user": {
        "name": "test"
    }
}
{
    "message": "(15350502) Login incorrect (eap_peap: The users session was previously rejected: returning reject (again.)): [domain\\username] (from client RX-WIFI-CISCO-5520-491 port 0 cli 0a3253427066)",
    "event": {
        "category": [
            "authentication"
        ],
        "dataset": "freeradius.authentication",
        "reason": "The users session was previously rejected: returning reject (again.)",
        "type": [
            "info"
        ]
    },
    "freeradius": {
        "outcome": "Login incorrect"
    },
    "host": {
        "name": "RX-WIFI-CISCO-5520-491"
    },
    "related": {
        "user": [
            "username"
        ]
    },
    "source": {
        "mac": "0a-32-53-42-70-66",
        "port": 0
    },
    "user": {
        "domain": "domain",
        "name": "username"
    }
}
{
    "message": "(549077) Login OK: [host/hostname.example.org] (from client WLAN port 9815 cli 00-11-22-33-44-55)",
    "event": {
        "category": [
            "authentication"
        ],
        "dataset": "freeradius.authentication",
        "type": [
            "info"
        ]
    },
    "freeradius": {
        "outcome": "Login OK"
    },
    "network": {
        "name": "WLAN"
    },
    "related": {
        "hosts": [
            "hostname.example.org"
        ]
    },
    "source": {
        "address": "hostname.example.org",
        "domain": "hostname.example.org",
        "mac": "00-11-22-33-44-55",
        "port": 9815,
        "registered_domain": "example.org",
        "subdomain": "hostname",
        "top_level_domain": "org"
    }
}
{
    "message": "(549117) Login OK: [john.doe@example.org] (from client abcdef port 2010 cli 1.2.3.4 via TLS tunnel)",
    "event": {
        "category": [
            "authentication"
        ],
        "dataset": "freeradius.authentication",
        "type": [
            "info"
        ]
    },
    "freeradius": {
        "outcome": "Login OK"
    },
    "host": {
        "name": "abcdef"
    },
    "network": {
        "protocol": "TLS"
    },
    "related": {
        "ip": [
            "1.2.3.4"
        ],
        "user": [
            "john.doe"
        ]
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4",
        "port": 2010
    },
    "user": {
        "domain": "example.org",
        "email": "john.doe@example.org",
        "name": "john.doe"
    }
}
{
    "message": "(29559) Login OK: [nagios_check] (from client abcdef port 0)",
    "event": {
        "category": [
            "authentication"
        ],
        "dataset": "freeradius.authentication",
        "type": [
            "info"
        ]
    },
    "freeradius": {
        "outcome": "Login OK"
    },
    "host": {
        "name": "abcdef"
    },
    "related": {
        "user": [
            "nagios_check"
        ]
    },
    "source": {
        "port": 0
    },
    "user": {
        "name": "nagios_check"
    }
}
{
    "message": "(19962164) Login OK: [MYDOM\\UR12345678] (from client test port 8 cli 00-11-22-33-44-55)",
    "event": {
        "category": [
            "authentication"
        ],
        "dataset": "freeradius.authentication",
        "type": [
            "info"
        ]
    },
    "freeradius": {
        "outcome": "Login OK"
    },
    "host": {
        "name": "test"
    },
    "related": {
        "user": [
            "UR12345678"
        ]
    },
    "source": {
        "mac": "00-11-22-33-44-55",
        "port": 8
    },
    "user": {
        "domain": "MYDOM",
        "name": "UR12345678"
    }
}
{
    "message": "(16634082) Login OK: [host/hostname.test.example.org] (from client test port 8 cli 00-11-22-33-44-55 via TLS tunnel)",
    "event": {
        "category": [
            "authentication"
        ],
        "dataset": "freeradius.authentication",
        "type": [
            "info"
        ]
    },
    "freeradius": {
        "outcome": "Login OK"
    },
    "host": {
        "name": "test"
    },
    "network": {
        "protocol": "TLS"
    },
    "related": {
        "hosts": [
            "hostname.test.example.org"
        ]
    },
    "source": {
        "address": "hostname.test.example.org",
        "domain": "hostname.test.example.org",
        "mac": "00-11-22-33-44-55",
        "port": 8,
        "registered_domain": "example.org",
        "subdomain": "hostname.test",
        "top_level_domain": "org"
    }
}
{
    "message": "(737467) Login OK: [username] (from client ccsma port 0)",
    "event": {
        "category": [
            "authentication"
        ],
        "dataset": "freeradius.authentication",
        "type": [
            "info"
        ]
    },
    "freeradius": {
        "outcome": "Login OK"
    },
    "network": {
        "name": "ccsma"
    },
    "related": {
        "user": [
            "username"
        ]
    },
    "source": {
        "port": 0
    },
    "user": {
        "name": "username"
    }
}
{
    "message": "(12403060) Login OK: [domain\\username] (from client RX-WIFI-CISCO-5520 port 8 cli 0a-84-92-6c-48-1e)",
    "event": {
        "category": [
            "authentication"
        ],
        "dataset": "freeradius.authentication",
        "type": [
            "info"
        ]
    },
    "freeradius": {
        "outcome": "Login OK"
    },
    "host": {
        "name": "RX-WIFI-CISCO-5520"
    },
    "related": {
        "user": [
            "username"
        ]
    },
    "source": {
        "mac": "0a-84-92-6c-48-1e",
        "port": 8
    },
    "user": {
        "domain": "domain",
        "name": "username"
    }
}
{
    "message": "(16634082) Login OK: [host/username.example.org] (from client RX-WIFI-CISCO-5520 port 8 cli 0a-44-5b-4f-04-cf via TLS tunnel)",
    "event": {
        "category": [
            "authentication"
        ],
        "dataset": "freeradius.authentication",
        "type": [
            "info"
        ]
    },
    "freeradius": {
        "outcome": "Login OK"
    },
    "host": {
        "name": "RX-WIFI-CISCO-5520"
    },
    "network": {
        "protocol": "TLS"
    },
    "related": {
        "hosts": [
            "username.example.org"
        ]
    },
    "source": {
        "address": "username.example.org",
        "domain": "username.example.org",
        "mac": "0a-44-5b-4f-04-cf",
        "port": 8,
        "registered_domain": "example.org",
        "subdomain": "username",
        "top_level_domain": "org"
    }
}

Extracted Fields

The following table lists the fields that are extracted, normalized under the ECS format, analyzed and indexed by the parser. It should be noted that infered fields are not listed.

Name Type Description
destination.ip ip IP address of the destination.
destination.port long Port of the destination.
event.category keyword Event category. The second categorization field in the hierarchy.
event.dataset keyword Name of the dataset.
event.reason keyword Reason why this event happened, according to the source
event.type keyword Event type. The third categorization field in the hierarchy.
freeradius.outcome keyword The outcome of the event
host.name keyword Name of the host.
network.name keyword Name given by operators to sections of their network.
network.protocol keyword Application protocol name.
network.transport keyword Protocol Name corresponding to the field iana_number.
source.domain keyword The domain name of the source.
source.ip ip IP address of the source.
source.mac keyword MAC address of the source.
source.port long Port of the source.
user.domain keyword Name of the directory the user is a member of.
user.email keyword User email address.
user.id keyword Unique identifier of the user.
user.name keyword Short name or login of the user.

For more information on the Intake Format, please find the code of the Parser, Smart Descriptions, and Supported Events here.

Further readings