ExamGecko
Question list
Search
Search

Related questions











Question 524 - 312-50v12 discussion

Report
Export

A Certified Ethical Hacker (CEH) is given the task to perform an LDAP enumeration on a target system. The system is secured and accepts connections only on secure LDAP. The CEH uses Python for the enumeration process. After successfully installing LDAP and establishing a connection with the target, he attempts to fetch details like the domain name and naming context but is unable to receive the expected response. Considering the circumstances, which of the following is the most plausible reason for this situation?

A.
The Python version installed on the CEH's machine is incompatible with the Idap3 library
Answers
A.
The Python version installed on the CEH's machine is incompatible with the Idap3 library
B.
The secure LDAP connection was not properly initialized due to a lack of 'use_ssl = True' in the server object creation
Answers
B.
The secure LDAP connection was not properly initialized due to a lack of 'use_ssl = True' in the server object creation
C.
The enumeration process was blocked by the target system's intrusion detection system
Answers
C.
The enumeration process was blocked by the target system's intrusion detection system
D.
The system failed to establish a connection due to an incorrect port number
Answers
D.
The system failed to establish a connection due to an incorrect port number
Suggested answer: B

Explanation:

The most plausible reason for the situation is that the secure LDAP connection was not properly initialized due to a lack of 'use_ssl = True' in the server object creation. To use secure LDAP (LDAPS), the CEH needs to specify the use_ssl parameter as True when creating the server object with the ldap3 library in Python. This parameter tells the library to use SSL/TLS encryption for the LDAP communication.If the parameter is omitted or set to False, the library will use plain LDAP, which may not be accepted by the target system that only allows secure LDAP connections12. For example, the CEH can use the following code to create a secure LDAP server object:

from ldap3 import Server, Connection, ALL

server = Server('ldaps://<target_ip>', use_ssl=True, get_info=ALL)

connection = Connection(server, user='<username>', password=")

connection.bind()

The other options are not as plausible as option B for the following reasons:

A)The Python version installed on the CEH's machine is incompatible with the ldap3 library: This option is unlikely because the ldap3 library supports Python versions from 2.6 to 3.9, which covers most of the commonly used Python versions3. Moreover, if the Python version was incompatible, the CEH would not be able to install the library or import it in the code, and would encounter errors before establishing the connection.

C) The enumeration process was blocked by the target system's intrusion detection system: This option is possible but not very plausible because the CEH was able to establish a connection with the target, which means the intrusion detection system did not block the initial handshake. Moreover, the enumeration process would not affect the response of the target system, but rather the visibility of the results. If the intrusion detection system detected and blocked the enumeration, the CEH would receive an error message or a blank response, not an unexpected response.

D) The system failed to establish a connection due to an incorrect port number: This option is incorrect because the CEH was able to establish a connection with the target, which means the port number was correct. If the port number was incorrect, the CEH would not be able to connect to the target system at all, and would receive a connection refused error.

1: ldap3 - LDAP library for Python

2: How to use LDAPS with Python - Stack Overflow

3: ldap3 2.9 documentation

asked 18/09/2024
Erwin Zeisseink
29 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first