Active Directory (Part 8)

 





LDAP Bind Credentials

Lightweight Directory Access Protocol (LDAP) authentication is another way used by the applications to authenticate with AD. Although LDAP is same as NTLM, but the application directly verifies user credentials via a pair of AD credentials to query LDAP and then verify the AD user's credentials, instead of operating as a challenge-response protocol like NTLM. LDAP authentication is a popular mechanism with third-party applications that integrates with AD like gitlab, jenkins, and different kinds of VPNs. 

Every authentication protocol and security system contains some vulnerable ways to exploit them. Similarly, some of the LDAP authentication attack methods that a penetration tester can utilize are:

  • LDAP injection- In this attack, the tester injects malicious LDAP statements into an application's LDAP queries, allowing them to gain unauthorized access to network resources or manipulate data stored in AD. 

  • LDAP authentication bypass- In this one, the tester bypasses the LDAP authentication process to gain unauthorized access to network resources or manipulate data stored in AD.

  • LDAP enumeration- It is a type of attack in which the tester uses LDAP to gather information about the AD environment, like user accounts, group policies, and other objects, to gain unauthorized access to network resources or manipulate data stored in AD. 

  • LDAP pass-back attack- An attack in which the tester creates a rogue AD domain controller and uses LDAP to authenticate users and manage access to network resources, allowing them to gain unauthorized access to network resources or manipulate data stored in AD. 

Authentication Relays

To make use of an authentication relay, the client sends an authentication request to the relay, which in turn communicates with the AD domain controllers to verify the client's credentials. If the credentials are valid, the relay reverts the response to the client indicating the authentication was successful.

Authentication relay offers many benefits to an AD environment. It helps the organization in easy expansion of their Ad infrastructure to remote locations without having to setup extra domain controllers. It also allows the centralized management of AD environment, as all authentication requests are processed via relay rather than being handled individually by each domain controller.

There are a few ways to configure authentication relay according to the specific needs of an organization. Some of them includes dedicated authentication relay server, configuring an existing server as an authentication relay, or using a cloud-based authentication service.

A penetration tester can also leverage SMB protocol. It governs everything, from inner network file-sharing to remote administration. The security of older versions of this protocol was insufficient and many vulnerabilities as well as exploits were discovered. However, many of them has been resolved in its newer versions, often organization do not use them since legacy systems do not support them. The two different exploits of NetNTLM authentication with SMB are:

  • Since the NTLM Challenges can be intercepted, offline cracking techniques can be used to recover the password associated with the NTLM challenge. However, the cracking process is rather slower than cracking NTLM hashes directly. 

  • Use rogue device to stage a man in the middle attack, relaying the SMB authentication between the client and server which will provide an active authenticated session and access to the target server.

One of the most common tools used while executing the relay attacks is Responder. It allows Man-in-the-Middle attacks by poisoning the responses during NetNTLM authentication and tricking the client. It attempts to force the client into connecting with the attacker. Meanwhile, it also starts to host several servers, like SMB, SQL, HTTP, and others, to capture requests and force authentication.

Conclusion

Here, we discussed more about LDAP bind credentials and authentication relays. 










































Comments

Popular posts from this blog

Deployment (Part 3)

Deployment (Part 1)

Project Resourcing (Part 2)