# LDAP Injection

## Null Bind

A **null bind** occurs when no credentials are specified, potentially bypassing authentication filters or exposing vulnerabilities.&#x20;

#### Example of Null Bind

An attacker can craft a malicious query to inject code into the LDAP server, bypassing filters or exploiting vulnerabilities. On web application burp can be used to perform this attack.

## **Injection Code**

LDAP injection allows attackers to bypass authentication or manipulate LDAP queries by injecting malicious code

#### Example of code injection

```bash
https://domain/?name=a*)(cn=*))%00&password=admin
```

This injection (`a*)(cn=*))%00`) manipulates the LDAP query logic, potentially leading to unauthorized access or information leakage.

## References

* [Hacktricks: LDAP injection](https://book.hacktricks.xyz/pentesting-web/ldap-injection#more-payloads)
