πŸ‘ΎAD Exploitation

circle-info

Protected users cant use NTLM hashes

Golden Ticket Attacks:

KRBTGT hashes are needed for this attack and allows to impersonate any damn user. POWERFUL!

How it's done:

  • Stealing the NTDS.DIT file β€” The NTDS.DIT file is a database that stores Active Directory data, including the password hashes for all users in the domain. A copy of the file is stored on every domain controller, in C:\Windows\NTDS\ by default.

  • Compromising a workstation β€” There can be credential artifacts in memory or on disk drive from the admin’s password.

  • Using Mimikatz

  • Running a DCSync attack β€” Active Directory environments typically include multiple domain controllers, which have to remain in sync by updating each other about changes, such as updates to user credentialsarrow-up-right. In addition, some applications, including Azure Active Directory Connect, need replication permissions. In a DCSync attack, a hacker who has gained access to a privileged account with domain replication rights subverts this AD functionality by pretending to be a DC and requesting password hashes from a legitimate DC. DCSync is a capability of the Mimikatz tool.

https://github.com/AdityaHebballe/Gitbook/blob/master/welcome/active-directory/ad-exploitation/broken-reference/README.mdchevron-right

If users don't have kerberos pre-authentication enabled

🐢Bloodhoundchevron-right

Bloodhound

getTGT.py absolute.htb/d.klay
KRB5CCNAME=d.klay.ccache ./bloodhound.py -k -dc dc.absolute.htb -ns 10.10.11.181 -c All -d absolute.htb -u d.klay@absolute.htb

Bruteforcing

With kerbrute.pyarrow-up-right:

With Rubeusarrow-up-right version with brute module:

ASREPRoast

With Impacketarrow-up-right example GetNPUsers.py:

With Rubeusarrow-up-right:

Cracking with dictionary of passwords:

Kerberoasting

With Impacketarrow-up-right example GetUserSPNs.py:

With Rubeusarrow-up-right:

With Powershell:

Cracking with dictionary of passwords:

Overpass The Hash/Pass The Key (PTK)

By using Impacketarrow-up-right examples:

With Rubeusarrow-up-right and PsExecarrow-up-right:

Pass The Ticket (PTT)

Harvest tickets from Linux

Check type and location of tickets:

If none return, default is FILE:/tmp/krb5cc_%{uid}.

In case of file tickets, you can copy-paste (if you have permissions) for use them.

In case of being KEYRING tickets, you can use tickeyarrow-up-right to get them:

Harvest tickets from Windows

With Mimikatzarrow-up-right:

With Rubeusarrow-up-right in Powershell:

To convert tickets between Linux/Windows format with ticket_converter.pyarrow-up-right:

Using ticket in Linux:

With Impacketarrow-up-right examples:

Using ticket in Windows

Inject ticket with Mimikatzarrow-up-right:

Inject ticket with Rubeusarrow-up-right:

Execute a cmd in the remote machine with PsExecarrow-up-right:

Silver ticket

With Impacketarrow-up-right examples:

With Mimikatzarrow-up-right:

Inject ticket with Rubeusarrow-up-right:

Execute a cmd in the remote machine with PsExecarrow-up-right:

Golden ticket

With Impacketarrow-up-right examples:

With Mimikatzarrow-up-right:

Inject ticket with Rubeusarrow-up-right:

Execute a cmd in the remote machine with PsExecarrow-up-right:

Misc

To get NTLM from password:

Password Spraying

From windows

From linux

Last updated

Was this helpful?