Cyber security

LDAP Firewall – Enhancing Security With Advanced Active Directory Protection

LDAP Firewall is an open-source tool for Windows servers that lets you audit and restrict incoming LDAP requests.

Its primary use-cases are to protect Domain Controllers, block LDAP-based attacks and tightly control access to the Active Directory schema (e.g enforcing read-only access for users).

The tool is written in C++ and makes use of the Microsoft Detours and JsonCpp packages.

Some useful resources to get you started:

  • Introduction blog post – basics of LDAP and overview of the tool
  • Technical Deep Dive blog post – reverse-engineering the Windows LDAP service and how LDAP Firewall works
  • Leash the Hounds – how to stop BloodHound and other LDAP-based recon attacks using the LDAP Firewall
  • Tutorial video – covers how to install and use the tool
  • LDAP Firewall Workshop video – from DEATHCon 2023

Main Features

  • Allow / block incoming LDAP queries based on different parameters (operation type, source IP, user, DN etc.)
  • Event logging for LDAP queries

How It Works

The LDAP Firewall inspects incoming LDAP operations (which are used to read or modify entries in the AD schema) and allows or blocks the request based on the configured rules.

The operation also gets written into the Windows Event Log with the LDAPFW action and other relevant fields (Distinguished Name, attributes, OID etc.).

Who Is This Made For?

  • Security Engineers who want to control LDAP access and achieve a Least Privilege model
  • Threat Hunters and SOC analysts who want to be create detections and perform investigations around LDAP
  • Security Researchers who want to explore and deepen their understanding of the protocol

Preventing Attacks With LDAPFW

This section describes some common LDAP-based attacks that can be mitigated with the LDAP Firewall.
Sample config.json files can be found in the example_configs folder of this repository.

sAMAccountName Spoofing

LDAPFW can be configured to block all Add operations in order to completely prevent Name Impersonation (CVE-2021-42278) and thus defend against sAMAccountName spoofing.

For more information click here.

Tamil S

Tamil has a great interest in the fields of Cyber Security, OSINT, and CTF projects. Currently, he is deeply involved in researching and publishing various security tools with Kali Linux Tutorials, which is quite fascinating.

Recent Posts

vArmor : Enhancing Container Security In Cloud-Native Environments

vArmor is a cloud-native container sandbox system. It leverages Linux's AppArmor LSM, BPF LSM and Seccomp technologies to implement enforcers.…

43 seconds ago

DOLOST – Harnessing Cyber Deception For Strategic Security Deployments

Explore the cutting-edge framework 'DOLOST,' designed to innovate the field of cyber deception. This tool…

44 seconds ago

CVE-2024-36401 : GeoServer Unauthenticated Remote Code Execution In Evaluating Property Name Expressions

GeoServer is an open-source software server written in Java that provides the ability to view,…

47 seconds ago

BetterScan-CE Wiki : Integrating Comprehensive Security Scans Into DevOps

It is a Code and Infrastructure (IaC) and Cloud-native Scanning/SAST/Static Analysis/Linting solution using many tools/Scanners…

38 mins ago

Betterscan – Comprehensive Security Orchestration For Code And Infrastructure

Scan your source code and infra IaC against top security risks Betterscan is a orchestration toolchain that…

1 day ago

SQLRecon – Comprehensive Guide To SQL Server Exploitation And Defense

SQLRecon is a Microsoft SQL Server toolkit that is designed for offensive reconnaissance and post-exploitation.…

1 day ago