Active Directory (Part 12.1)

 







Exploitation

Several methods can be used to exploit misconfiguration in an Active Directory environment. Such methods includes AD delegation, forcing authentication relays, targeting AD users, domain trusts, and using Group Policy Objects or Silver and Golden Tickets. Other methods can also be used according to the AD environment.

Permission Delegation- This feature allows the administrators to assign specific permissions to other users or groups. It is useful in larger organizations where it is not feasible to handle all requests (like resetting passwords), for a small group of users. However, the principle of least privilege must be followed while using permission delegation. Penetration tester may exploit its misconfigurations in AD to move laterally and gain unauthenticated access information. 

Permission Delegation exploits are often called ACL-based attacks because AD allows administrators to configure Access Control Entries (ACEs) that populates Discretionary Access Control Lists (DACLs). 
Hence, misconfiguration of these ACEs may lead to their exploitation. Some of the notable misconfigurations are:
  1. ForceChangePassword- Ability to set the user's current password without knowing it. 
  2. AddMember- Ability to add users, groups or computers to the target group. 
  3. GenericAll- Complete control over the object including the ability to change the user's password, register an SPN or add an AD object to the target group. 
  4. GenericWrite- Update any unprotected parameters of the target object. 
  5. WriteOwner- Ability to update the owner of the target object.
  6. WriteDACL- Ability to write new ACEs to target object's DACL. 
  7. AllExtendedRights- Ability to perform any action associated with extended AD rights against the target object.  

To exploit these ACEs the penetration tester will require a method to interact with AD to make these requests. Best options are AD-RSAT PowerShell cmdlets or PowerSploit. 

Kerberos Delegation

Kerberos Delegation enables an application to access resources hosted on a different server. Unconstrained Delegation is the least secure method. It offer no limits to the delegations. If an attacker compromised a host with this delegation enabled, they could attempt to force a privileged account to authenticate to the host, which would allow them to intercept the generated TGT (ticket-granting ticket) and impersonate the privileged service. Some examples of the services that can be configured for delegation are:

  1. HTTP- Used for web applications to allow pass-through authentication using AD credentials. 
  2. CIFS- Common Internet File System is used for file sharing that allows delegation of users to shares. 
  3. LDAP- Used to delegate to the LDAP service for actions like resetting a user's password.
  4. HOST- Allows delegation of account for all activities on the host.
  5. MSSQL- Allows delegation of user accounts to the SQL service for pass-through authentication databases.  

Exploiting Constrained Delegation is usually more complex than exploiting Unconstrained Delegation since the delegated account can't just be used for everything. There are three types of Kerberos Delegation: Unconstrained Delegation, Constrained Delegation, and Resource-Based Constrained Delegation (RBCD). 

RBCD provides additional restrictions on Kerberos Delegation for improved security. It changes the delegation model by allowing the service to specify which objects can delegate to it, rather than specifying which objects can delegate to a particular service. Hence, the service owner can control which accounts have access to the service. 

Conclusion

This one talks about exploitation methods used in Active Directory. 
































































Comments

Popular posts from this blog

Query, Visualize, & Monitor Data in Azure Sentinel

Planning for Implementing SAP Solutions on Azure (Part 2 of 5)

Work with String Data Using KQL Statements