Directory Services
Explore the LDAP directory structure in FreeIPA and techniques to test its security.
LDAP Overview
FreeIPA uses 389 Directory Server (formerly Fedora Directory Server) as its LDAP component. This directory server stores information about users, groups, hosts, and other objects necessary to manage the security aspects of a network of computers.
Overview of the LDAP directory structure in FreeIPA
Important Note
Directory Structure
The FreeIPA LDAP directory has a specific structure with several key containers that store different types of objects. Understanding this structure is essential for navigating and testing the directory.
Key Containers
FreeIPA organizes its LDAP directory into several key containers, each serving a specific purpose.
cn=accounts,dc=example,dc=com
The main container for user, group, and host accounts.
cn=users,cn=accounts,dc=example,dc=com
Contains user accounts.
cn=groups,cn=accounts,dc=example,dc=com
Contains user groups.
cn=computers,cn=accounts,dc=example,dc=com
Contains host entries.
cn=hostgroups,cn=accounts,dc=example,dc=com
Contains host groups.
cn=hbac,dc=example,dc=com
Contains Host-Based Access Control (HBAC) rules.
cn=sudo,dc=example,dc=com
Contains sudo rules.
cn=etc,dc=example,dc=com
Contains configuration information.
Exploring the Directory Structure
You can explore the FreeIPA directory structure using LDAP search commands.
LDAP Injection
LDAP injection is a technique where an attacker manipulates LDAP queries by injecting malicious code. This can lead to unauthorized access or information disclosure.
LDAP Filter Injection
LDAP filter injection involves manipulating LDAP search filters to bypass authentication or access unauthorized information.
LDAP Injection Note:
Applications that construct LDAP queries based on user input might be vulnerable to LDAP injection attacks. Modern versions of FreeIPA typically sanitize inputs, but custom integrations or older versions might be vulnerable.
Web Interface Injection
The FreeIPA web interface might be vulnerable to LDAP injection if it doesn't properly sanitize user input.
Diagram showing how LDAP injection attacks work