An attacker manipulates or crafts an LDAP query for the purpose of undermining the security of the target. Some applications use user input to create LDAP queries that are processed by an LDAP server. For example, a user might provide their username during authentication and the username might be inserted in an LDAP query during the authentication process. An attacker could use this input to inject additional commands into an LDAP query that could disclose sensitive information. For example, entering a * in the aforementioned query might return information about all users on the system. This attack is very similar to an SQL injection attack in that it manipulates a query to gather additional information or coerce a particular return value.
Description
Attack Execution Flow
Step 1
Explore[Survey application] The attacker takes an inventory of the entry points of the application.
Spider web sites for all available links
Sniff network communications with application using a utility such as WireShark.
[Applicazione di survey] L'attaccante effettua un inventario dei punti di ingresso dell'applicazione.
Ragnatele di siti per tutti i link disponibili
Sniffa le comunicazioni di rete con l'applicazione utilizzando un'utility come WireShark.
Attack Techniques
-
Spider web sites for all available links
-
Sniff network communications with application using a utility such as WireShark.IT: Siti web a ragnatela per tutti i link disponibili
Step 2
Experiment[Determine user-controllable input susceptible to LDAP injection] For each user-controllable input that the attacker suspects is vulnerable to LDAP injection, attempt to inject characters that have special meaning in LDAP (such as a single quote character, etc.). The goal is to create a LDAP query with an invalid syntax
Use web browser to inject input through text fields or through HTTP GET parameters
Use a web application debugging tool such as Tamper Data, TamperIE, WebScarab,etc. to modify HTTP POST parameters, hidden fields, non-freeform fields, or other HTTP header.
Use modified client (modified by reverse engineering) to inject input.
[Determinare gli input controllabili dall'utente suscettibili a LDAP injection] Per ogni input controllabile dall'utente che l'attaccante sospetta sia vulnerabile a LDAP injection, tentare di iniettare caratteri con significato speciale in LDAP (come il carattere di apice singolo, ecc.). L'obiettivo è creare una query LDAP con una sintassi non valida.
Utilizzare il browser web per iniettare input tramite campi di testo o tramite parametri HTTP GET.
Utilizzare uno strumento di debugging delle applicazioni web come Tamper Data, TamperIE, WebScarab, ecc., per modificare i parametri HTTP POST, campi nascosti, campi non liberi o altri header HTTP.
Utilizzare un client modificato (modificato tramite reverse engineering) per iniettare input.
Attack Techniques
-
Use web browser to inject input through text fields or through HTTP GET parameters
-
Use modified client (modified by reverse engineering) to inject input.IT: Utilizzare il browser web per iniettare input tramite campi di testo o tramite parametri HTTP GET
-
Use a web application debugging tool such as Tamper Data, TamperIE, WebScarab,etc. to modify HTTP POST parameters, hidden fields, non-freeform fields, or other HTTP header.IT: Utilizzare il browser web per iniettare input tramite campi di testo o tramite parametri HTTP GET
Step 3
Experiment[Try to exploit the LDAP injection vulnerability] After determining that a given input is vulnerable to LDAP Injection, hypothesize what the underlying query looks like. Possibly using a tool, iteratively try to add logic to the query to extract information from the LDAP, or to modify or delete information in the LDAP.
Add logic to the LDAP query to change the meaning of that command. Automated tools could be used to generate the LDAP injection strings.
Use a web application debugging tool such as Tamper Data, TamperIE, WebScarab,etc. to modify HTTP POST parameters, hidden fields, non-freeform fields, or other HTTP header.
[Prova a sfruttare la vulnerabilità di LDAP injection] Dopo aver determinato che un determinato input è vulnerabile a LDAP Injection, ipotizza come potrebbe apparire la query sottostante. Utilizzando eventualmente uno strumento, prova iterativamente ad aggiungere logica alla query per estrarre informazioni dall'LDAP, o per modificare o eliminare informazioni nell'LDAP.
Aggiungi logica alla query LDAP per cambiare il significato di quel comando. Strumenti automatizzati potrebbero essere utilizzati per generare le stringhe di LDAP injection.
Utilizza uno strumento di debugging di applicazioni web come Tamper Data, TamperIE, WebScarab, ecc. per modificare i parametri HTTP POST, i campi nascosti, i campi non liberi, o altri header HTTP.
Attack Techniques
-
Use a web application debugging tool such as Tamper Data, TamperIE, WebScarab,etc. to modify HTTP POST parameters, hidden fields, non-freeform fields, or other HTTP header.
-
Add logic to the LDAP query to change the meaning of that command. Automated tools could be used to generate the LDAP injection strings.IT: Utilizza uno strumento di debugging di applicazioni web come Tamper Data, TamperIE, WebScarab, ecc. per modificare i parametri HTTP POST, i campi nascosti, i campi non liberi o altri header HTTP.