Active Directory Penetration Testing Initial Framework

Active Directory (AD) is a critical component of many organizations' IT infrastructure. It is a centralized authentication and authorization database that provides a single sign-on solution for users to access various resources. However, AD is also a prime target for attackers due to its high value and the sensitive information it contains. Therefore, it is crucial to conduct regular penetration tests on AD to identify potential vulnerabilities and validate the security of the system.

This penetration test will cover the following techniques:

  1. Use of Alternate Authentication Methods (T1550)
  2. Kerberoasting Attack
  3. Golden Ticket Attack
  4. DCShadow Attack
  5. AS-REP Roasting Attack
  6. LDAP Injection Attack
  7. PetitPotam NTLM Relay Attack on a Active Directory Certificate Services (AD CS)

Active Directory Attack Technique 1: Use of Alternate Authentication Methods (T1550)

This attack technique involves exploiting the use of alternate authentication methods in AD. This could include using alternative methods such as smart cards, biometric devices, or even remote authentication protocols (RADIUS). As part of this penetration test, we will attempt to identify any insecure implementation of alternate authentication methods and exploit them to gain unauthorized access to the AD.

To conduct this attack, we will use tools such as Mimikatz, which can extract credential information from Windows systems' memory. We will also use tools like Impacket to perform network-level attacks against the AD infrastructure.

Active Directory Attack Technique 2: Kerberoasting Attack

Kerberoasting is an attack technique that exploits the weaknesses in the Kerberos authentication protocol used in AD. This technique involves stealing the Kerberos ticket-granting ticket (TGT) of a domain user and then using it to crack the user's password offline.

We will use tools such as Rubeus to perform the Kerberoasting attack on the AD infrastructure. The tool can extract the TGT of a user account and save it in a file, which we can use to crack the password offline using tools like Hashcat.

Active Directory Attack Technique 3: Golden Ticket Attack

The Golden Ticket attack is another Kerberos-based attack technique that involves generating a forged TGT for a domain user account. This forged TGT can then be used to impersonate any user account in the domain, including the domain administrator.

We will use tools such as Mimikatz to generate a Golden Ticket and then use it to authenticate as the domain administrator. This attack can be devastating as it allows the attacker complete control over the AD infrastructure.

Active Directory Attack Technique 4: DCShadow Attack

The DCShadow attack is a technique that allows an attacker with domain-level privileges to create a rogue domain controller in the AD infrastructure. This rogue domain controller can then be used to inject malicious objects, modify object attributes, or even perform a complete takeover of the AD infrastructure.

We will use tools such as Mimikatz to create a rogue domain controller and then use it to inject malicious objects into the AD infrastructure. This attack technique requires a high level of privilege escalation, and therefore, it is essential to identify any users with such privileges and limit their access.

Active Directory Attack Technique 5: AS-REP Roasting Attack

AS-REP Roasting is another Kerberos-based attack technique that exploits the weakness in the AS-REP authentication protocol used in AD. This technique involves requesting an AS-REP ticket for a non-existent user account and then cracking the ticket offline to obtain the user's password.

We will use tools such as Rubeus to perform the AS-REP Roasting attack and extract the AS-REP ticket for a non-existent user account. We will then use tools like Hashcat to crack the ticket offline and obtain the user's password.

Active Directory Attack Technique 6: LDAP Injection Attack

LDAP Injection is an attack technique that exploits the vulnerabilities in the Lightweight Directory Access Protocol (LDAP) used in AD. This technique involves injecting malicious LDAP queries into the AD infrastructure to obtain sensitive information or perform unauthorized actions.

We will use tools such as ldapsearch to perform LDAP queries and then inject malicious queries to obtain sensitive information or perform unauthorized actions. This attack technique requires a good understanding of the AD schema and LDAP query language, and therefore, it is crucial to have a skilled penetration tester.

Active Directory Attack Technique 7: PetitPotam NTLM Relay Attack on a Active Directory Certificate Services (AD CS)

PetitPotam is a recently discovered NTLM Relay attack that exploits the Windows Remote Management (WinRM) protocol used in AD. This technique involves relaying the NTLM authentication requests to an attacker-controlled server and then using it to perform unauthorized actions in the AD infrastructure.

We will use tools such as Impacket to perform the PetitPotam NTLM Relay attack on the AD infrastructure and then use it to perform unauthorized actions in the AD CS. This attack technique requires a good understanding of the WinRM protocol and the AD CS infrastructure.

Conclusion:

In conclusion, this penetration test has covered various attack techniques used to exploit vulnerabilities in the Active Directory infrastructure. It is essential to conduct regular penetration tests to identify potential vulnerabilities and validate the security of the system. It is also crucial to implement proper security controls to limit the attack surface and reduce the impact of potential attacks. By following security best practices and conducting regular penetration tests, organizations can ensure the security and integrity of their Active Directory infrastructure.

References:

  1. https://attack.mitre.org/techniques/T1550/
  2. https://attack.mitre.org/techniques/T1558/
  3. https://www.pentesteracademy.com/course?id=14
  4. https://www.harmj0y.net/blog/redteaming/the-dcshadow-attack-sneaking-past-defenses-while-acting-as-a-domain-controller/
  5. https://blog.stealthbits.com/as-rep-roasting/
  6. https://www.imperva.com/learn/application-security/ldap-injection/
  7. https://www.blackhillsinfosec.com/using-petitpotam-for-privilege-escalation-in-an-active-directory-environment/

Did you find this article useful?